Is EVM not the only parallel? High-performance L1 (Sui) battles against Ethereum L2?

CN
1 year ago

The competition of Alt L1 has already heated up, with Near launching the DA solution, Sui's TVL soaring, and only Ethereum is still slowly upgrading the mainnet. L2 has emerged as a competition point with parallel EVM and decentralized sequencers.

By: Zuo Ye

The basic fact in the present and future is that Ethereum's position is already difficult to shake. The concept of modularity will become generalized. If Vitalik's suppression of Celestia is unsuccessful, the market will choose the best, and the combination and modularization will not only occur within the same system. Market principles will prompt project parties to freely assemble various components, such as the combination usability between various public chains, L2, and Bitcoin. The popularity of BTC L2 is a clear example.

If Near can handle the DA work, then high-performance public chains such as Aptos, Solana, and Sui can also be "L2-ized," and ultimately be compatible with and absorbed by Ethereum.

Parallel EVM can be understood as a parallel EVM-compatible chain/L2, which can start with blockchain speed. Theoretically, there are only two ways to solve the slow operation of the blockchain:

  • Increase hardware and continuously optimize it. For example, Solana's hardware configuration is top-notch, and the management and configuration of "data centers" can allow Solana to enjoy ultra-high network speed and increase throughput.
  • Multi-core parallelism and multi-thread concurrency. After hardware improvement, multiple cores can truly achieve multitasking. In addition, continuously dividing and refining tasks can also improve efficiency, which is a common practice in computer science.

If hardware utilization has reached its peak, then parallel EVM can be classified and understood from the following three levels:

  1. Parallelism is a common practice in the computer field and can be used by any public chain and L2. For example, Alt L1 such as Aptos, Sui, and Solana, or Sei, which claims to be the first EVM-compatible L1, as well as upcoming Ethereum L2 projects such as Scroll (2024 roadmap), Lumio, Eclipse, and other EVM-compatible solutions on heterogeneous chains like Neon EVM, which belongs to the Solana ecosystem and also claims to be the first EVM-compatible solution.
  2. Narrowly speaking, parallel EVM refers to L1/L2 that can be compatible with EVM. Theoretically, Ethereum itself can also implement parallel transformation, which is the most accurate definition of parallel EVM, but it is almost impossible due to the significant impact.
  3. Broadly speaking, parallel EVM can be extended to any parallel computing chain, regardless of whether it is compatible with EVM. As long as it can establish a connection with EVM, it can be included. For example, using Aptos as an "accelerator" for Ethereum.

Examining non-EVM-compatible Alt L1 also has special significance, as they can be integrated into the EVM ecosystem. In addition, the Block-STM solution pioneered by Aptos has become the actual template and source of ideas for many emerging parallel EVM solutions, which will be detailed in the following text.

Preface: A layman's explanation of threads, processes, parallelism, concurrency, and EVM

I have classified them according to the breakdown of parallel EVM, but the explanation of parallel concepts is still incomplete. If I directly explain the logic of project implementation next, it will be confusing and difficult to understand, just like shining a light to make people dizzy.

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 not very friendly to most people. I want to use buying melons as an example to explain this process.

First, let's lay the groundwork. Our computer's lowest level is physical hardware, and above that are the operating system and various applications. When a computer processes tasks, it allocates software and hardware resources based on priority. Let's use Huaqiang buying a melon to illustrate this process:

Relationship between threads, processes, parallelism, and concurrency

  1. Huaqiang rides a bike to buy a watermelon, which is a single action and the smallest unit, a thread. At this time, a watermelon is the physical hardware resource that can be called, and there is no more available.
  2. Two Huaqiangs want to buy a watermelon together, which is a compound behavior because there are two Huaqiangs who want to eat melon. However, it is important to note that there is still only one watermelon available. Additionally, the two Huaqiangs have agreed to buy the watermelon together, so if one doesn't go, they are not brothers. Therefore, the two Huaqiangs buying melon together is a process, and each Huaqiang eating melon is still a thread. Thus, one process includes two threads.

At this point, when there is only one watermelon but multiple people want to eat it, this is concurrency. The key here is that everyone eats the watermelon together, ensuring that each person can at least take a bite. Regardless of how many people are eating the melon and how they are seated or the order in which they eat, it does not affect the final result of sharing one melon among many.

You must have noticed the problem. Why do so many people have to eat watermelon together? The boss of the watermelon stand is essentially a fruit shop owner. You can also eat bananas. That's right, this is the reason for the need for supply-side reform. Now the boss announces that bananas are also available. At this point, the physical resource (fruit) has increased, and Huaqiang can be divided into two lines to eat different fruits. This is parallelism, with two lines running parallel, each eating what they like.

(Disclaimer: The above explanation is relatively simple but not professional. In case of dispute, the programmer's understanding prevails. I come from a semi-professional background.)

Next, I will combine them with EVM to assemble the true meaning of parallel EVM.

Although EVM is often mentioned, its true meaning is unclear, especially since the virtual machine (VM) always gives people a sense of detachment from reality. In fact, not to be too serious, a virtual machine is a specialized operating system. Programmers do not need to develop based on physical entities but only need to adapt at the software level.

To simplify, the role of EVM is transactions. Users submit instructions, and then EVM will execute each user's needs, such as transfers, swaps, staking, or other interactions with smart contracts. The key here is the instructions and execution. EVM can understand the user's needs, but execution requires queuing and cannot be changed arbitrarily.

Therefore, parallel EVM fundamentally changes the execution order, allowing multiple smart contracts (instructions) to run simultaneously, similar to the boss of a fruit stand hiring workers. He sells watermelons, and his assistant sells bananas. In the end, the boss still makes money.

Explanation of EVM

The most typical example is the BTC L2s I mentioned in my previous article. Most BTC L2s now aim to integrate into the EVM ecosystem. In fact, they are virtual machines on Bitcoin. Developers can develop for them without considering the limitations of Bitcoin's own architecture and programming language, using familiar EVM development processes to achieve their goals in one step.

EVM follows the same logic. In an extreme case, if you are a front-end developer, you can even develop without understanding hardware, operating system principles, or Ethereum principles. You only need to understand the EVM development tools and interface instructions, such as creating a front-end interface for a DEX (this is only a theoretical explanation and is actually very complex).

In short, a virtual machine (VM) is a workshop that excludes hardware and principles. For example, if Huaqiang wants to make watermelon juice, then the virtual machine is the juicer. Making a glass of watermelon juice only requires three steps: open the lid, put in the watermelon, and juice it, done.

Similarly, EVM is Ethereum's juicer, and being compatible with EVM is like buying a juicer from a different brand to replace the original one. Although there are some flaws, it can still be used. Parallel EVM is like multiple juicers working together.

It's not that manual operation is not affordable, but the juicer is more cost-effective.

Finally, the concept of parallel EVM has re-emerged, essentially addressing the speed limitation caused by Ethereum's sequential processing of single transactions. The mainnet TPS of Ethereum can only stabilize at around 10, and more centralized EVM-compatible chains like BNB Chain (BSC) can only reach around 200. Without revolutionary breakthroughs in physical hardware and the inability of Ethereum itself to be transformed into a parallel mechanism, the parallel EVM track will remain hot for the long term. After all, no one will complain about faster speeds.

Current Situation: Optimistic validation becomes consensus, Move system gradually shows signs of recovery

The concepts of parallelism and VM have long existed, but when introduced to the blockchain, especially the concept of parallel EVM, it actually started in 2022 when Aptos released the paper "Block-STM: Scaling Blockchain Execution by Turning Ordering Curse to a Performance Blessing." Later, the Polygon PoS chain attempted to incorporate this feature at the end of that year. Not only that, many of the solutions and ideas proposed by Aptos in this paper have become industry common choices and need to be introduced.

Parallel EVM-related projects and classifications

Dream Start: Block-STM

It can be said that Aptos is the culmination of blockchain parallelization. Although Solana and Near have made some explorations, Aptos is the first to apply STM (Software Transactional Memory) to re-sort transactions in the blockchain. The core idea is to assume that the sorted transactions are correct and then parallelize the execution. If any are found to be incorrect, they are individually resolved. According to the Pareto principle, this approach accelerates the execution of most transactions, known as the optimistic validation mechanism, which is basically consistent with the optimistic validation mechanism in Rollup.

Block-STM

Specifically, Block-STM divides the blockchain execution process into two stages: the sorting stage and the execution stage.

  • In the sorting stage, Block-STM uses STM to sort transactions to ensure their order.
  • In the execution stage, Block-STM uses the sorting results to execute transactions in parallel, thereby improving execution efficiency.

Most subsequent parallel EVM implementations are similar to this, with differences in sorting and execution, as well as the need to increase compatibility with EVM, such as Neon EVM and Polygon PoS.

Sui Transformation: Everything is an Object

Sui and Aptos are very similar, but the main difference is that Sui focuses on objects. For example, in the process of Alice transferring funds to Bob:

  • Aptos: Alice's account decreases by 1 USDT, and Bob's account increases by 1 USDT, involving the accounting information and balance changes of two accounts.
  • Sui: 1 USDT remains unchanged, only the ownership attribute changes from Alice to Bob, involving only the information change of 1 USDT.

As you can see, Sui's starting point is not to examine the accounts of the transacting parties, but to involve changes in the attributes of objects. This can be extended to not only token transfers but also assets such as NFTs.

Furthermore, if an asset only involves changes in attributes between two parties, it does not actually require synchronization of the full node. As long as both parties agree to the transaction, such transactions can be processed in parallel.

Of course, the specific implementation of both approaches is much more complex, and parallelism also brings many challenges, but understanding this point is sufficient for now.

Solana and Neon EVM: Listing by Borrowing the Shell

Solana's parallel processing is achieved through the Sea Level mechanism, similar to Block-STM (in fact, Sea Level was proposed in 2019, while Block-STM was proposed in 2022). Both require sorting transactions before execution. Solana's "innovation" lies in the specialized optimization of hardware resources. Theoretically, it can not only sort all instructions but also utilize the optimized multi-threading to fully utilize the processor's capabilities, achieving high concurrency with a theoretical TPS of 50,000 and a peak measurement of around 5,000.

So, what is the relationship between this and Neon EVM?

Neon EVM costs

Neon's task is to synchronize transaction information with EVM and then use Solana for computation. This approach allows the richness and security of the EVM ecosystem for dApps, as well as the acceleration and cost reduction provided by Solana. Compared to the expensive and slow Ethereum mainnet, authorization, transfers, and deposits on Neon cost around 0.1 or even 0.01 USD.

In a somewhat inappropriate analogy, Neon has turned Solana into an alternative L2 for Ethereum. By extension, L1/L2 EVM can not only implement parallelism on their own but can also act as intermediaries, only focusing on EVM compatibility or L1/L2, and outsourcing the rest.

This is the true meaning of generalized modularity that I mentioned at the beginning. L1/L2 parallel EVM can be a combination of three projects, or even a cross-chain combination. This opens up a variety of possibilities.

Sei V2 and Monad: Happy Together, Byte-Compatible

In terms of technical implementation, Sei V2 and Monad are very similar. Both are byte-level EVM-compatible with Ethereum. In terms of parallel thinking, both independently chose familiar optimistic validation, sorting first, executing what can be executed, and then individually resolving dependencies if errors occur.

Sei V2 parallel solution explanation

Of course, mature products and ideas can be used by everyone, but it is important to note that, like BTC L2, there are not many truly innovative technologies. It is still mainly about "combination." Solana is the only L1 that has implemented parallelism on a large scale and achieved high concurrency through the combination of software and hardware. Others are more like "EVM-compatible + parallel" package deals.

It is certain that since Solana can be used as an accelerator, Aptos and others can do the same. In fact, Lumio also thinks this way. As long as they act as intermediaries, being EVM-compatible on one side and implementing parallelism on the other, they can all be called parallel EVM. Therefore, I won't go into much detail about Lumio.

Conclusion: The Predicament of Parallel EVM

In this article, I emphasized that the core of parallel EVM is the allocation of hardware resources and the sorting and execution of tasks. Both are indispensable, and the upper limit of software optimization is the parameter limitation of physical hardware. After all, even Usain Bolt cannot surpass the speed of light. However, the current parallel EVM mainly revolves around the transformation and imitation of Aptos' Block-STM, which is a basic fact.

Furthermore, there is no need to excessively explore parallel practices on Ethereum L2 at the moment. They need to address the centralization of sequencers, as their efficiency is already high.

Parallel EVM is not mysterious. I have omitted the design of the read-write mechanism, TPS comparison, data recording, and state synchronization in the text. It is completely unnecessary for ordinary people to understand these things. Just remember that we are currently in the era of optimistic validation, where the idea is to execute first and then correct errors. If there are updates, I will promptly supplement them for everyone.

References:

Sealevel — Parallel Processing Thousands of Smart Contracts

awesome-parallel-blockchain

Parallel Computing

Introduction to Parallel Computing Tutorial

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

https://github.com/MystenLabs/sui/blob/main/doc/paper/sui.pdf

Built for Speed: Under the Hoods of Aptos and Sui

Innovating the Main Chain: a Polygon PoS Study in Parallelization

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Bitget:注册返10%, 送$100
Ad
Share To
APP

X

Telegram

Facebook

Reddit

CopyLink