Alt The competition for L1 has become fierce. Near has launched a DA solution. Sui’s TVL has been rising. Only Ethereum is still unhurriedly upgrading its main network.L2 Two major points of competition emerged: parallel EVM and decentralized sorter.
At present and in the future, a basic fact is that Ethereum’s status has been difficult to shake, and the concept of modularity will be generalized. If Vitalik If the suppression of Celestia is unsuccessful, then the market will choose the best. Combination and modularization not only occur within the same system, market principles will encourage project parties to freely assemble various elements, such as the availability of combinations between public chains, L2 and Bitcoin, BTC L2 The fervor is proof of this.
If Near can do the work of DA, then high-performance public chains such as Aptos, Solana and Sui can also be "L2ized" and eventually be used by Ethereum. Square compatibility and annexation.
Parallel EVM can be understood as a parallelized EVM compatible chain/L2. We can start from the blockchain speed and theoretically solve the problem of blockchain There are only two ways to run slowly:
Add padding Hardware, constantly tuned. For example, Solana’s hardware configuration is uniquely high-end, and the management and configuration of the “computer room” allow Solana to enjoy ultra-high network speeds and increase throughput;
< /p>
Multi-core parallelism, multi-line concurrency. After the hardware is improved, multi-core can truly realize multi-tasking. In addition, efficiency can also be improved by continuously dividing tasks into details, which is also a common practice for computers.
Default hardware utilization has reached the extreme, so parallel EVM can be classified and understood from the following three levels:
Parallel is a common practice in the computer field and can be used by any public chain and L2 strong>. For example, Alt L1 such as Aptos, Sui and Solana, or Sei, which claims to be the first L1 compatible with EVM, as well as Ethereum L2 projects such as Scroll (2024 Roadmap), Lumio, Eclipse, and heterogeneous chains such as Neon EVM. EVM-compatible solution, Neon EVM belongs to the Solana ecosystem, and claims to be the first EVM-compatible solution.
Parallel EVM refers to L1/L2 that is compatible with EVM in a narrow sense. In theory, Ethereum itself can Parallel transformation can be implemented, which is the most consistent definition of parallel EVM, but the action is too large and almost impossible to exist;
Parallel EVM can be expanded in a broad sense to any parallel computing chain. Regardless of whether it is compatible with EVM or not, as long as it can open up the link with EVM, it can be included. For example, Aptos can be used as the "accelerator" of Ethereum.
Inspecting non-EVM compatible Alt L1 also has special significance. They can be connected to the EVM ecosystem. In addition, Aptos pioneered The Block-STM solution has also become the de facto template and source of ideas for many emerging parallel EVM solutions, which will be detailed below.
Preface: Popular explanation of threads, processes, parallelism, concurrency and EVM
I It is classified along the lines of dismantling parallel EVM, but the explanation of the concept of parallelism is still incomplete. If we directly talk about the logic of project implementation, it will be confusing, and it will simply make people faint with its clarity.
Similarly, explanations such as "A process is the smallest unit of resource allocation, and a thread is the smallest unit of CPU scheduling" are professional. , but it is also not very friendly to most people. I would like to take buying melons as an example to illustrate this process.
First of all, the bottom layer of our computer is the physical hardware, and above it is the operating system and various applications. When the computer handles tasks, it is based on priorities. Level allocate software and hardware resources. We use Huaqiang to buy melons to illustrate this process:
Huaqiang is riding a bicycle to buy a watermelon. This is a single behavior and the smallest unit. It is a thread. A watermelon is the physics that can be called at this time. There are too many hardware resources;
Two Huaqiang want to buy a watermelon together. This is a compound behavior, because there are two Huaqiang wants to eat the melon, but be aware that there is still only one watermelon at this time, and there will be no more. And the two Huaqiang made an appointment to chop watermelons together. Whoever doesn't go is not a brother. So at this time, two Huaqiang buying melons is a process, and each Huaqiang eating melons is still a thread, so one process includes two thread.
At this time, there is only one watermelon but multiple people need to eat it, which is concurrency. The focus here is that everyone eats the watermelon together. It is necessary to ensure that everyone can have at least one bite, because no matter how many people eat the melon, how they are divided into seats or in order, it will not affect the final result of one melon eating more.
If you are smart, you must have seen the problem. Why do so many people have to eat watermelon together? The owner of the watermelon stall is essentially the owner of the fruit shop. You You can also eat bananas. You are right. This is the reason why supply-side reform is needed. Now the boss has announced that bananas are also on the market. Then the physical resources (fruits) have increased at this time. Huaqiang can be divided into two columns to eat different ones. Fruits, this is parallel, two rows side by side, everyone eats what they like.
(Anti-collision statement: The above explanation is relatively popular but not professional. If there is any dispute, the programmer’s knowledge shall prevail. I am a dabbler. )
The next step is to combine them with EVM to assemble the true meaning of parallel EVM.
Although EVM is often mentioned, its true direction is unclear, especially the virtual machine (VM, virtual machine) always gives people a sense of reality. Xiang Xu feels that, in fact, to put it bluntly, a virtual machine is a specialized operating system. Programmers do not need to develop for physical entities, they only need to adapt at the software level.
To simplify, the function of EVM is transaction. The user submits instructions, and then EVM will interact with the smart contract according to the user's needs, such as transfer, SWAP, pledge or other needs. All actions will be executed one by one. The focus here is on instructions and execution one by one. EVM can understand the user's needs, but execution needs to be queued and the order cannot be changed at will.
So parallel EVM essentially changes the order of execution, allowing multiple smart contracts (instructions) to be executed at the same time, which is equivalent to the stall owner hiring workers to sell watermelons. The younger brother sells bananas, but in the end the money he makes belongs to the boss.
The most typical ones are the BTC L2 mentioned in my previous article. The current BTC L2 is basically Most of them want to connect Bitcoin to the EVM ecosystem. In fact, they themselves are a virtual machine on Bitcoin. Developers developing for them do not need to consider the limitations of Bitcoin's own architecture and programming language, and can use the familiar EVM for development. The process is completed in one step.
EVM is similar to this. To put it to the extreme, if you are a front-end, you can even do it without completely understanding the hardware, operating system principles, and Ethereum principles. For document development, you only need to understand the description of EVM development tools and interfaces, such as writing the front-end interface of a certain DEX (it is only a theoretical explanation, but it is actually very complicated).
In a nutshell, a virtual machine (VM) is a processing workshop that eliminates hardware and principles. For example, if Huaqiang buys melons to make watermelon juice, then virtual machine The machine is a juicer. A cup of watermelon juice only requires three steps: open the lid, add the watermelon, squeeze the juice, and you're done.
Similarly, EVM is the Ethereum juicer. EVM-compatible is the Pinduoduo replacement juicer bought by L1/L2. Although there are some flaws, But it can also be used, and parallel EVM is multiple juicers working together.
It's not that you can't afford it by hand, but the juicer is more cost-effective.
Finally, the concept of parallel EVM comes back to the world. Essentially, it is the speed limit brought by Ethereum that can only process a single transaction in sequence, and its main network TPS can only be stable. At around 10, more centralized EVM compatible chains such as BNB Chain (BSC) can only reach around 200. Under the premise that there is no revolutionary breakthrough in physical hardware and Ethereum itself cannot be transformed into a parallel mechanism, the parallel EVM competition Tao will be hot for a long time, after all, no one can be too fast.
Current situation: Optimistic verification has become the consensus, and the Move system is gradually coming to the rescue
Parallel and The concept of VM has long existed, but the introduction to blockchain, especially the concept of parallel EVM, actually started in 2022. Aptos released the paper "Block-STM: Scaling Blockchain Execution by Turning Ordering Curse to a Performance Blessing" , and then the Polygon PoS chain tried to add this feature at the end of the year. Not only that, many of the solutions and ideas proposed by Aptos in this paper have also become common choices in the industry and need to be introduced.
The starting point of the dream: Block-STM
It can be said that Aptos is the master of blockchain parallelization. Although Solana and Near have already explored it, the STM (software) applied by Aptos in the blockchain Transactional Memory (Software Transactional Memory) re-sorts the transactions. The core idea is to first assume that the sorted transactions are correct. After parallel execution, if any errors are found, individual errors can be solved separately. According to the 28-20 rule, most of the transactions Transactions can be executed at an accelerated pace. This so-called optimistic verification mechanism is basically the same idea as the optimistic verification mechanism in Rollup.
Specifically, Block-STM divides the execution process of the blockchain into two stages: Sequencing phase and execution phase.
In the sorting phase, Block-STM uses STM to sort transactions to ensure the Sequentiality;
In the execution phase, Block-STM uses the sorting results to execute transactions in parallel, thereby improving execution efficiency.
The parallel EVM since then is basically similar to this, except that there are implementation differences in sorting and execution, as well as Increase compatibility with EVM, such as Neon EVM and Polygon PoS.
Sui Transformation: Everything is an Object
Sui and Aptos They come from the same school, and they are highly similar, but the biggest difference is that Sui takes Object as the core. For example, in the transfer process from Alice to Bob, the function is as follows:
Aptos: Alice's account minus 1 USDT, Bob's account plus 1 USDT, involving the accounting information and balance changes of the two accounts;
Sui: 1 USDT remains unchanged, only its ownership attributes are changed, and the ownership is changed from Alice to Bob, which only involves the information of 1 USDT Change;
As you can see, the starting point of Sui is not to examine the accounts of both parties to the transaction, but to involve changes in the properties of the object. From this promotion, it is not only the transfer of tokens, but also assets such as NFT.
Extending it further, if an asset only involves attribute changes between points, there is no need to synchronize all nodes, as long as both parties recognize the transaction, so As a result, such transactions can be processed in parallel.
Of course, the specific implementation of the two is much more complicated, and parallelism will also bring many problems, but it is enough to understand this.
Solana and Neon EVM: Backdoor listing
Solana itself Parallel processing is achieved through the Sea Level mechanism, which is similar to Block-STM (in fact, it should be reversed, Sea Level was proposed in 2019, and Block-STM was proposed in 2022), both of which require transactions to be sorted and then executed.
Solana's "innovation" lies in the special optimization of hardware resources. In theory, not only can all instructions be sorted, but the optimized multi-threading can also use the processor The full performance can achieve high concurrency. The theoretical TPS value is 50,000, and the measured peak value can reach about 5,000.
So how does this relate to Neon EVM?
What Neon has to do is synchronize the EVM transaction information, and then use Solana to calculate it, so that both Taking advantage of the dApp richness and security of the EVM ecosystem, you can also use Solana to speed up and reduce fees. Compared with the expensive and slow Ethereum main network, Neon's authorization, transfer, deposit and borrowing are basically below 0.1 or even 0.01 US dollars.
It is not appropriate to say that Neon turns Solana into an alternative L2 of Ethereum. By analogy, L1/L2 EVM can not only achieve parallelism by itself, but also can As an intermediary, you are only responsible for compatibility with EVM or only L1/L2, and outsource the rest.
This is also what I said at the beginning, the true meaning of generalized modularization, L1/L2 parallel EVM can be a combination of three projects, or even cross-platform Chain combination, in this way, the gameplay is diverse.
Sei V2 and Monad: happy together, byte compatible
In terms of technical implementation, Sei V2 and Monad are very similar. Both are byte-level compatible EVMs for Ethereum. In fact, in terms of parallel thinking, they both choose the familiar optimistic verification, sort first, and execute If an error occurs, the dependencies will be resolved separately.
Of course, mature products and ideas can be used by everyone, but be careful, like BTC Like L2, there are not many real technological innovations, and they are still mainly based on "combination". Solana is the only L1 that practices parallelism on a large scale and has a combination of software and hardware to achieve high concurrency effects. The others are more "compatible with EVM + parallelism" set of outfits.
You can definitely think that since Solana can be used as an accelerator, so can Aptos. In fact, Lumio thinks so too. As long as it acts as an intermediary, it can be used as an accelerator. If it is compatible with EVM and achieves parallelism, it can be called parallel EVM. Therefore, I will not explain too much about Lumio.
Conclusion: The Dilemma of Parallel EVM
In this article, I focus on parallelism The core of EVM is the allocation of hardware resources and the sequencing and execution of tasks. Both are indispensable. The upper limit of software optimization is the parameter limit of the physical hardware. After all, Bolt cannot exceed the speed of light, but parallel EVM is currently mainly for Aptos. The transformation and imitation of Block-STM is also a basic fact.
In addition, there is currently no need to over-explore parallel practices on Ethereum L2. They need to solve the centralization problem of the sequencer, and the efficiency is already high enough.
Parallel EVM is not mysterious. I have omitted technical details such as reading and writing mechanism design, TPS comparison, data recording and status synchronization of each project in the text. Ordinary people do not need to understand these things at all. Keep in mind that the current optimistic verification is full of enthusiasm. Optimistic verification is to execute first and then troubleshoot. If there is an update, I will add it to everyone in time.
References:
Sealevel — Parallel Processing Thousands of Smart Contracts
awesome-parallel-blockchain
Parallel Computing
Introduction to Parallel Computing Tutorial
li>
Sei v2 - The First Parallelized EVM Blockchain
https://docs.monad.xyz/
MT Capital: Understanding Parallel EVM: Project Overview and Future Perspectives
Parallel Power Unlocked
https:/ /neonevm.org/whitepaper.pdf
Block-STM: Scaling Blockchain Execution by Turning Ordering Curse to a Performance Blessing
Innovating the Main Chain: a Polygon PoS Study in Parallelization
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