Source: View on the Chain
A new narrative of "parallel EVM" has emerged in the market, which is very interesting in layer 2. It can realize a new paradigm of "refined" Rollup, and to exaggerate it can achieve Solana. It becomes the magic modification effect of Ethereum’s new layer 2. In my opinion, parallel EVM is just a highly "modular" manifestation of Rollup. After DA was invaded by a third party, the VM execution layer fell again, and layer 2 will be redefined in the future. Why? Next, let’s analyze it from a popular science perspective:
To understand this topic, we must first clarify the single-threaded execution model of “EVM”.
This model stipulates that transactions must be processed and confirmed one after another in order, which directly affects the transaction processing speed, block generation time, and transaction throughput, etc., making the Ethereum main network Gas high and congested. main reason. Moreover, the reason why it is designed to be single-threaded has certain historical limitations. Since transactions on Ethereum are verified and executed by distributed independent nodes, it is necessary to ensure that the data of all addresses, such as balances, smart contract codes, etc., remain consistent between different nodes. At the same time, it is also necessary to ensure that there are no identical assets. The possibility of double spending arises.
This causes transactions to be queued in order. If parallel transactions occur, it may lead to errors in data synchronization between nodes. The key is that serious double-spending transactions may occur. Popular explanation: The bank has only one service window, and customers must queue up in order to withdraw money. Whether it is deposits, withdrawals, loans and other services, one customer can only start the next one after completing the business. The advantage is that every operation of the bank's account system will be accurately recorded. However, the customer queue time will be relatively long;
If the bank opens multiple service windows and customers can choose the window to handle different businesses, there will be two windows trying to deduct money from an account at the same time. Failure to reconcile the account system in a timely manner will lead to double spending. Obviously, this significantly improves efficiency, but complex accounting logic will put pressure on the accounting system. In the layer1 independent chain scenario, if the bottom layer of the chain supports parallel processing, the problem will be easily solved. Since Solana's computing and storage states are separated, after its VM receives multiple transactions from users, the node will sort these transactions and then call the independent The storage system status data detects whether there is a status conflict in these transactions. If there is no conflict, the transaction will be packaged into a block. If there is a conflict, the conflicting transaction will be excluded from this block.
In contrast, the storage status of Ethereum is calculated in real time. Each transaction must wait for the completion of the previous transaction before updating the status. Therefore, it is impossible to filter transactions before waiting for packaging. , limiting the possibility of parallel processing. In the layer2 Rollup chain scenario, to achieve parallel processing, the distance is similar. You can think of Solana's transaction calculation and storage status detection waiting for the POH timestamp as the process of the Rollup chain processing transactions in the Sequener and then batching them to the main network.
Now before layer 2 batches transactions, the Sequener will first arrange nonces for the transactions in chronological order, and then batch them to the main network in order. How can we achieve multi-threading?
1) Based on the AA account abstract model, it is possible to initiate multiple transactions at the same time from the account status. For example, if two Transfers are executed at the same time, the AA smart contract will give them a nonce, which needs to be executed in order. , if one is Transfer and the other is Approve, it can be processed in parallel more flexibly without being restricted by nonce. In the AA account model, each account can customize transaction processing logic, and then cooperate with nonce to achieve high concurrency.
2) "Refined" processing of transactions in Sequencer can be performed. For example, when layer 2 transactions are submitted to Sequencer, Sequencer can quickly detect these transaction logics and perform refined sorting and processing. Screening work, for example, if the same account initiates two Transfers, the latter one must be excluded and wait for the next Batch. If the same account initiates two operations of different nature, they can be batched into a block at the same time.
Sounds simple? But this is definitely not the case. Taking the DeFi scenario as an example, Sequencer has two major challenges in achieving refined management of transactions:
1) It needs to analyze transaction data in real time and understand the smart contracts of incoming data. The calling method and parameters, taking the common Staking in DeFi as an example, a Staking operation involves token transfer, status update, pledge period, and potential reward calculation, etc. If a large number of users input some pledge transactions at the same time, if there are also transactions involving pledge and then transfer, coupled with complex Oralce price factors, etc., if Sequener cannot parse and process it properly, an error in one step may lead to serious accidents.
2) The Sequencer must ensure decentralization. Currently, the layer 2 Sequencer is only a Batch transaction, and its rights are too great. If the Sequencer decentralization problem cannot be solved, we will do a "refined" Rollup. This is equivalent to giving Sequencer more permissions. If Sequencer makes fake transactions, blatantly engages in MEV traps, or even maliciously manipulates Oracle liquidation, etc., it will breed.
Recently, Metis has become popular. On the surface, it is just that Sequencer has achieved decentralization. On a deeper level, it has established a basic consensus premise for future Sequencer’s refined rollup. Of course, relying on Sequencer to achieve highly refined Rollup transaction aggregation and processing is still just an idea. Fortunately, the abstraction of AA accounts and the open idea of modular combination of the entire blockchain provide the prerequisite for the implementation of this idea. condition.
Above.
Besides, as mentioned above, layer2 as a whole is becoming increasingly modular. ZK technology is embedded in the OP Stack framework to achieve privacy expansion; the original Ethereum DA is converted into a third-party DA such as Celestia. To reduce costs; gradually the tradition of ETH as gas fee has also been changed, giving layer2 tokens greater practicality; even layer2 can batch the transactions and submit them to different VM execution environments, and the transactions are divided into Processing on Solana and Ethereum and more.
At that time, a new paradigm will emerge. The current layer 2 is no longer just the layer 2 of Ethereum. Solana can also be the layer 2 of Ethereum, and even the definition of layer 2 will be magically changed.
Boldly imagine that layer 2 has now become an entry-level "layer 1" integrating high-concurrency transaction processing capabilities, and the former layer 1 such as Ethereum and Solana have become a new platform for asset settlement and security assurance. "layer2". Layer 2 has never been a rigid concept. Layer 2 platforms have always had the mission of solving large-scale concurrent processing of transactions and attracting incremental user market groups.
If the mission is achieved, under the modular idea, not only the legitimacy of Ethereum layer 1 will be broken, but the DA data availability, VM execution layer and even interoperability communication and interaction of the entire chain will become the Mass Adoption for layer 2. infra. By then, layer 2 will no longer be just a supplement to layer 1, but will become a powerful comprehensive transaction aggregation and distribution processing platform. Let me ask, who is whose layer 2?