Article author: Cookies Research
The consensus mechanism of the blockchain is responsible for verifying the validity of transactions and adding them to the blockchain in the correct order. Depending on the consensus mechanism chosen, the validation and ordering processes differ in efficiency, resulting in different levels of throughput. In the blockchain world, Solana is a high-performance chain with 400 millisecond block times, transactions per second (TPS) averaging between 2,000 and 3,000, and a theoretical peak TPS of 65,000 (for reference, Ethereum’s TPS is around 12).
This article aims to highlight two architectures in Solana that play a key role and contribute to its high throughput, namely its Delegated Proof of Stake (DPoS) consensus mechanism and Proof of History (PoH) mechanism.
1. Traditional consensus mechanism
Let We start by understanding a key bottleneck of blockchain: scalability.
Each node in a distributed blockchain network has its own internal clock, and it runs according to this local system clock. When a transaction occurs, the node will timestamp the transaction based on this local system clock.
The following picture shows the clock inside the node:
The timestamp of the final confirmation or rejection of the transaction will also be based on this local system block. In traditional consensus mechanisms (such as Proof of Work PoW and Proof of Stake PoS), all nodes need to communicate with each other to coordinate each other's local clocks to ensure that they have a consistent understanding of time when processing transactions. Communication between nodes helps establish a common time base to ensure that the entire network has a consistent perception of time, thereby coordinating the order and confirmation of transactions.
For a distributed blockchain, with thousands of nodes distributed around the world, differences in local system clocks between nodes are inevitable, resulting in transaction timestamps being inconsistent between different nodes. This becomes a problem when nodes need to agree on which transactions occurred and the order in which those transactions occurred in the block. This is known as the timestamp synchronization problem, and it becomes more severe and complex when a network increases decentralization by increasing the number of nodes.
Ultimately, this creates a possible path for malicious attacks. The difference in time allows malicious actors to broadcast fake transactions that resemble real timestamps in an attempt to take over the network. To prevent manipulation of transactions, it takes significant time and processing power to verify the accuracy of the timestamps. This has the potential to cause delays in block confirmation, or even block rejection (as nodes may vote the block to be invalid due to having a different timestamp).
2. What is Proof of History (PoH)
Proof of History (PoH) is used in Solana to prove that transactions were correctly sequenced, and this can be easily verified by validators in the network.
Contrary to the situation mentioned in the first section where nodes each have their own independent clock, PoH can be regarded as a global block that all nodes use for verification The passage of time between two events. Through this global clock, nodes look at the same transaction history, discarding any disagreements that might exist about the order of transactions. This allows consensus to be reached quickly, greatly reducing the time it takes for transactions to be verified and added to the blockchain.
PoH relies on an encryption method to create a continuous, chronological record of transactions. Let’s take a closer look.
3. In-depth discussion of PoH technology
Each Each transaction is processed through SHA-256, a cryptographic hash function known for its ability to accept any input and produce a unique, unpredictable output. When a transaction is hashed, its output becomes the input to the next transaction’s hash. This process establishes a built-in order of transactions in the hash output, forming a long, continuous chain.
PoH (Proof of History) utilizes the Verifiable Delay Function (VDF), which verifies the significance of the passage of time in the blockchain. VDFs are computationally intensive functions that rely not only on the previous hash but also on elapsed time. This mechanism allows Solana to cryptographically display the actual time that has passed, generating a continuous output. As a result, there is a clear, verifiable sequence of transactions, ensuring a consistent timeline of events. Validators can therefore easily verify how much time has elapsed, further enhancing the trustworthiness of the network.
Using PoH (Proof of History) in Solana adds a strong layer of security and integrity. Tampering with any part of the hash chain requires recomputing all subsequent hashes, an effort-intensive effort that protects the network from the changes.
PoH (Proof of History) significantly reduces the amount of information that validators need to process per block. By using a hashed version of the latest state of a transaction, block confirmation time is significantly reduced. When a validator (or replicating node) receives a block, the PoH (Proof of History) sequence provides them with a cryptographically reliable order of transactions that they can trust without re-verification. This efficiency is critical to speeding up the consensus mechanism as the network can quickly select and move on to the next validator for block validation.
4. Delegated Proof of Stake (DPoS)
Based on a better understanding of PoH, this section will explain how PoH is applied in Solana's consensus mechanism (DPoS).
In DPoS, every validator who stakes $SOL is able to participate in network governance - voting on the validity of blocks and deciding whether to add them to the blockchain. $SOL holders (including you and me) who don't want to directly participate in the proof-of-stake process can delegate their tokens to other validators, effectively making them delegators. This delegation process allocates delegators’ voting power (proportional to the amount of $SOL they own) to these validators. In return for staking $SOL, delegators will receive a portion of the block reward.
The operating principle of the DPoS system is that nodes with greater stakes are more likely to be selected to verify transactions and add them to the blockchain, gaining area The opportunity for block rewards encourages nodes to maintain high levels of performance and integrity.
After understanding both DPoS and PoH, let’s combine this knowledge to outline what a typical block confirmation looks like on Solana.
5. High-level overview of Solana consensus mechanism
1. Selection of leader nodes: Leader nodes are responsible for generating PoH sequences (Proof of History sorting transactions) and creating blocks.
This selection process is based on the stake weight of nodes, which is increased by token holders delegating to them. Leadership roles will rotate among validators.
2. Add timestamps to transactions: The leader node will receive transactions and use PoH to timestamp them to form a transaction sequence.
3. Block creation: Through the sequence from PoH, the leader node then starts to create a block.
4. Block propagation: Newly created blocks will be sent to replica nodes (other validators in the distributed network).
5. Transaction validity verification, the replication node will verify the following two components:
a. Transaction sequence: Use PoH sequence to verify that transactions are in the correct order. Since it is a global clock, this verification does not require round-trip communication between nodes (unlike common consensus mechanisms like PoW and PoS).
b. Transaction validity: Check whether the transaction complies with network rules and is valid.
6. Block finalization: After verifying the transaction sequence and validity, the block will be added to the blockchain. Then the next leader node will be selected and the whole process starts over.
Conclusion
Solana has been working tirelessly to improve its blocks Chain architecture, recent developments include QUIC, equity-weighted QoS, and localized fee markets. Furthermore, the ecosystem is looking forward to significantly increasing its efficiency with the launch of Firedancer. It is worth noting that Solana’s unique architecture - OPOS (Solana only) may bring new use cases.