A performance report

According to the "Fastest Chains" report released by CoinGecko on May 17, Solana is the fastest among large blockchains, with a maximum daily average real TPS of 1,054 (voting transactions have been removed). Sui is the second fastest blockchain, with a maximum daily average real TPS of 854. BSC ranks third, but the real TPS achieved is less than half of Sui.

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’s performance solutions.

Performance bottlenecks of EVM-compatible blockchains

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 4 CPU cores, 16 GB memory, and 25 Mbps network bandwidth, which can be achieved by ordinary user-level devices and have a high degree of decentralization. Solana recommends a relatively higher configuration of 32 CPU cores, 128 GB memory, and 1 Gbps network bandwidth, which can only be achieved by professional-level devices and have 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 Solana's consensus mechanism based on PoH and Avalanche's 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 bits: The EVM is designed as a 256-bit virtual machine to make it easier to process Ethereum's hashing algorithm, which explicitly produces 256-bit output. However, the computer that actually runs the EVM needs to map 256-bit bytes to the local architecture for execution, and 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 you have to implement it yourself with 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 much 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 transform 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

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.

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.

Solana Consensus Process

The PoH mechanism acts as a reliable and trustless source of time, 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.

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 validators in the network. This process of proposing and broadcasting blocks is called block production, and the 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’s time period ends, the network does not stop or wait for block confirmations, 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 leader's validator. This approach is called Gulf Stream, which allows fast leader transitions and pre-execution of transactions, reducing the memory load of other validators.

Solana's 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 Solana's transactions explicitly specify which accounts to access, Solana's 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 intended to reduce the leader's 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 for 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 account data structures 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 moves data storage from validators to a network of nodes called Archivers. The history of transaction status is split into many fragments and uses erasure coding technology. Archivers are used to store fragments of the state but do not participate in consensus.

Summarize

Solana’s 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’s computers to maximize performance, reaching a theoretical maximum speed of 65,000 TPS.

It is precisely because of Solana's 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 Solana's consensus may be becoming as indestructible as Bitcoin and Ethereum.