Author: 100y.eth Source: mirror Translation: Shan Ouba, Golden Finance
Once upon a time, a purple Pepe wizard descended on the village of Ethereum...
1. The Lost Village of Ethereum
A long time ago, in a small village called Ethereum, there lived a group of green Pepes. In this prosperous kingdom, a high degree of decentralization and strong security drove the prosperity of the village, and the economy was booming.
The villagers were deeply influenced by these principles and regularly elected leaders through their stakes to oversee the transaction blocks recorded every twelve seconds to maintain the village's active economy. However, today's Ethereum village is no longer as glorious as it was in the past, and the rampant meme virus has ravaged the village, causing great damage to the village. The green Pepes in the village are in a hurry, and the village has become a scene of depression.
However, there are still some green Pepes in the village who dream of revival. They proposed the "L2 Reform" in the hope of bringing Ethereum back to life. Through their efforts, the village gradually regained some prosperity, the scale of activities reached an unprecedented height, and a hint of vitality appeared in the lives of the green Pepes again.
However, the L2 Reform did not completely solve the problem. The neighboring villages of Solana and Sui, although still young and often unstable, have developed rapidly under the unprecedented scientific revolution, making complex financial transactions simple and smooth, while Ethereum, despite the reform, is still struggling. Rumors of relocation to these emerging villages began to circulate in the village.
Just then, a purple Pepe wizard appeared in the Ethereum village.
2. The Arrival of the Purple Pepe Wizard
The purple-robed Pepe Wizard, feeling deeply sorry for the lost glory of the Ethereum Village, decided to build a new village called Monad.
One day, he stood in the village square and announced his grand plan to create Monad to the green Pepes, and invited them to express their expectations and dreams for the future.
Green Pepe 1 spoke first: "I hope that life in Monad can be like Ethereum. Although Ethereum lacks the scalability of Solana or Sui, its culture is unique and I have never thought about leaving because the culture of other places is too different from ours."
Green Pepe 2 also added: "It is important to maintain the continuity of lifestyle and culture, but I also hope to be as efficient as other villages. Although Ethereum is secure, it is inadequate for projects that pursue speed and flexibility."
The wizard listened to their expectations and promised to incorporate Ethereum's rich culture into Monad while having the scalability of Solana and Sui. He began to think about how to cast a powerful magic to realize this vision: a village that retains the tradition of Ethereum and has the efficiency of new technologies.
Then, he shared this grand vision with the Pepes who were eager for change, inspiring their hope for a new life that combines the advantages of both.
3. Secret Technique 1: Delayed Execution
One limitation that restricts the scalability of the Ethereum village is that every time a new block is created, transactions must be processed in real time during the consensus process. In this village, the leader who proposes a block must calculate the results of all transactions before proposing it, and the verification node that receives the block must also calculate all transactions to verify the legitimacy of the block and vote.
Since the consensus process requires villagers to calculate and communicate, this greatly compresses the time to process transactions, thereby limiting scalability. To solve this problem, the purple Pepe wizard cast a new magic called "delayed execution" to separate the "consensus" process (i.e. transaction sorting) of villagers' transactions from the "execution" process (i.e. calculation results).
In simple terms, it is no longer necessary for each block to conduct consensus and execution at the same time. Instead, when the consensus of N blocks is carried out, the execution will process the transaction results in N-1 blocks.
This method allows execution to utilize the full block time, greatly increasing the number of transactions that can be processed at the same time.
Advanced Secret Technique: Delayed Merkle Root
In the Ethereum Village, nodes perform calculations before consensus to ensure the legitimacy of the block. However, in Monad's delayed execution system, consensus and execution are separated, and malicious nodes may ignore previously confirmed transactions or tamper with the calculation status.
To prevent this, Monad embeds the Merkle root (representing the calculation result of block N-10) into the proposal of block N. If more than two-thirds of the nodes reach consensus on block N, it means that the calculation result of block N-10 is also confirmed.
If a node's calculation result in block N-10 does not match the Merkle root in block N, the node will be removed from the consensus, starting from block N. This ten-block Merkle root delay ensures that any calculation errors can be detected in time.
It is worth noting that Monad's block time is 1 second, but this does not mean that Monad's finality requires 10 seconds. With Monad's unique MonadBFT system, the finality of a single block can be achieved in 1 second.
4. Secret Technique 2: Transaction Hash
Purple Pepe Wizard thought hard about how to enable the leaders in the village to quickly propagate block proposals to other nodes.
In Ethereum Village, the custom is to propagate a complete block proposal, including all transactions, as a huge package on the network. However, the wizard realized that if Monad Village also took this approach, broadcasting block proposals containing a large number of transactions would be a difficult and slow task.
For this reason, Purple Pepe Wizard proposed the concept of "transaction hash". Since all transactions submitted by villagers have been propagated in the network, each node retains the transaction records of Monad Village in its own transaction pool.
The wizard takes advantage of this so that the leader does not need to pass a complete list of transactions in each block proposal. Instead, the leader only needs to reference these transactions and send the hash value.
In this way, Monad's block proposal remains compact, containing only the hash value of each transaction. When other nodes receive the proposal, they only need to compare these hash values with the transactions in their own records to easily find the referenced transactions.
5. Secret Technique 3: MonadBFT
In Monad Village, the order of transactions within each block and the consensus on block generation are governed by MonadBFT, a high-performance consensus mechanism based on HotStuff. This two-phase Byzantine Fault Tolerance (BFT) algorithm can reach consensus in two steps.
The leader of the block is selected probabilistically based on the staked share of each participant. In Monad, the creation process of each block is more efficient than Ethereum Village because the proposal for each block N is passed together with the legal certificate (QC) of the previous block N-1, indicating that more than two-thirds of the nodes have verified the block.
Here’s how the process unfolds:
Leader N publishes a proposal for block N, along with the QC of the previous block N-1.
Validators then validate block N and send their votes to leader N+1.
Leader N+1 publishes a proposal for block N+1, along with the QC of block N.
However, even with QC N, validators cannot immediately finalize block N, because the nature of blockchain cannot ensure that all participants are online simultaneously.
To fully ensure the security of block N, validators need to send a "yes" vote for block N+1 (which contains QC N) to leader N+2. When leader N+2 generates QC N+1, this confirms the successful completion of round N+1, making block N final.
Through his outstanding wizardry and foresight, the purple wizard Pepe has led the Monad village into a new era. In this village, each block can not only be created and secured quickly, but also the process is elegant, in line with the vision of a truly scalable and win-win village.
6. Secret Technique 4: Parallel Execution
In the Monad field, in order to handle a large number of villager transactions, the purple Pepe wizard designed a new spell so that transactions are not processed in a serial manner in the Ethereum village, but in a powerful parallel stream.
With deferred execution, execution begins only after consensus is reached on the order of transactions in a block. The monad village consists of many skilled executors, each of whom is responsible for processing transactions, independently calculating their inputs and outputs and creating a list to be processed.
These inputs and outputs do not change the state of the village immediately, but wait in a form of suspended magic, ready to be committed in the order determined by consensus. This commit involves merging the outputs into the current state one by one, just like magic threads weaving a seamless and orderly tapestry.
However, things take a turn. Parallel processing introduces the possibility of transaction conflicts - something that is rare in the orderly Ethereum village, but a new challenge here.
For example, if one transaction (transaction b) shows that villager A gave 1 ETH to villager B, and another transaction (transaction c) shows that B spent this ETH at the village inn, then their order is crucial. If transaction c tries to execute before transaction b, the transaction will fail. In these cases, the conflicting transactions are rescheduled, and transaction c waits for transaction b to complete before executing again.
Thus, in Monads, the core of parallel execution is sequence: results are computed in parallel, but state updates are merged in the precise order required.
7. Secret Technique 5: MonadDb
Purple Peppa Wizard did not stop there. He conjured up MonadDb, a custom database unique to Monad Village, specifically designed to store the state of the blockchain. Ethereum relies on a complex Merkle Patricia Trie, a structure known for its resilience but also for its inefficiency for external clients, and MonadDb natively adopts it, taking full advantage of its full power and efficiency.
MonadDb was designed with the parallel execution of the village in mind, supporting multiple reads and writes at the same time, and with high precision. Unlike traditional databases that require each task to complete before moving on to the next, MonadDb has asynchronous I/O magic that allows tasks to overlap seamlessly, opening the door to true parallel transaction processing.
8. Come visit Monad Village!
Through a series of wonderful spells and complex magic, the purple wizard Pepe created Monad Village - where Ethereum's trusted accounts, encryption technology, transaction formats, languages, and wallets are easily integrated with Solana and Sui's incredible scalability. Now, Monad is thriving, dreaming of achieving 10,000 transactions per second and completing in 1 second.
Can Monad Village, born of wisdom and hope, save the world plagued by the meme virus and help Ethereum regain its glory and become a trustworthy partner? Only time can tell us the answer.
Preview
Gain a broader understanding of the crypto industry through informative reports, and engage in in-depth discussions with other like-minded authors and readers. You are welcome to join us in our growing Coinlive community:https://t.me/CoinliveSG