Original Title: "Parallel Execution: The Next Generation of Blockchains"
Authors: Paul Timofeev, Mike Jin, Gabe Tramble
Translator: Chris, Techub News
Blockchain is a virtual machine, a computational model of software infrastructure that runs on a distributed physical computer network that anyone can join but is extremely difficult to control by a single entity. The concept of blockchain was initially proposed in the Bitcoin white paper published by Satoshi Nakamoto in 2008, as the core infrastructure supporting the encrypted secure peer-to-peer payments in Bitcoin. For blockchain, transactions are like logs of social media and internet companies; they are records of specific network activities, with the key difference being that transactions on the blockchain are immutable and typically publicly queryable.
What Exactly Are Transactions
Transactions on the blockchain involve transferring digital assets from one address to another on a distributed ledger, a process protected by public key cryptography. Transactions can be used not only for decentralized peer-to-peer transfers but also for various authentication and verification processes.
An example of a transaction that anyone can observe on blockchain browsers like SeiTrace
How Blockchain Transactions Work
When Bob decides to send tokens to Alice, his action is immediately broadcast to the entire blockchain network. During this process, specific nodes in the network (validator nodes) become active, verifying the validity of the transaction. Once a sufficient number of nodes confirm the transaction's accuracy, it is recorded in a new block and packaged with other users' transactions. Once the block is filled, it is permanently added to the blockchain, hence the name of the technology. This allows Bob and Alice to verify their transaction details on this persistent, publicly accessible ledger.
In the blockchain, each transaction carries metadata that helps nodes in the network identify and execute specific instructions and parameters. Transactions typically include high-level data such as transfer amount, receiving address, and the digital signature used to verify the transaction, as well as automatically generated underlying data, the specific content of which varies depending on the network design.
Although these processes are generally applicable, the specific execution details vary depending on the blockchain architecture used.
For example, in traditional blockchains like Ethereum, there is a mechanism called the mempool. The mempool is essentially a cache or "waiting area" used to store transactions that have not yet been included in a block.
Here is the general lifecycle of transactions in blockchains that use the mempool:
- User initiates and signs the transaction.
- Validator nodes in the blockchain network check the validity of the transaction and ensure the parameters are correct.
- Once validated, the transaction enters the public mempool, waiting to be packaged with other pending transactions.
- Based on the transaction's gas fee and the fees of other transactions in the mempool, it is determined which transactions will be included in the next block. Once included, the transaction status becomes "successful."
- After a period of time or reaching a certain block generation threshold, the block is finally confirmed, and the transaction is permanently recorded on the blockchain, unless extreme situations like a 51% attack occur, in which case the information is immutable.
No Mempool (Solana)
In contrast to the above, some blockchain platforms like Solana do not use a mempool and instead send transactions directly to block producers, aiming to increase processing speed and throughput by continuously generating blocks.
Let's continue to understand the lifecycle of transactions on non-mempool blockchains:
- Users initiate and sign transactions while using the application.
- The application routes the transaction information to remote procedure call (RPC) servers.
- The RPC provider sends the transaction to the currently designated block producer and the next three producers; this is a precautionary step in case the current first block producer is unable to execute the transaction in a timely manner.
- The block producer then sends the signed transaction to consensus nodes for validation.
- Consensus nodes vote to validate the transaction content, and once completed, the transaction status is routed back to RPC > application > user, displayed as "successful" or "failed."
- Similar to blockchains based on the mempool, the block itself is finally confirmed after a certain time or based on a block threshold.
Sequential Execution
Older blockchains, especially Bitcoin and Ethereum, use a sequential execution mechanism for transactions. Each transaction added to the blockchain causes a change in the network state, and for security purposes, the structure of the virtual machine processes only one state change at a time.
This has led to a significant bottleneck in the underlying network throughput, as the number of transactions that can be added to a block is limited, resulting in longer wait times, soaring transaction costs, and sometimes rendering the network unusable. Additionally, the sequential execution model has relatively low efficiency in utilizing hardware components, thus unable to benefit from breakthroughs in computation, such as multi-processor cores.
Parallel Execution
Parallel computing is a key technology in computer architecture, with its development dating back to the late 1950s, and its underlying ideas and theories tracing back to 1837. This technology allows multiple processing units to work simultaneously to solve a single problem, achieving more efficient task completion than traditional serial processing by breaking down large, complex tasks into smaller chunks.
Initially applied mainly in high-performance computing systems, parallel computing has become the mainstream mode of modern computer architecture with the advent of the internet era, exponential growth in computational demands, and the physical limits of processor speed improvements in recent decades.
In blockchain technology, this parallel processing mode is also adopted, primarily used to simultaneously process and execute multiple transactions or value transfers from one smart contract to another, hence termed "parallel execution."
The concept of parallel execution enables blockchain to process multiple non-conflicting transactions simultaneously, greatly increasing network throughput, enhancing its scalability, and enabling blockchain to more effectively handle higher activity levels and larger block demands.
This can be understood through a simple analogy: imagine a grocery store with multiple checkout lanes for customers to use, which is clearly more efficient than having only one lane. This parallel processing approach improves overall processing efficiency and customer satisfaction.
Why Parallel Execution Is Important
In blockchain technology, the main goal of implementing parallel execution is to enhance network processing speed and overall performance, especially when facing high traffic and numerous resource requests. For example, in the cryptocurrency ecosystem, when Bob intends to create the latest popular NFT series and Alice wants to purchase her favorite meme coin, the blockchain network can respond to both operations simultaneously without sacrificing performance or user experience.
While this capability may seem like a simple feature to enhance user experience, it fundamentally paves the way for developing new creative applications and use cases by improving network efficiency. These applications and use cases can leverage low latency and high processing capabilities, providing an important foundation for introducing a broader user base into the cryptocurrency ecosystem, indicating the transition of cryptographic technology to more widespread applications.
How Parallel Execution Works
While the premise of parallel execution is relatively simple, subtle differences in the underlying blockchain design can affect the performance of the parallel execution process itself. The most relevant feature of a blockchain designed with parallel execution is the ability for transactions to access its underlying network state, including account balances, storage, and smart contracts.
Parallel execution in blockchain can generally be divided into two types: deterministic parallel execution and optimistic parallel execution. Deterministic parallel execution, as used in Solana, requires transactions to explicitly declare all their memory dependencies before execution, meaning the specific parts of the global state they need to access. This approach, while adding burden to developers, allows the network to sort and identify non-conflicting transactions before execution, resulting in a predictable and more efficient system. On the other hand, optimistic parallel execution assumes that all transactions proceed without conflicts, which can speed up transaction processing, but may require transactions to be re-executed if conflicts arise. When two conflicting transactions are discovered—transactions attempting to access the same network state—the system can choose to reprocess these transactions, either in parallel or in sequence.
To gain a deeper understanding of the impact of these designs, analyzing parallel execution from the perspective of teams driving the forefront of parallel execution today may be helpful.
Current Landscape of Parallel Execution
Solana Virtual Machine (SVM)
Solana is the first blockchain network designed around parallel execution, inspired by founder Anatoly Yakovenko's past experience in the telecommunications industry. Solana aims to provide a development platform with as fast a runtime as possible, making parallel computing speed and efficiency a straightforward design choice.
The key component enabling Solana's fast and high throughput is Sealevel, the network's parallel smart contract runtime environment. Unlike environments based on EVM and WASM, Sealevel uses a multithreaded architecture, allowing it to process multiple transactions simultaneously within the capacity of validator cores.
The key to Solana's parallel execution is that when a transaction is initiated, the network assigns a series of instructions to be executed for that transaction, specifying which accounts and states to access and what changes to make—this is crucial for determining which transactions are non-conflicting and can be executed simultaneously, while also allowing transactions attempting to access the same state to proceed simultaneously.
Solana also utilizes Cloudbreak, its custom accountsDB, to store and manage state data to support concurrent read and write transactions. Cloudbreak is optimized for parallel execution, able to scale horizontally across multiple nodes to distribute and manage state data.
Thanks to its parallel architecture, Solana can handle a large number of transactions while still executing quickly, providing near-instant finality for transactions. Solana currently averages processing 2,000 to 10,000 transactions per second (TPS). Additionally, with teams like Eclipse introducing Layer 2 infrastructure aimed at leveraging SVM as the execution environment, use cases for SVM are slowly but steadily expanding.
Parallel EVM
Parallel EVM describes a new blockchain execution environment designed to combine the best of both Solana and Ethereum, with the speed and performance of Solana and the security and liquidity of Ethereum. By processing transactions in parallel rather than in the traditional EVM sequential order, Parallel EVM enables developers to build applications on a high-performance network while leveraging connectivity with EVM liquidity and developer tools.
Sei Network
Sei Network is an open-source Layer1 blockchain compatible with EVM, supporting various decentralized applications built around high performance. Sei aims to provide fast speed and low cost for users and developers, with parallel execution being a key component in achieving this performance and user experience. Currently, Sei offers a block confirmation time of 390 milliseconds and has processed over 1.9 billion transactions on its Pacific mainnet.
Initially, Sei adopted a deterministic parallel execution model, where smart contracts declare in advance the state access they require, allowing the system to run non-conflicting transactions simultaneously. With the arrival of their V2 upgrade, Sei is transitioning to an optimistic parallel model, meaning all transactions will be processed in parallel upon submission to the network (execution phase), then analyzed and verified for conflicts with previous transactions. If two or more conflicting transactions are found—transactions attempting to access the same network state—Sei identifies these conflict points and re-executes the transactions either in parallel or in sequence, depending on the nature of the conflict.
To store and maintain transaction data, Sei is also introducing SeiDB, a custom database designed to improve on the shortcomings of the v1 version through optimized parallel execution. SeiDB aims to reduce the overhead of storing redundant data and maintain efficient disk usage to improve network performance. V2 reduces the amount of metadata required for tracking and storing, and enables a write-ahead log to help recover data in the event of a crash.
Finally, Sei recently announced the launch of its Parallel Stack, an open-source framework to enable Layer 2 scaling solutions (such as rollups) to leverage and benefit from parallel execution.
Monad
Monad is an upcoming parallel EVM Layer 1 blockchain, providing full bytecode and RPC compatibility for Ethereum applications and infrastructure. Through innovative technologies, Monad aims to provide a more interactive experience than existing blockchains, with a block time of 1 second and finality of up to 10,000 TPS, while keeping transaction costs relatively low. Monad implements parallel execution and superscalar pipeline technology to optimize transaction speed and throughput. Similar to Sei v2, Monad will adopt an optimistic execution model, meaning the network will begin executing all incoming transactions simultaneously, then analyze and verify transactions to find conflicts and re-execute accordingly, with the ultimate goal that if transactions were executed sequentially, the result would be the same.
It's worth noting that while staying in sync with Ethereum, Monad will order transactions in blocks linearly and update each transaction sequentially.
To more effectively maintain and access blockchain data than the current Ethereum client provides, Monad has created its custom MonadDB, built specifically for the blockchain. MonadDB leverages advanced Linux kernel features to achieve efficient asynchronous disk operations, eliminating the limitations of synchronous input/output access. MonadDB provides asynchronous I/O access, a key feature for achieving parallel execution, allowing the system to start processing the next transaction while waiting to read the state of previous transactions.
A simple analogy is cooking a multi-step meal (such as spaghetti and meatballs). The steps involved are 1) preparing the sauce, 2) cooking the meatballs, and 3) boiling the noodles. An efficient chef would first boil water for the noodles, then prepare the sauce ingredients, then cook the noodles in the now boiling water, followed by cooking the sauce, and finally the meatballs, rather than completing one step at a time and moving on to the next after each task is completed.
Move
Move is a programming language initially developed by the Facebook team in 2019 for the now-defunct Diem project. Move aims to handle smart contracts and transaction data in a secure manner, eliminating inherent attack vectors present in other languages, such as reentrancy attacks.
MoveVM, as the local execution environment for Move-based blockchains, utilizes parallelization to provide faster transaction execution speed and higher overall efficiency.
Aptos
Aptos is a Layer1 blockchain based on Move, developed by former Diem project members, providing a high-performance environment for application developers through parallel execution. Aptos utilizes Block-STM, a modification of software transaction memory (STM) concurrency control mechanism.
Block-STM is a multi-threaded parallel execution engine that allows optimistic parallel execution. Transactions within blocks are pre-sorted and strategically ordered, crucial for effectively resolving conflicts and re-executing transactions. Aptos' research has found that parallelization using Block-STM theoretically supports up to 160,000 TPS.
Sui
Similar to Aptos, Sui is a Layer 1 blockchain developed by former Diem project members, also using the Move language. However, Sui adopts a custom Move implementation that changes the storage model and asset permissions from the original Diem design. Specifically, this allows Sui to represent independent transactions as objects using a state storage model. Each object in Sui's execution environment has a unique ID, allowing the system to easily identify non-conflicting transactions and process them in parallel.
Similar to Solana, Sui implements deterministic parallel execution, requiring transactions to declare in advance the accounts they need to access.
Movement Labs
Movement is building a set of developer tools and blockchain infrastructure services to enable easy access to the benefits of building on Move. As an AWS-like execution-as-a-service platform for Move developers, Movement incorporates parallelization as a core design feature to achieve higher throughput and greater overall network efficiency. MoveVM is a modular execution environment that allows blockchain networks to scale and adjust their transaction processing capabilities as needed to support growing transaction volumes, enhancing their ability to process and execute transactions in parallel.
Movement will also launch M2, a ZK-rollup that interoperates with EVM and Move clients. M2 will inherit the Block-STM parallelization engine and is expected to achieve tens of thousands of TPS as a result.
Challenges of Parallel Systems
In the development of parallel blockchain technology, several key issues and trade-offs must be considered:
What trade-offs has the network made to achieve better performance through parallel execution?
Fewer validators protecting the network can speed up verification and execution, but does this sacrifice the security of the blockchain, making it more vulnerable to attacks by validators?
Is there a large number of validators sharing addresses? This is a strategy common in both encrypted and non-encrypted systems to minimize latency, but what happens if a specific data center is threatened?
For optimistic parallel systems, will the process of re-executing invalid transactions become a bottleneck as the network scales? How is this efficiency tested and evaluated?
At a high level, parallel blockchains face the risk of inconsistent ledgers, i.e., double spending and changes in transaction order (in fact, this is a major benefit of sequential execution). Deterministic parallelization addresses this issue by creating an internal labeling system for transactions on the underlying blockchain. Blockchains implementing optimistic processing must ensure that their mechanisms for validating and re-executing transactions are secure and effective, and can reasonably balance performance.
Future Outlook
The history of computing tells us that over time, parallel systems often prove to be more efficient and scalable than sequential systems. The rise of parallel blockchains after Solana emphasizes that this concept also applies to cryptographic infrastructure. Even Vitalik has mentioned parallelization as a potential key solution to improve the scalability of EVM rollups. Broadly speaking, the adoption growth of crypto/blockchain requires systems that are superior to those available today, including parallel blockchains. Solana's recent network challenges highlight significant room for improvement in parallel blockchain development. As more teams seek to push the boundaries of on-chain innovation and introduce the next wave of large-scale user adoption into native blockchain applications and ecosystems, the parallel execution model provides an intuitive framework for building systems capable of efficiently handling network activity levels and easily matching the scale of Web2 companies.
免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。