Why will parallelization be the next generation blockchain solution?

All articles6个月前更新 wyatt
39 0 0
The history of computing tells us that parallel systems tend to be more efficient and scalable over time than sequential systems.

By Paul Timofeev, Mike Jin, Gabe Tramble

Compiled by: Chris, Techub News

BlockchainIt is a virtual machine, a software-based computing model that runs on a distributed physical computer network that anyone can join but is extremely difficult to control by a single entity.BlockchainThe concept was first proposed in the Bitcoin white paper published by Satoshi Nakamoto in 2008 as a means of supporting encryption in Bitcoin.SafetyThe core infrastructure for peer-to-peer payments.BlockchainFor , transactions are like logs for social media and internet companies; they are records of specific network activity, with the key difference beingBlockchainTransactions on the blockchain are immutable and usually publicly searchable.

What is a transaction?

Transactions on the blockchain involve the transfer of digital assets from one address to another on the 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 a blockchain explorer such as SeiTrace

How blockchain transactions work

When Bob decides to send AliceTokenWhen Bob and Alice make a transaction, their action is immediately notified to the entire blockchain network. During this process, specific nodes in the network (validation nodes) come into play, and they verify the validity of the transaction. After a sufficient number of nodes confirm that it is correct, the transaction 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. In this way, Bob and Alice can check the details of their transactions on this persistent, public ledger.

In the blockchain, each transaction carries metadata, which helps nodes in the network identify and implement specific instructions and parameters. Transactions usually include high-level data such as the transfer amount, the receiving address, and a digital signature used to verify the transaction, as well as other low-level data that is automatically generated.Xiaobai NavigationThe content varies according to different network designs.

While these processes are generally applicable, the specific implementation details will vary depending on the blockchain architecture used.

For example, in traditional blockchains such as Ethereum, there is a mechanism called a mempool. Mempool is essentially a buffer or "waiting area" for transactions that have not yet been included in a block.

Here is the general lifecycle of a transaction in a blockchain using a mempool:

  • The user initiates and signs a transaction.

  • The blockchain network's validating nodes check the validity of transactions and ensure that the parameters are correct.

  • Once verified, the transaction enters the public memory pool and waits to be packaged with other pending transactions.

  • according toexchangeThe gas fee paid is compared with the fees of other transactions in the memory pool to ultimately decide which transactions will be packaged into the next block. Once packaged, the transaction status changes to "successful".

  • After a period of time or when a certain block generation threshold is reached, the block is finally confirmed and the transaction is permanently recorded on the blockchain. Unless in extreme cases such as the 51% attack, the information cannot be changed.

No mempool (Solana)

In contrast to the above, some blockchain platforms like Solana do not use a memory pool, but instead send transactions directly to block producers, which aims to increase processing speed and throughput by continuously generating blocks.

为什么并行化将会是下一代的区块链解决方案?

Let’s continue with the transaction lifecycle on a non-mempool blockchain:

  • Users initiate and sign transactions while using the application.

  • The application routes the transaction information to the remote procedure call (RPC) server.

  • The RPC provider sends the transaction to the currently designated block producer, as well as the next three producers; this is a precautionary step in case the current first block producer is unable to execute the transaction in time.

  • The block producers then send the signed transactions to the consensus nodes for verification.

  • Consensus nodes vote to validate the transaction content, and once completed, the transaction status is routed back to RPC > Application > User and displayed as "Success" or "Failure".

  • Similar to mempool-based blockchains, the blocks themselves are finalized after a certain amount of time or block-based threshold is passed.

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 state of the network and isSafetyFor this purpose, the structure of the virtual machine handles only one state change at a time.

为什么并行化将会是下一代的区块链解决方案?

This leads to a significant bottleneck in the throughput of the underlying network, as the number of transactions that can be added to a block is limited, resulting in longer wait times, skyrocketing transaction costs, and sometimes even making the network unusable. In addition, the sequential execution model uses hardware components quite inefficiently and therefore cannot benefit from breakthrough advances in computing, such as multiple processor cores.

为什么并行化将会是下一代的区块链解决方案?

Parallel execution

Parallel computing is a key technology in computer architecture, and its development can be traced back to the late 1950s, while the ideas and theories behind it can be traced back to 1837. This technology allows multiple processing units to work simultaneously to solve a single problem, breaking down large and complex tasks into smaller pieces, which can be completed more efficiently than traditional serial processing.

Initially, this technology was mainly used in high-performance computing systems, but with the advent of the Internet era and the exponential growth of computing needs, coupled with the physical limits of processor speed increases in recent decades, parallel computing has become the mainstream mode of modern computer architecture.

In blockchain technology, this parallel processing mode is also adopted, mainly used to process and execute multiple transactions at the same time or from one smartcontractTo another smartcontractThe value transfer is therefore called "parallel execution".

The concept of parallel execution enables blockchain to process multiple non-conflicting transactions simultaneously, which greatly improves the throughput of the network and enhances its scalability, allowing blockchain to more efficiently cope with higher activity and larger block demands.

This can be understood through a simple metaphor: imagine a grocery store with multiple checkout lanes for customers to use. In comparison, only one lane is obviously much less efficient. This parallel processing method improves overall processing efficiency and customer satisfaction.

Why parallel execution is important

In blockchain technology, the main goal of implementing parallel execution is to improve the processing speed and overall performance of the network, especially in the face of high traffic and a large number of resource requests.cryptocurrencyIn the ecosystem, when Bob intends to create the latest popular NFT series and Alice wants to buy her preferred meme coin, the blockchain network is able to respond to both operations at the same time without sacrificing performance or user experience.

Although this capability may seem like a simple feature that improves the user experience, it actually paves the way for the development of new and creative applications and use cases by improving the efficiency of the network. These applications and use cases can take advantage of the low latency and high processing power to bring more user groups to thecryptocurrencyIt provides an important foundation in the ecosystem, heralding the transition of crypto technology to wider application.

How parallel execution works

While the premise of parallel execution is relatively simple, nuances in the underlying blockchain design can affect the performance of the parallel execution process itself. The most relevant feature for designing a blockchain with parallel execution is the ability for transactions to access its underlying network state, including account balances, storage, and smart contracts.

Parallel execution on blockchains can generally be divided into two types: deterministic and optimistic. Deterministic parallel execution, such as the model adopted by Solana, requires transactions to explicitly declare all of their memory dependencies before execution, that is, the specific parts of the global state they need to access. Although this approach increases the burden on developers, it allows the network to sort and identify non-conflicting transactions before execution, resulting in a predictable and more efficient system. In contrast, optimistic parallel execution assumes that all transactions are executed without conflict. This structure can speed up the processing of transactions, but if a conflict arises, the transaction may need to be re-executed. When two conflicting transactions are found - transactions that attempt to access the same network state, the system can choose to reprocess them, either in parallel or sequentially.

To better understand the impact of these designs, it may be helpful to analyze parallel execution from the perspective of the teams pushing the forefront of parallel execution today.

Current parallel execution market landscape

为什么并行化将会是下一代的区块链解决方案?

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 that runs as fast as possible, so the speed and efficiency of parallel computing was a simple and intuitive design choice.

为什么并行化将会是下一代的区块链解决方案?

The key component that makes Solana fast and high-throughput is Sealevel, the network’s parallel smart contract runtime environment. Unlike EVM- and WASM-based environments, Sealevel uses a multi-threaded architecture, which means it can process multiple transactions simultaneously within the capacity of a validator core.

The key to Solana’s parallel execution is that when a transaction is enabled, the network assigns that transaction a series of instructions to execute, specifically which accounts and states to access and which changes to make — this is key to determining which transactions do not conflict and can be executed simultaneously, while also allowing transactions attempting to access the same state to proceed simultaneously.

Solana also leverages Cloudbreak, its custom accountsDB, for storing and managing state data to support concurrent reads and writes of transactions. Cloudbreak is optimized for parallel execution and can scale horizontally to distribute and manage state data across multiple nodes.

Thanks to its parallel architecture, Solana is able to handle a large number of transactions while still executing quickly, providing near-instant finality for transactions. Solana currently processes an average of 2,000 to 10,000 transactions per second (TPS). In addition, the use cases for SVM are slowly but steadily expanding as teams like Eclipse roll out Layer 2 infrastructure designed to utilize SVM as an execution environment.

Parallel EVM

Parallel EVM describes a new blockchain execution environment that aims to combine the designs of Solana and Ethereum to “get the best of both worlds”, with the speed and performance of Solana and theSafetyBy processing transactions in parallel rather than sequentially as per the traditional EVM design, the Parallel EVM enables developers to build applications on a high-performance network while being able to take advantage of connections to EVM liquidity and developer tools.

Sei Network

Sei Network is an open source Layer1 blockchain compatible with EVM that supports a variety of decentralized applications built around high performance. Sei aims to provide users and developers with fast speeds and low costs, and parallel execution is a key component to achieving this performance and user experience. Currently, Sei provides a block confirmation time of 390 milliseconds and has processed more than 1.9 billion transactions on its Pacific mainnet.

Initially, Sei adopted a deterministic parallel execution model, where smart contracts declare their required state access in advance so that the system can run non-conflicting transactions simultaneously. With the advent of their V2 upgrade, Sei is transitioning to an optimistic parallel model, which means that all transactions will be processed in parallel when submitted to the network (execution phase), and then checked for conflicting information with previous transactions during the verification phase. If two or more conflicting transactions are found, that is, transactions that attempt to access the same network state, Sei will identify this conflict point and then re-run the transactions either in parallel or sequentially, depending on the nature of the conflict.

为什么并行化将会是下一代的区块链解决方案?

To store and maintain transaction data, Sei will also introduce SeiDB, a custom database designed to improve upon the deficiencies of v1 by optimizing 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 to track and store, and enables write-ahead logs to help recover data in the event of a crash.

为什么并行化将会是下一代的区块链解决方案?

Finally, Sei also recently announced the launch of its Parallel Stack, an open source framework for enabling Layer 2 scaling solutions (such as rollups) to leverage and benefit from parallel execution.

为什么并行化将会是下一代的区块链解决方案?

Monad

Monad is an upcoming parallel EVM Layer 1 blockchain that provides full bytecode and RPC compatibility for Ethereum applications and infrastructure. Through some innovative technical implementations, Monad aims to provide a more interactive experience than existing blockchains by optimizing performance and portability while maintaining low transaction costs, with 1 second block time and finality of up to 10,000 TPS.

Monad implements parallel execution and superscalar pipelining to optimize the speed and throughput of transactions. Similar to Sei v2, Monad will adopt an optimistic execution model, which means that the network will start executing all incoming transactions simultaneously, then analyze and verify the transactions to find conflicts and re-execute accordingly, with the ultimate goal that the results will be the same if the transactions are executed sequentially.

为什么并行化将会是下一代的区块链解决方案?

Note that while staying in sync with Ethereum, Monad orders the transactions in a block in linear order and updates each transaction sequentially.

In order to maintain and access blockchain data more efficiently than the state provided by current Ethereum clients, Monad created its own custom MonadDB, which is built natively for the blockchain. Monad DB leverages advanced Linux kernel features to achieve efficient asynchronous disk operations, eliminating the limitations of synchronous input/output access. MonadDB provides asynchronous input/output (async I/O) access, which is a key feature to achieve parallel execution. The system can start processing the next transaction while waiting to read the state of the previous transaction.

A simple analogy is to think about cooking a multi-step meal (like pasta with meatballs). The steps involved are 1) prepare the sauce, 2) cook the meatballs, and 3) cook the noodles. An efficient cook would first boil the water for the noodles, then prepare the ingredients for the sauce, then cook the noodles in the now boiling water, then cook the sauce, and finally cook the meatballs, rather than completing each step one at a time and moving on to the next after completing each task.

Move

Move is a programming language originally developed by the Facebook team in 2019 for the now-abandoned Diem project. Move aims toSafetyIt handles smart contracts and transaction data in a unique way, eliminating attack vectors inherent in other languages, such as reentrancy attacks.

MoveVM, as the local execution environment for Move-based blockchains, leverages parallelization to provide faster transaction execution and higher overall efficiency.

Aptos

Aptos is a Move-based Layer 1 blockchain developed by former Diem project members, which provides a high-performance environment for application developers through parallel execution. Aptos utilizes Block-STM, a modified implementation of the Software Transactional Memory (STM) concurrency control mechanism.

为什么并行化将会是下一代的区块链解决方案?

Block-STM is a multi-threaded parallel execution engine that allows optimistic parallel execution. Transactions are pre-ordered and strategically ordered within a block, which is critical for efficient conflict resolution and re-execution of transactions. Aptos research found that parallelization using Block-STM can theoretically support up to 160,000 TPS.

Sui

Similar to Aptos, Sui is a Layer 1 blockchain developed by former Diem project members, and it also uses the Move language. However, Sui uses a custom Move implementation that changes the storage model and asset permissions from the original Diem design. In particular, this allows Sui to represent independent transactions as objects using a state storage model. Each object has a unique ID in Sui's execution environment, 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 suite of developer tools and blockchain infrastructure services so that developers can easily access the benefits of building on Move. As an AWS-like execution-as-a-service platform for Move developers, Movement uses 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 adapt 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 will interoperate with the EVM and Move clients. M2 will inherit the Block-STM parallelization engine and is expected to achieve tens of thousands of TPS.

Challenges of Parallel Systems

Regarding the development of parallel blockchain technology, we must consider several key issues and the trade-offs involved:

  • What trade-offs does the network make to achieve better performance through parallel execution?

  • 较少的验证者保护网络可以加快验证和执行速度,但这是否会牺牲掉区块链的安全性,使其更容易受到验证者的攻击?

  • Are there large numbers of validators co-located? This is a common strategy in both crypto and non-crypto systems to minimize latency, but what happens to the network if a specific data center is compromised?

  • For optimistic parallel systems, will the process of re-executing invalid transactions become a bottleneck as the network scales? How has this efficiency been tested and evaluated?

At a high level, parallel blockchains run the risk of ledger inconsistencies, i.e. double spending and changes in the order of transactions (in fact, this is the main benefit of sequential execution). Deterministic parallelization solves this problem by creating an internal tagging system for transactions on the underlying blockchain. Blockchains that implement optimistic processing must ensure that the mechanisms they use to validate and re-execute transactions are safe and efficient, and that the trade-offs for performance can be reasonably achieved.

Future Outlook

The history of computing teaches us that parallel systems tend to be more efficient and scalable over time than sequential systems. The rise of parallel blockchains in the wake of Solana highlights that this concept also applies to crypto infrastructure. Even Vitalik mentioned parallelization as one of the potential key solutions to improve scalability of EVM rollups. Broadly speaking, the growth of crypto/blockchain adoption requires superior systems than what is available today, including parallel blockchains. Solana’s recent network challenges highlight that there is still a lot of room for improvement in parallel blockchain development. As more teams seek to push the boundaries of the on-chain frontier and bring the next wave of massive user bases and adoption to blockchain-native applications and ecosystems, parallel execution models provide an intuitive framework for building systems that can efficiently handle the magnitude of network activity and easily match the scale of Web2 companies.

The article comes from the Internet:Why will parallelization be the next generation blockchain solution?

Related recommendation: Bitwise Chief Investment Officer: Who is buying Bitcoin ETF?

Professional investors are still in the testing phase of Bitcoin spot ETF allocation, and there is huge room for growth in the future. Written by Matt Hougan, Chief Investment Officer of Bitwise Compiled by Luffy, Foresight News The Bitcoin spot ETF has been a huge success. Since its launch on January 11, it has…

share to
© 版权声明

相关文章