
Author: Ali Sheikh, encrypted analyst; Translation: Bit Chain Vision Xiaozou
This article will outline the parallel design architecture of the blockchain, and borrow three related examples: Solana, SEI, and Monad.This article emphasizes the differences between optimism and parallelism, and understands the subtle difference between the status and memory access on these chains.
1Preface
In 1837, computer scientist and mathematician Charles Babbage designed “Analytical Engine”, which laid the theoretical foundation for parallel computing.Today, parallelization is a key theme of the encrypted world. The blockchain is trying to expand the boundary of processing, efficiency and throughput.
Parallel computing enables many calculations or processes to perform simultaneously instead of performing calculations in order or one after another.The parallel calculation refers to decomposing larger problems into multiple smaller independent parts. These parts can be performed by multiple processors that communicate through shared memory.The parallel system has many advantages, such as improving efficiency and speed, scalability, improvement of reliability and fault tolerance, optimizing resource utilization, and the ability to deal with large data sets.
However, recognizing the effectiveness of parallelism depends on the structure of the underlying architecture and the details of realization.The two core bottlenecks of the blockchain are encrypted functions (hash functions, signatures, oval curves, etc.) and memory/status access.For the blockchain, one of the key components of the efficient and parallel system is the subtle difference between state access.Status access refers to the ability to read and write the state of the blockchain, including storage, smart contracts and account balances.In order to make the parallel blockchain effective and high -performance, the state access must be optimized.
At present, there are two ideological genres in optimizing the state access of parallelization blockchain: the certainty is parallel and optimistic.Determine parallel requires that the code is clearly stated in advance which parts of the blockchain state will be accessed and modified.This allows the system to determine which transactions can be processed parallel without conflict.Determination supports predictability and efficiency (especially in the case of most independent transactions).However, it does bring more complexity to developers.
Optimistic parallel does not require code to pre -declared its status access to deal with trading parallel, as if there will be no conflict.If there is a conflict, optimistic and parallel will reorganize, dealt with or serially operate conflict transactions.Although optimistic and parallelization provides greater flexibility for developers, conflicts need to be re -executed. Therefore, when affairs are not conflicting, this method is the most effective.As for which method is better, there is no correct answer.They are only two different ways to achieve parallelization.
Below we first explore some basic knowledge related to non -encrypted parallel systems, and then look at the design space of the blockchain parallel execution. We will focus on three core areas: encrypted parallel system summary, memory and status access methods, and parallel design opportunities for parallel design opportunitiesEssence
2, Non -encrypted parallel system
Through the functions of parallel computing and parallel system we just learned, it is easy to understand why parallel computing has become popular in recent years.And in the past few decades, parallel computing has shown an increasing trend and has achieved many breakthroughs.
-
Medical image: Parallel treatment has fundamentally changed medical images, bringing a significant increase in the speed and resolution of various image modes (such as MRI, CT, X -ray, and optical fault scanning).Nvidia is at the forefront of these progress. Through its parallel processing toolkit package, radiologists provide more powerful artificial intelligence functions, so that the imaging system can handle more data and computing loads more effectively.
-
astronomy:Some new astronomical phenomena, such as the understanding of black holes, can only be realized by using parallel supercomputers.
-
UnityGame engine:The Unity engine uses GPU capacity (specially constructed for large -scale graphics workloads) to help improve performance and speed.The engine is equipped with a multi -threaded and parallel processing function, bringing a seamless gaming experience and can create a complex and realistic game environment.
Let’s take a look at the three blockchains that have been deployed in parallel.First, let’s look at Solana, and then two EVM -based chains -Monad and SEI.
3, Overview of parallel design
(1) Solana
From the perspective of high levels, Solan’s design concept is that blockchain innovation should develop with hardware.Over time, the hardware is continuously improved according to Moore’s Law, and Solana’s design will benefit from the improvement of performance and scalability.The co -founder of Solana Anatoly Yakovenko designed the original parallel architecture of Solana more than five years ago. Today, the parallelism as a blockchain design principle is rapidly spreading.
Solana uses a certain way in parallel, which comes from Anatoly’s experience in processing embedded systems in the past. In the embedded system, all states are usually declared in advance.This enables the CPU to know all dependencies and enables it to load the necessary part of memory in advance.The result is to optimize the system execution, but once again, it requires developers to do extra work in advance.On Solana, all memory dependencies of the program are necessary, and declare in the constructed transaction (that is, the access list), so that the runtime can easily schedule and perform multiple transactions in parallel.
The next main component of the Solana architecture is Sealevel VM, which is the parallel smart contract of Solana.Sealevel natively supports multiple contracts and transactions based on the number of kernels of the verification.The verifications in the blockchain are network participants responsible for verifying transactions, proposed new blocks, and maintaining the integrity and security of blockchain.Since the transaction pre -states which accounts need to be read and write and locked, the Solana scheduler can determine which transactions can be executed parallel.Because of this, when it comes to verification, “block producer” or leader can sort thousands of to be processed transactions and schedule non -overlapping transactions parallel.
The last design element of Solana is “Pipeline”.When you need to process data in a series of steps, and each step is responsible for different hardware, pipeline is triggered.The key idea here is to obtain data that requires serial operation and use Pipeline to parallel.These pipelines can run parallel and can handle different trading packages at each Pipeline stage.
These optimizations allow Sealevel to organize and execute independent transactions at the same time, and use the ability of hardware to use one program to process multiple data points at one time.Sealevel sort the instructions according to Programid, and perform the same instructions parallel on all relevant accounts.
Through these innovations, we can see that Solana is intentionally designed to support parallelization.
2 (2) SEI
SEI is a general, open source L1 blockchain, which is dedicated to digital asset transactions.SEI V2 uses an optimistic and parallel method, so it is more friendly to developers.In the optimistic parallel mode, smart contracts can be executed more seamlessly and in parallel, and no developers need to declare their resources in advance.This means running all transactions in parallel.Nevertheless, when a conflict occurs (that is, the same state of multiple transactions), the blockchain will track a specific storage component affected by each conflict exchange.
The SEI blockchain uses the “optimistic concurrent control (OCC)” mechanism to perform transactions.Concurrent transactions occur during multiple transactions in the system at the same time.There are two stages of this transaction method: execution and verification.
During the execution stage, the transaction is optimistic and temporarily stored in specific transactions.Since then, each transaction will enter the verification phase. During the verification stage, the information in the temporary storage operation will be checked according to the status of the previous exchange.If the transaction is independent, the transaction will run parallel.If the data read by one transaction has been modified by another transaction, it will conflict.The parallel system of SEI will identify each conflict through the latest state changes in the read data set and the latest state storage (these changes are indexed in the transaction order).SEI will re -execute and re -verify the instance at the position of conflict.This is an iterative process that involves execution, verification and reorganization in order to repair the conflict.The figure below shows how SEI handles the transaction when there is a conflict.
The implementation of SEI provides EVM developers with lower GAS fees and broader design space.For a long time, the EVM environment has been limited to less than 50 TPS, which forces developers to create applications that follow the anti -mode.SEI V2 allows developers to be close to areas that usually require high performance and low costs, such as DEFI, DEPIN and games.
3 (3) Monad
Monad is building a parallel EVM L1 with a complete bytecode compatibility.The uniqueness of Monad lies not only in its parallel engine, but also the optimization engine they build at the bottom.Monad uses a unique overall design method that combines several key features, such as Pipeline, asynchronous I/O, consensus execution separation, and MonaddB.
A key innovation designed by Monad is Pipeline with a slight offset.The offset allows more processes by running multiple instances at the same time.Therefore, Pipeline is used to optimize many functions such as PIPELING, transaction execution PIPELINING, consensus and execution of internal pipelining, and pipeline in the consensus mechanism itself.
Next, we will look at the parallel part of Monad.In Monad, the transaction is linearly sorted in the block, but the goal is to achieve the final state by using parallel execution.Monad’s execution engine design uses an optimistic parallel algorithm.Monad’s engine handles the transaction at the same time, and then performs analysis to ensure that if the transaction is executed one after another, the same results will be obtained.If there are any conflicts, you need to re -execute.The parallel execution here is a relatively simple algorithm, but combining it with other key innovations of Monad makes this method novel.One thing to note here is that even if re -executing occurs, it is usually very cheap, because the input required for invalid trading has always been retained in the cache, so this will be a simple cache search.Re -execution is guaranteed to succeed because you have executed the previous transactions in the block.
Monad also improves performance by separating execution and consensus (similar to Solana and SEI) and delayed execution.The idea is that if you relax the execution conditions so that you can complete the execution before achieving consensus, you can run the execution and consensus parallel to increase the extra time to the two.Of course, Monad uses a certainty algorithm to deal with this situation to ensure that one of them will not run too far and get out of control.
4Unique method of status access and memory
As I mentioned at the beginning of this article, status access is one of the typical performance bottlenecks of the blockchain.The design selection of status access and memory can finally determine whether the specific implementation of the parallel system will improve performance in practice.Below we will understand and compare the different methods adopted by Solana, SEI, and Monad.
(1) SolanaStatus access: accountsdb / cloudbreak
Solana uses horizontal expansion to distribute and manage status data across multiple SSD devices.Today, many blockchain uses general databases (ie, LevelDB), which has restrictions in processing a large number of concurrent read and writing status data.To avoid this, Solana used CloudBread to build its own custom account database.
CloudBream is designed for parallel access for cross -I/O operations, rather than simply relying on RAM, which itself is fast.I/O operation (input/output) refers to the operation of reading data from the external source (such as disk, network or peripheral device) or writing data to it.Initially, CloudBread used an internal index of RAM to map the public key to accounts with the balance and data.However, when writing this article, the V1.9 index has been moved from RAM to SSD.This transformation allows CloudBread to handle 32 (I/O) operations in its queue at the same time, thereby enhancing the throughput of multiple SSDs.Therefore, you can access the blockchain data, such as accounts and transactions, just like in RAM using memory mapping files.The figure below shows the memory structure.Although RAM is faster, its capacity is smaller than SSD, and it is usually more expensive:
Through horizontal extension and distribution of status data across multiple devices, CloudBream has reduced delay and improves the efficiency, decentralization and network elasticity of the Solana ecosystem.
2 (2) SEIStatus visit: seidb
SEI has redesigned its storage -SEIDB — to solve the following problems: write a magnification (how much meta -data requires the data structure, the smaller the better), the expansion of the state, the slow operation, and the performance of performance over time.decline.The new re -design is now divided into two components: state storage and status commitment.Records and verification of any changes to the data are processed by the state, and at any time, the database of all data is processed by the status storage (SS).
In SEI V2, the state promises to use memory mapping IAVL tree architecture (Memiavl).Memory mapping IAVL tree stored less metadata, which reduces status storage and status synchronization time, and makes it easier to run a complete node.The memory mapping IAVL tree is expressed as the three files on the disk (KV files, branch files, and leaf files); therefore, less metadata needs to be tracked, which helps to reduce status by more than 50%.The new MEMIAVL structure helps reduce writing large factors because it reduces the metadata required to maintain the data structure.
The updated SEIDB allows flexible database back -end support to the status storage layer.SEI believes that the needs and storage needs of different node operators are different.Therefore, SS design provides operators with freedom and flexibility, such as Pebbledb, Rocksdb, SQLite, etc. for operators.
3 (3) MonadStatus visit: Monaddb
There are some important differences in Monad’s state access.First of all, most Ethereum clients use two types of databases: B-Tree database (ie LMDB) or log structure combined tree (LSM) database (ie Rocksdb, LevelDB).Both of them are universal data structures, not specially designed for blockchain.In addition, these databases did not use the latest progress of Linux technology, especially in asynchronous operations and I/O optimization.Finally, Ethereum itself uses the MPT tree management status. The MPT tree is dedicated to encryption, verification and proof.The main problem is that the client must integrate this specific MPT tree into a more common database (ie, B-Tree / LSM), which will bring serious performance defects, such as excessive disk access.
All of them help to lay the foundation for Monad to decide to create a custom MonadDB database. The MonadDB database is dedicated to processing blockchain data and status access to more efficiently.Some of the key features of Monaddb include parallel access database, custom database optimization for Merkle Trie data, high -efficiency status access, decentralized characteristics and scalability that is better than standard RAM use.
Monaddb is designed for blockchain to make it more performance than using the universal database.Custom MONADDB is dedicated to efficient management of Merkle Trie type data and supports interviewing multiple Trie nodes in parallel.Although MonadDB is the same as the single reading cost of some universal databases mentioned above, the key feature of MonaddB is that it can run multiple reading in parallel, which brings huge speed up.
MonadDB supports synchronous access to parallel access database.Because Monad starts this database from scratch, it can use the latest Linux kernel technology and all functions of SSD to achieve asynchronous I/O.Using asynchronous I/O, if a transaction needs to read the state from a disk, this should not bring resistance to the operation.Instead, it should start reading and continue to handle other transactions at the same time.This is the way asynchronous I/O significantly speeds up MonadDB processing speed.Monad can gain better hardware performance by optimizing the use of SSD and reducing excess RAM.This has an additional benefit to decentralization and scalability alignment.
5,in conclusion
In short, exploring parallel development in blockchain through the perspective of Solana, SEI, and Monad can fully understand how different architectures and methods can improve performance and scalability.Solana’s confirmation parallel pays attention to pre -declaration status access, providing predictability and efficiency, making it a powerful choice for applications with high throughput requirements.On the other hand, SEI’s optimism and parallel methods give priority to the flexibility of developers, and it is very suitable for environmental conflicts.With its unique optimistic and parallel way and custom Monaddb, Monad provides an innovative solution to optimize status access and performance by using the latest technological progress.
Each blockchain provides a unique method to solve parallelization challenges, and has a set of its own profits and disadvantages.Solana’s design aims to maximize the maximum hardware utilization and throughput, while SEI focuses on simplifying the development process, and Monad places its focus on the database solution tailored for blockchain data.These differences highlight the diversity of blockchain ecosystems, and the importance of choosing a suitable platform according to the specific needs of the application.
With the continuous development of the blockchain field, the advancement of parallelization technologies shown by Soi, Monad, and SEI will undoubtedly inspire further innovation.The journey to a more efficient, more scalable and more friendly blockchain is underway. The experience from these platforms will play a vital role in shaping the future of blockchain technology.