The Tale of Monad: Questing for the Arcane Secrets

Advanced11/5/2024, 9:51:22 AM
Although L2s have successfully scaled Ethereum to some extent, they still face limitations. Monad aims to build a new realm that combines Ethereum's rich culture with the scalability of Solana and Sui, creating an Ethereum-compatible system that meets the efficiency demands of a new era.

1. The Fallen Ethereum Village

Once upon a time, in the village of Ethereum, there lived a community of green Pepes. Ethereum was once one of the most prosperous realms, a place where high decentralization and formidable security had given rise to a thriving economy.

Guided by these principles, the villagers held regular elections based on their stakes, appointing leaders to oversee the blocks of transaction records created every twelve seconds. Through this, they diligently managed the village’s bustling economy.

But now, Ethereum’s former glory had faded, and a plague of meme-viruses swept through, sapping the village’s strength. Shadows hung over the streets as the green Pepes trudged along, aimlessly wandering in what had become a desolate, gloomy village.

Yet, there remained a few green Pepes who longed to restore Ethereum’s lost grandeur. They championed the “L2 Reform,” a movement aimed at revitalizing the village. With their efforts, Ethereum began to flourish again, enabling a scale of activity once deemed impossible. The Pepes regained some of the vibrancy that had once filled their lives.

Still, the L2 Reform faced its limits. Nearby villages like Solana and Sui, though young and at times fraught with instability, were advancing rapidly through unprecedented scientific revolutions. Their innovations made complex financial transactions seamless, while Ethereum struggled despite the reforms. Thus, whispers spread among the Pepes about the possibility of moving to these neighboring villages.

Then, one fateful day, a purple Pepe wizard appeared in the village of Ethereum.

2. The Arrival of the Purple Pepe Wizard

A purple-robed Pepe wizard, gazing sorrowfully at the lost glory of the Ethereum village, resolved to build a new realm named Monad.

One day, he appeared before the green Pepes, announcing his ambitious plan to establish the village of Monad. Gathering them in the central square, he opened the floor to hear their thoughts and dreams.

Green Pepe 1 spoke up: “I hope life in Monad will feel just like Ethereum. Even though Ethereum lacks the scalability of Solana or Sui, I never considered leaving because their cultures felt so different from ours.”

Green Pepe 2 added, “Keeping the same lifestyle and culture is important, but I also want a system as efficient as the other villages’. While Ethereum is safe, it falls short for ventures that demand speed and agility.”

Taking their desires to heart, the wizard pledged to create Monad with the rich culture of Ethereum and the scalability of Solana and Sui. He contemplated the powerful spells necessary to achieve both dreams, a village where compatibility with Ethereum’s traditions would meet the efficiency of new-age advancements.

Then, he shared his vision with the eager Pepes, inspiring hope for a place that could truly offer the best of both worlds.

3. Secret Spell 1: Deferred Execution

One of the limitations restricting the Ethereum village’s scalability lies in the processing of every transaction during the consensus process, a necessary step to generate each new block.

In this village, the leader proposing a block must compute all transactions within it before proposing it, ensuring each one’s outcome. Additionally, the validating nodes that receive this block must also compute all the transactions to verify the block’s legitimacy and cast their votes.

Since the consensus process involves both computation and communication between villagers, the time budget allocated for processing transactions is quite low, ultimately resulting in limited scalability.

To solve this, the purple Pepe wizard introduced a new spell called “Deferred Execution.” This spell separates the “Consensus” process, which orders the villagers’ transactions, from the “Execution” process, which calculates the outcomes of these transactions.

In simpler terms, instead of performing consensus and execution simultaneously for each block, consensus for the Nth block is conducted while the execution is performed for the N-1th block, whose transaction order has already been established.

By allowing a full block time for execution, this approach greatly increases the number of transactions that can be processed within the same timeframe.

Advanced Spell: Delayed Merkle Roots

In the Ethereum village, nodes perform calculations before reaching consensus, which ensures the block’s validity. However, in Monad’s Deferred Execution system, consensus and execution are separated. This opens the possibility for malicious nodes to ignore previously agreed transactions or freely alter the computed state.

To prevent this, Monad embeds a Merkle root—representing the computed results from the N-10th block—into the proposal for the Nth block. If more than two-thirds of nodes reach consensus on the Nth block, it implies agreement on the N-10th block’s computations.

If any node’s computations from the N-10th block do not match the Merkle root included in the Nth block, that node is removed from consensus starting at the Nth block. This ten-block delay for the Merkle root ensures that any computational errors are detected in time.

Notably, the block time in Monad is 1 second, though this does not mean Monad’s finality takes 10 seconds. Thanks to Monad’s unique MonadBFT system, single-slot finality can be achieved, granting finality within 1 second.

4. Secret Spell 2: Transaction Hashing

The wise purple Pepe wizard pondered how a leader in the village might swiftly spread a block proposal to the other nodes.

In the Ethereum village, it was customary to package an entire block proposal, including all transactions, and send it as one massive bundle across the network.

However, the wizard realized that if Monad village adopted this method, broadcasting such a vast block proposal full of countless transactions would be a daunting and laborious task.

To solve this, the purple Pepe wizard introduced the concept of “Transaction Hashing.” Since all villagers’ submitted transactions are already propagated across the network, each node maintains a record of Monad village’s transactions within its own mempool.

This insight meant that the leader no longer needed to transmit the full transaction list in each block proposal. Instead, the leader could simply reference the transactions, sending only the hashes.

This way, Monad’s block proposals remained compact, containing only the hashed values of each transaction. Upon receiving these, the other nodes could easily compare the hashes to their own records and identify the referenced transactions.

5. Secret Spell 3: MonadBFT

In Monad village, the order of transactions within each block and the consensus on block creation were governed by MonadBFT, a high-performance consensus mechanism based on HotStuff. This two-phase BFT (Byzantine Fault Tolerance) algorithm allowed consensus to be reached in two steps.

The role of block leader was probabilistically chosen based on each participant’s staked share. In Monad, blocks were crafted more efficiently than in the Ethereum village, as each block N proposal was transmitted along with the Quorum Certificate (QC) for the previous block N-1, indicating that over two-thirds of the nodes had validated the block.

Here is how the sequence unfolded:

  • [ ] Leader N spread a proposal for block N, accompanied by the QC for block N-1.
  • [ ] Validators then verified block N and sent their votes to Leader N+1.
  • [ ] Leader N+1 shared a proposal for block N+1, along with the QC for block N.
  • [ ] However, even with QC N, validators could not finalize block N instantly, as the nature of the blockchain could not ensure that all participants were online synchronously.
  • [ ] To fully secure block N, validators had to send their “yes” votes for block N+1, containing QC N, to Leader N+2. When Leader N+2 generated QC N+1, it confirmed the successful completion of round N+1, which in turn retroactively finalized block N.

Thus, with deft wizardry and foresight, the purple Pepe wizard guided Monad village into a new era, where each block was created and secured not only swiftly but with an elegance befitting the vision of a truly scalable and cooperative village.

6. Secret Spell 4: Parallel Execution

In the realm of Monad, to handle a vast influx of villager transactions, the purple Pepe wizard devised a new spell that allowed transactions to be processed not in the serial manner of Ethereum village, but in powerful, parallel flows.

With the spell of Deferred Execution, execution would commence only after a block’s transaction order had reached consensus. The Monad village, populated by a host of skilled executors, each took on transactions, calculating their inputs and outputs independently and creating pending lists.

These inputs and outputs didn’t immediately alter the village’s state but instead waited in suspended magic, ready to be committed in the order determined by consensus. This commitment involved merging the outputs one by one into the current state, like magical threads weaving a tapestry of seamless order.

Yet, there was a twist. Parallel processing introduced the possibility of transaction conflicts—a rarity in the orderly Ethereum village but a new challenge here.

For instance, if one transaction (tx b) had villager A gifting 1 ETH to villager B, and another (tx c) showed B spending that ETH at the village inn, their order was crucial. Should tx c attempt to execute before tx b, the transaction would fail. In these cases, conflicting transactions were rescheduled, with tx c awaiting the completion of tx b before executing again.

Thus, in Monad, the heart of parallel execution lay in the sequence: results were calculated in parallel, but state updates were merged in the precise order needed.

7. Secret Spell 5: MonadDb

The purple Pepe wizard didn’t stop there. He conjured MonadDb, a custom database unique to the village of Monad, tailored to store the blockchain’s state. Where Ethereum relied on the intricate Merkle Patricia Trie, a structure known for its resilience but also for its inefficiencies with foreign clients, MonadDb embraced it natively, harnessing its full power and efficiency.

MonadDb was crafted with the village’s parallel execution in mind, supporting multiple simultaneous reads and writes with graceful precision. Unlike traditional databases that required each task to finish before moving to the next, MonadDb wielded asynchronous I/O magic, allowing tasks to overlap seamlessly, opening the gates for true parallel transaction handling.

8. Come Visit Monad Village!

Through a symphony of wondrous spells and intricate enchantments, the purple Pepe wizard created the village of Monad—a place where Ethereum’s trusted accounts, cryptography, transaction formats, languages, and wallets mingled effortlessly with the incredible scalability of Solana and Sui. Now, Monad flourished with dreams of reaching 10,000 transactions per second and achieving 1-second finality.

Would the village of Monad, born of brilliance and hope, manage to save a world ensnared by the meme virus and perhaps help bring Ethereum’s glory back as a worthy companion? Only time would tell.

Disclaimer:

  1. This article is reprinted from [100y.eth], All copyrights belong to the original author [100y.eth]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.

The Tale of Monad: Questing for the Arcane Secrets

Advanced11/5/2024, 9:51:22 AM
Although L2s have successfully scaled Ethereum to some extent, they still face limitations. Monad aims to build a new realm that combines Ethereum's rich culture with the scalability of Solana and Sui, creating an Ethereum-compatible system that meets the efficiency demands of a new era.

1. The Fallen Ethereum Village

Once upon a time, in the village of Ethereum, there lived a community of green Pepes. Ethereum was once one of the most prosperous realms, a place where high decentralization and formidable security had given rise to a thriving economy.

Guided by these principles, the villagers held regular elections based on their stakes, appointing leaders to oversee the blocks of transaction records created every twelve seconds. Through this, they diligently managed the village’s bustling economy.

But now, Ethereum’s former glory had faded, and a plague of meme-viruses swept through, sapping the village’s strength. Shadows hung over the streets as the green Pepes trudged along, aimlessly wandering in what had become a desolate, gloomy village.

Yet, there remained a few green Pepes who longed to restore Ethereum’s lost grandeur. They championed the “L2 Reform,” a movement aimed at revitalizing the village. With their efforts, Ethereum began to flourish again, enabling a scale of activity once deemed impossible. The Pepes regained some of the vibrancy that had once filled their lives.

Still, the L2 Reform faced its limits. Nearby villages like Solana and Sui, though young and at times fraught with instability, were advancing rapidly through unprecedented scientific revolutions. Their innovations made complex financial transactions seamless, while Ethereum struggled despite the reforms. Thus, whispers spread among the Pepes about the possibility of moving to these neighboring villages.

Then, one fateful day, a purple Pepe wizard appeared in the village of Ethereum.

2. The Arrival of the Purple Pepe Wizard

A purple-robed Pepe wizard, gazing sorrowfully at the lost glory of the Ethereum village, resolved to build a new realm named Monad.

One day, he appeared before the green Pepes, announcing his ambitious plan to establish the village of Monad. Gathering them in the central square, he opened the floor to hear their thoughts and dreams.

Green Pepe 1 spoke up: “I hope life in Monad will feel just like Ethereum. Even though Ethereum lacks the scalability of Solana or Sui, I never considered leaving because their cultures felt so different from ours.”

Green Pepe 2 added, “Keeping the same lifestyle and culture is important, but I also want a system as efficient as the other villages’. While Ethereum is safe, it falls short for ventures that demand speed and agility.”

Taking their desires to heart, the wizard pledged to create Monad with the rich culture of Ethereum and the scalability of Solana and Sui. He contemplated the powerful spells necessary to achieve both dreams, a village where compatibility with Ethereum’s traditions would meet the efficiency of new-age advancements.

Then, he shared his vision with the eager Pepes, inspiring hope for a place that could truly offer the best of both worlds.

3. Secret Spell 1: Deferred Execution

One of the limitations restricting the Ethereum village’s scalability lies in the processing of every transaction during the consensus process, a necessary step to generate each new block.

In this village, the leader proposing a block must compute all transactions within it before proposing it, ensuring each one’s outcome. Additionally, the validating nodes that receive this block must also compute all the transactions to verify the block’s legitimacy and cast their votes.

Since the consensus process involves both computation and communication between villagers, the time budget allocated for processing transactions is quite low, ultimately resulting in limited scalability.

To solve this, the purple Pepe wizard introduced a new spell called “Deferred Execution.” This spell separates the “Consensus” process, which orders the villagers’ transactions, from the “Execution” process, which calculates the outcomes of these transactions.

In simpler terms, instead of performing consensus and execution simultaneously for each block, consensus for the Nth block is conducted while the execution is performed for the N-1th block, whose transaction order has already been established.

By allowing a full block time for execution, this approach greatly increases the number of transactions that can be processed within the same timeframe.

Advanced Spell: Delayed Merkle Roots

In the Ethereum village, nodes perform calculations before reaching consensus, which ensures the block’s validity. However, in Monad’s Deferred Execution system, consensus and execution are separated. This opens the possibility for malicious nodes to ignore previously agreed transactions or freely alter the computed state.

To prevent this, Monad embeds a Merkle root—representing the computed results from the N-10th block—into the proposal for the Nth block. If more than two-thirds of nodes reach consensus on the Nth block, it implies agreement on the N-10th block’s computations.

If any node’s computations from the N-10th block do not match the Merkle root included in the Nth block, that node is removed from consensus starting at the Nth block. This ten-block delay for the Merkle root ensures that any computational errors are detected in time.

Notably, the block time in Monad is 1 second, though this does not mean Monad’s finality takes 10 seconds. Thanks to Monad’s unique MonadBFT system, single-slot finality can be achieved, granting finality within 1 second.

4. Secret Spell 2: Transaction Hashing

The wise purple Pepe wizard pondered how a leader in the village might swiftly spread a block proposal to the other nodes.

In the Ethereum village, it was customary to package an entire block proposal, including all transactions, and send it as one massive bundle across the network.

However, the wizard realized that if Monad village adopted this method, broadcasting such a vast block proposal full of countless transactions would be a daunting and laborious task.

To solve this, the purple Pepe wizard introduced the concept of “Transaction Hashing.” Since all villagers’ submitted transactions are already propagated across the network, each node maintains a record of Monad village’s transactions within its own mempool.

This insight meant that the leader no longer needed to transmit the full transaction list in each block proposal. Instead, the leader could simply reference the transactions, sending only the hashes.

This way, Monad’s block proposals remained compact, containing only the hashed values of each transaction. Upon receiving these, the other nodes could easily compare the hashes to their own records and identify the referenced transactions.

5. Secret Spell 3: MonadBFT

In Monad village, the order of transactions within each block and the consensus on block creation were governed by MonadBFT, a high-performance consensus mechanism based on HotStuff. This two-phase BFT (Byzantine Fault Tolerance) algorithm allowed consensus to be reached in two steps.

The role of block leader was probabilistically chosen based on each participant’s staked share. In Monad, blocks were crafted more efficiently than in the Ethereum village, as each block N proposal was transmitted along with the Quorum Certificate (QC) for the previous block N-1, indicating that over two-thirds of the nodes had validated the block.

Here is how the sequence unfolded:

  • [ ] Leader N spread a proposal for block N, accompanied by the QC for block N-1.
  • [ ] Validators then verified block N and sent their votes to Leader N+1.
  • [ ] Leader N+1 shared a proposal for block N+1, along with the QC for block N.
  • [ ] However, even with QC N, validators could not finalize block N instantly, as the nature of the blockchain could not ensure that all participants were online synchronously.
  • [ ] To fully secure block N, validators had to send their “yes” votes for block N+1, containing QC N, to Leader N+2. When Leader N+2 generated QC N+1, it confirmed the successful completion of round N+1, which in turn retroactively finalized block N.

Thus, with deft wizardry and foresight, the purple Pepe wizard guided Monad village into a new era, where each block was created and secured not only swiftly but with an elegance befitting the vision of a truly scalable and cooperative village.

6. Secret Spell 4: Parallel Execution

In the realm of Monad, to handle a vast influx of villager transactions, the purple Pepe wizard devised a new spell that allowed transactions to be processed not in the serial manner of Ethereum village, but in powerful, parallel flows.

With the spell of Deferred Execution, execution would commence only after a block’s transaction order had reached consensus. The Monad village, populated by a host of skilled executors, each took on transactions, calculating their inputs and outputs independently and creating pending lists.

These inputs and outputs didn’t immediately alter the village’s state but instead waited in suspended magic, ready to be committed in the order determined by consensus. This commitment involved merging the outputs one by one into the current state, like magical threads weaving a tapestry of seamless order.

Yet, there was a twist. Parallel processing introduced the possibility of transaction conflicts—a rarity in the orderly Ethereum village but a new challenge here.

For instance, if one transaction (tx b) had villager A gifting 1 ETH to villager B, and another (tx c) showed B spending that ETH at the village inn, their order was crucial. Should tx c attempt to execute before tx b, the transaction would fail. In these cases, conflicting transactions were rescheduled, with tx c awaiting the completion of tx b before executing again.

Thus, in Monad, the heart of parallel execution lay in the sequence: results were calculated in parallel, but state updates were merged in the precise order needed.

7. Secret Spell 5: MonadDb

The purple Pepe wizard didn’t stop there. He conjured MonadDb, a custom database unique to the village of Monad, tailored to store the blockchain’s state. Where Ethereum relied on the intricate Merkle Patricia Trie, a structure known for its resilience but also for its inefficiencies with foreign clients, MonadDb embraced it natively, harnessing its full power and efficiency.

MonadDb was crafted with the village’s parallel execution in mind, supporting multiple simultaneous reads and writes with graceful precision. Unlike traditional databases that required each task to finish before moving to the next, MonadDb wielded asynchronous I/O magic, allowing tasks to overlap seamlessly, opening the gates for true parallel transaction handling.

8. Come Visit Monad Village!

Through a symphony of wondrous spells and intricate enchantments, the purple Pepe wizard created the village of Monad—a place where Ethereum’s trusted accounts, cryptography, transaction formats, languages, and wallets mingled effortlessly with the incredible scalability of Solana and Sui. Now, Monad flourished with dreams of reaching 10,000 transactions per second and achieving 1-second finality.

Would the village of Monad, born of brilliance and hope, manage to save a world ensnared by the meme virus and perhaps help bring Ethereum’s glory back as a worthy companion? Only time would tell.

Disclaimer:

  1. This article is reprinted from [100y.eth], All copyrights belong to the original author [100y.eth]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.
Start Now
Sign up and get a
$100
Voucher!