Sei Network, a parallel processing public chain designed for trading, issued tokens and launched its mainnet in August this year, causing a wave of enthusiasm in the market. Recently, Jayendra Jog, the founder of Sei Labs, announced the launch of Sei v2, which will integrate EVM, optimize parallel processing mechanisms, and ledger storage structures.
Contents:
Toggle
What is Sei Network?
Sei for Trading
Sei Parallel Processing Mechanism
Sei v2 Updates
Virtual Machine: Supporting EVM
Original Design: Sei v1 uses the CosmWasm virtual machine
Update Focus: Sei v2 will support integrated EVM
Optimizing Sei Parallel Processing Mechanism
Original Design: Sei v1 requires defining resource scope for contracts
Update Focus: Sei v2 simplifies contract parallel execution mechanism
Optimizing Ledger Storage Structure: SeiDB
Original Design: Sei v1 stores large amounts of state data
Update Focus: Sei v2 separates ledger structure
Consensus Mechanism
Sei competes with leading chains
Sei Network has a clear market positioning, providing an efficient environment for trading virtual assets. In addition to common tokens, virtual assets also include NFTs, social graphs, and game props. By providing a specialized underlying environment for trading, Sei aims to create the best user experience.
Various Types of Virtual Asset Trading
(Data Source)
Virtual asset trading is not limited to cryptocurrencies. Therefore, virtual asset trading is the most extensive demand in the online world. The team believes that the most successful Web3 applications involve trading attributes:
Indirect Trading: Most users on the chain trade virtual assets using Uniswap and OpenSea.
Direct Trading: Projects directly involved in trading, mostly games or NFT projects, such as Axie Infinity or BAYC.
Therefore, the demand for trading is ever-present and is an important aspect of Web3 in the future. To achieve the best trading network, an efficient environment is needed. Sei achieves this goal by using parallel chain processing design and consensus mechanisms.
Sei Network’s mainnet has been online for over three months. According to official data, the network currently has an average TPS of 20,000 and finality confirmation within 390 milliseconds. The team claims that it is the most efficient network in the industry, thanks to its innovative parallel processing mechanism.
When transactions on the Sei blockchain do not involve the same resources (addresses), all transactions can be processed in parallel without the need for transaction ordering. This improves network operation efficiency.
When evaluating a blockchain project, there are three main aspects to consider: ledger structure, consensus mechanism, and virtual machine. Along with Sei’s unique parallel processing mechanism, it is clear to understand the differences in Sei v2’s updates.
Main Updates of Sei Network v2
(Data Source)
Founder Jayendra stated that Sei v2 only adds new features and does not affect existing functionality. Users and developers do not need to perform any additional operations for this update.
Sei v2 proposals mainly include three updates:
Supporting EVM
Optimizing parallel processing mechanism
Optimizing ledger storage structure
This update is expected to be completed in the first quarter of 2024.
Sei is built using the Cosmos SDK and utilizes the CosmWasm virtual machine provided by Cosmos. CosmWasm is a virtual machine component designed specifically for the Cosmos ecosystem, named after its underlying WebAssembly (Wasm) technology. Any blockchain built using the Cosmos SDK can add CosmWasm to its chain without adjusting existing logic.
WebAssembly supports various commonly used programming languages, including Rust, C, C++, etc. Therefore, if a developer is proficient in Rust, they can easily write smart contracts on CosmWasm. This attracts developers from outside the ecosystem to Sei.
However, the Sei Labs team found that although there was high developer involvement, they were missing out on the Ethereum Virtual Machine (EVM) ecosystem. EVM is the virtual machine used by most existing industry applications and products. Losing this ecosystem would hinder Sei’s rapid development at this stage, as existing Ethereum projects cannot fork into the Sei ecosystem.
To address this, the team has updated the dedicated code library Core Sei Binary, introducing the dedicated interface of EVM RPC and Geth nodes, allowing EVM transactions to seamlessly go on-chain and interact with the Sei network.
Geth was chosen because of its relative stability. Jayendra Jog stated that currently, 80% of Ethereum nodes use Geth, and it supports complete EVM bytecode compatibility. This means that developers can fully replicate other EVM contracts to run on Sei.
Sei Network v2 Main Updates
(Data Source)
Sei v2 will also use EVM RPC, allowing users to easily operate with wallets such as Metamask, while developers can continue to use tools like Foundry, Remix, and Hardhat.
Therefore, Sei v2 will enable composability between EVM and Cosmwasm transactions. Sei’s Geth has a pre-compiler that allows the invocation of Cosmwasm contracts, and Sei’s wasmd module can also invoke EVM contracts in reverse, making assets within Sei’s ecosystem more valuable.
In the original Sei Network, developers needed to learn how to “annotate contract resource usage” to allow transactions to be processed in parallel. When developers write contracts on Sei, they need to define the resources and independence that the contract may need to access. This is to quickly distinguish resource independence when executing contracts in the future and determine whether to execute transactions in parallel or in order.
In order to execute contracts in parallel, developers need to identify the resources (including querying contracts) that need to be accessed during the execution process and write the resource scope in JSON format for on-chain storage. This inadvertently causes confusion for developers and increases the entry threshold and security issues.
Sei v2 will optimize the parallel processing mechanism, eliminating the need for developers to manually define dependency relationships. Instead, it can handle parallelization mechanisms on its own, reducing the burden on developers.
The new parallel processing mechanism will execute all transactions in unison. If resource conflicts are detected, the network will reassess the order of execution and re-execute if necessary.
Sei v2 Automates Handling of Resource Overlaps
(Data Source)
If transactions involve different accounts, such as Alice transferring to Bob while Carol transfers to Dave, the transactions can be processed in parallel due to the absence of overlapping dependency relationships. If transactions involve the same accounts, such as both Alice and Bob transferring to Carol, they need to be rerun in order.
However, this design may have concerns. In the worst case scenario, if all transactions involve dependencies and need to be rerun in order, rerunning these transactions will increase the execution time by 30% compared to the original sequential execution. Fortunately, based on Ethereum’s historical data, only about 15% of transactions actually involve resource overlaps that require reprocessing in order. Therefore, the team believes that Sei’s overall performance will still be significantly improved.
However, Sei has another issue. It stores the entire IAVL tree permanently in the distributed ledger. Due to fast finality and parallel processing design, it requires frequent recording of global state changes, leading to rapid growth in the overall size of the network ledger.
The cost of parallel processing is recording many invalid intermediate state data. According to the Sei team’s RFC proposal, for example, on the atlantic-2 testnet node, out of 25 GB of stored data, only 10 GB contains meaningful transaction information, resulting in low disk space utilization for the node.
Due to data expansion, Sei nodes’ disk usage grows rapidly. The disk usage of atlantic-2 archive nodes increases by over 150 GB per day and over 1 TB per week. As the chain state continues to grow, the growth rate of storage space will also increase (become faster).
This will lead to several problems:
The maintenance cost of nodes will become increasingly high.
Database operations will become slower.
RPC nodes cannot run for a long time due to disk filling up quickly.
In addition, with the upcoming v2’s back-and-forth processing and revalidation in parallel processing design, the overall network state changes will occur more frequently, resulting in a significant increase in state data volume.
Sei v2 addresses these issues by optimizing the storage mechanism to prevent excessive state data expansion and improve the speed of reading data for all nodes.
Sei v2 splits the state storage ledger into two types called SeiDB:
State Commitment (SC) ledger: Records MemIAVL tree information.
State Store (SS) ledger: Records complete information.
With the improvement of SeiDB, verification nodes only need to record SC ledger information, while complete state information is recorded in the SS layer. The transmission is first placed in a write-ahead log without the need for immediate transmission. This allows asynchronous occurrence of state storage, thereby improving efficiency as it does not affect block generation.
Sei v2 Reduces Growth Burden on Verification Nodes
(Data Source)
Through the improvement of SeiDB, Sei’s performance has increased in various aspects. This includes a 100-fold improvement in block submission time, compressing daily data generation from 100 GB to 5 GB, and a 10-fold improvement in catch-up time for full nodes or nodes that require data synchronization.
Sei Network v2 has not changed its original consensus mechanism and still maintains the Twin Turbo design. By improving Cosmos’ consensus interface Tendermint ABCI, block confirmation time is significantly reduced.
Sei v2 adds the EVM virtual machine and improves the parallel processing mechanism and distributed ledger storage mechanism. These updates aim to enhance the user experience for developers, nodes, and users, thereby increasing its ecosystem influence.
However, through these three months of operation, it was found that Sei’s parallel trading, which increases TPS and fast finality, comes at the cost of increased state data volume, requiring higher hardware specifications for nodes. The team made a compromise by separating the ledger structure, sacrificing decentralization to improve efficiency.
Overall, compared to other Ethereum killers, Sei has the potential to enter the ranks of leading chains if the aforementioned updates can be effectively implemented. We look forward to seeing the team’s progress in the coming year.
(This article is not investment advice)
Cosmos
CosmWASM
Layer1
Sei
Further Reading
Sei Announces Integration with USDC, Receives Strategic Investment from Circle
Vitalik Liquidates MKR, Expresses Discontent? Maker Founder Praised Solana Controversially, Urgently Explains: Ethereum is also a good chain