Unveiling the Speed King of Blockchain – Solana

A performance report

Fastest Ch人工智慧奈秒 report released by CoinGecko on May 17 showed that Solana is the fastest among large blockchains , with the highest daily average real TPS reaching 1,054 (voting transactions have been removed). Sui is the second fastest blockchain, with the highest daily average real TPS reaching 854. BSC ranks third, but the real TPS achieved is less than half of Sui.

Unveiling the Speed King of Blockchain - Solana

From this report, it can be seen that Solana and Sui, which have the best performance, are both non-EVM-compatible blockchains. Furthermore, the average real TPS of 8 non-EVM-compatible blockchains is 284, while the average TPS of 17 EVM-compatible blockchains and Ethereum Layer 2 is only 74. The performance of non-EVM-compatible blockchains is about 4 times that of EVM-compatible blockchains.

This article will explore the performance bottlenecks of EVM-compatible blockchains and reveal Solana鈥檚 performance advantages .

Performance bottlenecks of EVM-compatible blockchains

Unveiling the Speed King of Blockchain - Solana

First, we generalize the EVM blockchain to general blockchains. In general, blockchains want to improve TPS by the following methods:

  • Improve node performance: Improve node performance by piling up hardware resources. The hardware requirements of the node will affect the degree of decentralization. For example, the recommended configuration of Ethereum is CPU 4 cores, memory 16G, network bandwidth 25Mbps, which can be achieved by ordinary user-level devices and has a high degree of decentralization; Solana recommends a relatively higher configuration of CPU 32 cores, memory 128G, network bandwidth 1Gbps, which can only be achieved by professional-level devices and has a general degree of decentralization;

  • Improve the underlying protocol: including network protocols, cryptography, storage, etc. Improving the underlying protocol of blockchain does not change the properties of the blockchain itself, nor does it affect the operating rules of the blockchain. It can directly improve the performance of the blockchain, but the underlying technology has received little attention and there are no major breakthroughs in the current research field.

  • Expanding blocks: Increasing the size of blocks can include more transactions, thereby increasing the transaction throughput of the blockchain. For example, Bitcoin Cash (BCH) expanded the block size from 1 MB to 8 MB, and then to 32 MB. However, expanding blocks will also increase propagation delays and cause security threats, such as increasing the possibility of forks and DDoS attacks;

  • Consensus protocol: The consensus protocol ensures that all nodes in the blockchain reach a consensus on the status update of the blockchain. It is the most important security gate of the blockchain. The consensus mechanisms that have been used in the blockchain include PoW, PoS, PBFT, etc. In order to meet the needs of scalability, high-performance public chains generally improve the consensus protocol and combine it with their own special mechanisms, such as Solanas consensus mechanism based on PoH and Avalanches consensus mechanism based on Avalanche.

  • Transaction execution: Transaction execution only cares about the number of transactions or computing tasks processed per unit time. Blockchains such as Ethereum use serial execution to execute smart contract transactions in blocks. In serial execution, the CPU performance bottleneck is very obvious, which seriously restricts the throughput of the blockchain. Generally, high-performance public chains will adopt parallel execution, and some will also propose language models that are more conducive to parallelization to build smart contracts, such as Sui Move.

For EVM blockchain, the biggest challenge lies in transaction execution because the virtual machine, i.e. the execution environment of transactions, is limited. EVM has two main performance issues:

  • 256-bit: EVM is designed as a 256-bit virtual machine to make it easier to process Ethereums hash algorithm, which will explicitly produce 256-bit output. However, the computer that actually runs EVM needs to map 256-bit bytes to the local architecture for execution. One EVM opcode will correspond to multiple local opcodes, making the entire system very inefficient and impractical;

  • Lack of standard library: There is no standard library in Solidity, and it must be implemented by yourself using Solidity code. Although OpenZeppelin has improved this situation to a certain extent, they provide a standard library implemented by Solidity (by including the code in the contract or calling the deployed contract in the form of delegatecall), the execution speed of EVM bytecode is far slower than that of the pre-compiled standard library.

From the perspective of execution optimization, EVM still has two major shortcomings:

  • Difficult to perform static analysis: Parallel execution in blockchain means processing unrelated transactions at the same time, treating unrelated transactions as events that do not affect each other. The main challenge in achieving parallel execution is to determine which transactions are unrelated and which are independent. Currently, some high-performance public chains will perform static analysis on transactions in advance, and the dynamic jump mechanism of EVM makes it difficult to perform static analysis on the code;

  • JIT compiler is immature: JIT compiler (Just In Time Compiler) is a common optimization method used by modern virtual machines. The main goal of JIT is to turn interpreted execution into compiled execution. At runtime, the virtual machine compiles the hot code into machine code related to the local platform and performs various levels of optimization. Although there are EVM JIT projects, they are still in the experimental stage and are not mature enough.

Therefore, in terms of the choice of virtual machines, high-performance public chains tend to use virtual machines based on WASM, eBPF bytecode or Move bytecode rather than EVM. For example, Solana uses its own unique virtual machine SVM and eBPF-based bytecode SBF.

Fastest Chains: Solana

Unveiling the Speed King of Blockchain - Solana

Solana is known for its PoH (Proof of History) mechanism as well as low latency and high throughput, and is one of the most famous Ethereum killers.

At its core, PoH is a simple hashing algorithm similar to a Verifiable Delay Function (VDF). Solana uses a sequence preimage resistant hashing function (SHA-256) that runs continuously, using the output of one iteration as the input for the next. This calculation runs on a single core per validator.

Unveiling the Speed King of Blockchain - Solana

While sequence generation is sequential and single-threaded, verification can be done in parallel, allowing efficient verification on multi-core systems. While there is an upper bound on hashing speed, hardware improvements may provide additional performance gains.

Unveiling the Speed King of Blockchain - Solana

Solana Consensus Process

The PoH mechanism acts as a reliable and trustless time source, creating a verifiable and ordered record of events within the network. PoH-based timing allows the Solana network to rotate leaders in a predetermined and transparent manner . This rotation occurs at fixed time intervals of 4 slots, each of which is currently set to 400 milliseconds. This leader rotation mechanism ensures that every participating validator has a fair chance to become a leader, and is an important mechanism for the Solana network to maintain decentralization and security, preventing any single validator from gaining too much power on the network.

Unveiling the Speed King of Blockchain - Solana

During each slot, the leader proposes a new block containing the transactions received from users. The leader verifies these transactions, packages them into a block, and then broadcasts the block to the rest of the networks validators. This process of proposing and broadcasting blocks is called block production, and other validators in the network must vote on the validity of the block. Validators check the contents of the block to ensure that the transactions are valid and follow the rules of the network. If a block receives a majority of the votes of the stake weight, the block is considered confirmed. This confirmation process is critical to maintaining the security of the Solana network and preventing double spending.

When the current leader鈥檚 time period ends, the network does not stop or wait for block confirmation, but instead moves to the next time period, giving subsequent leaders a chance to produce blocks, and the whole process starts over. This approach ensures that the Solana network maintains high throughput and remains resilient even if some validators experience technical issues or go offline.

Solana Performance

Since the Solana network can confirm the leader in advance, Solana does not need a public memory pool to save users transactions. When a user submits a transaction, the RPC server converts it into a QUIC packet and immediately forwards it to the leaders validator. This approach is called Gulf Stream, which allows fast leader transitions and pre-execution of transactions, reducing the memory load of other validators.

Solanas block data is brought into kernel space and then passed to the GPU for parallel signature verification. Once the signature is verified on the GPU, the data is passed to the CPU for transaction execution and finally returned to kernel space for data persistence. This process of dividing data into multiple processing steps of different hardware components is called pipelining, which can maximize hardware utilization and speed up the verification and transmission of blocks.

Since Solanas transactions explicitly specify which accounts to access, Solanas transaction scheduler can use the read-write lock mechanism to execute transactions in parallel. Each thread of the Solana transaction scheduler has its own queue, which processes transactions sequentially and independently, attempts to lock (read-write lock) the account of the transaction and execute the transaction, and transactions with account conflicts will be executed later. This multi-threaded parallel execution technology is called Sealevel.

The process by which leaders propagate blocks divides QUIC packets (optionally using erasure coding) into smaller packets and distributes them to validators in a hierarchical structure. This technique is called Turbine and is primarily used to reduce the leaders bandwidth usage.

During the voting process, validators use a consensus mechanism for forked votes. Validators do not need to wait for votes to proceed with block production; instead, block producers continuously monitor valid new votes and incorporate them into the current block in real time. This consensus mechanism is called TowerBFT, and by merging forked votes in real time, Solana ensures a more efficient and streamlined consensus process, thereby improving overall performance.

For the persistence of blocks, Solana developed the Cloudbreak database, which partitions the account data structure in a specific way to benefit from the speed of sequential operations and uses memory-mapped files to maximize the efficiency of SSDs.

To reduce the burden on validators, Solana transfers data storage from validators to a network of nodes called Archiver. The history of transaction status is split into many fragments and uses erasure coding technology. Archiver is used to store state fragments but does not participate in consensus.

總結

Solana鈥檚 vision is to be a blockchain whose software scales at the speed of its hardware, so Solana takes full advantage of all the CPU, GPU, and bandwidth power available in today鈥檚 computers to maximize performance, reaching a theoretical maximum speed of 65,000 TPS.

It is precisely because of Solanas high performance and scalability that Solana has become the preferred blockchain platform for handling high-frequency transactions and complex smart contracts. Whether it is the DePIN/AI track at the beginning of the year or the recent hot Meme track, Solana has shown great potential.

After the launch of Ethereum ETF, Solana has also become the cryptocurrency with the most calls for the next ETF, although the SEC still lists Solana as a security and will not approve other cryptocurrency ETFs in the short term. But in the crypto market, consensus is value, and Solanas consensus may be becoming as indestructible as Bitcoin and Ethereum.

This article is sourced from the internet: Unveiling the Speed King of Blockchain – Solana

Related: ETH ETF Narrative Trading Guide: Seizing the Golden Opportunity of ETH Ecosystem and RWA Sector

Original author: 0X KYLE Original translation: TechFlow Introduction In this article, the author analyzes the launch of Ethereum ETF and its potential impact on the market, and proposes a specific trading strategy. Although the market has changed during the writing period, the author believes that there is still room for profit. This article not only explores the performance of Ethereum and its related assets, but also involves the opportunities of the RWA (real world asset) industry under the new regulatory environment. Text content I started writing this article on May 24, 2024, when ETH was at $3632.22 and ONDO was at $1.08. While the prices of some assets have moved during the writing process, the author believes that the upside potential remains, albeit with a reduced risk/reward ratio on the…

© 版權聲明

相關文章

暫無評論

您必須先登入才能發表評論!
立即登入
暫無評論...