Solana: Delegated Proof-of-Stake (DPoS) and Proof-of-History (PoH)
Summary:
Solana is known as the “Ethereum killer” in the blockchain world due to its high performance. This article explores two key mechanisms in Solana that contribute to its high throughput: Delegated Proof-of-Stake (DPoS) and Proof-of-History (PoH).
Table of Contents:
1. Traditional Consensus Mechanisms
2. What is Proof-of-History (PoH)
3. Technical Deep Dive into PoH
4. Delegated Proof-of-Stake (DPoS)
5. High-level Overview of Solana’s Consensus Mechanism
Conclusion
The consensus mechanism of a blockchain is responsible for validating the validity of transactions and adding them to the blockchain in the correct order. The efficiency of the verification and ordering process varies depending on the chosen consensus mechanism, resulting in different levels of throughput. In the blockchain space, Solana is a high-performance chain with a block time of 400 milliseconds and an average transactions per second (TPS) ranging from 2,000 to 3,000, with a theoretical peak TPS of 65,000 (for reference, Ethereum’s TPS is approximately 12).
This article aims to highlight two frameworks in Solana that play a crucial role in its high throughput: the Delegated Proof-of-Stake (DPoS) consensus mechanism and the Proof-of-History (PoH) mechanism.
Let’s start by understanding a key bottleneck in blockchain: scalability.
In a decentralized blockchain network, each node has its own internal clock and executes based on this local system clock. When a transaction occurs, the node adds a timestamp to the transaction based on this local system clock.
The image below shows the internal clocks of the nodes:
The final confirmation or rejection of the transaction is also based on this local system clock. 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 their local clocks and ensure a consistent understanding of time when processing transactions. The communication between nodes helps establish a common time reference to ensure a consistent perception of time throughout the network, thereby coordinating the order and confirmation of transactions.
For a decentralized blockchain with thousands of nodes distributed worldwide, it is inevitable that there will be differences in the local system clocks of the nodes, leading to inconsistencies in the timestamps of transactions among different nodes. This becomes a problem when nodes need to reach a consensus on which transactions occurred and the order of these transactions in a block. This is known as the timestamp synchronization problem, which becomes more severe and complex as the network enhances decentralization by increasing the number of nodes.
Ultimately, this creates a potential path for malicious attacks. The time differences allow malicious actors to broadcast false transactions with timestamps similar to the true timestamps, attempting to manipulate the network. To prevent manipulation of transactions, a significant amount of time and processing power is required to verify the accuracy of timestamps. This could potentially lead to delays in block confirmations or even rejection of blocks (as nodes may vote to consider a block invalid due to different timestamps).
Proof-of-History (PoH) is used in Solana to prove that transactions are correctly ordered, and this can be easily verified by validators in the network.
In contrast to the case where each node has its independent clock mentioned in the first section, PoH can be seen as a global clock that all nodes use to verify the passage of time between two events. Through this global clock, nodes view the same transaction history and eliminate any potential disagreements in the order of transactions. This allows for quick consensus, greatly reducing the time it takes to verify transactions and add them to the blockchain.
PoH relies on a cryptographic method to establish a continuous, chronological record of transactions. Let’s dive deeper into this.
Each transaction undergoes SHA-256 processing, which is a cryptographic hash function known for its ability to accept any input and generate a unique, unpredictable output. When a transaction is hashed, its output becomes the input for the next transaction’s hash. This process establishes an inherent order of transactions in the hash output, forming a long and continuous chain.
PoH leverages a Verifiable Delay Function (VDF), which verifies the importance of time passage in the blockchain. VDF is a computationally intensive function that depends not only on the previous hash but also the time elapsed. This mechanism allows Solana to cryptographically demonstrate the passage of real-time and generate a continuous output. As a result, there is a clear, verifiable transaction order, ensuring a consistent timeline of events. Validators can easily verify how much time has passed, further enhancing the credibility of the network.
The use of PoH in Solana adds a powerful layer of security and integrity. Any tampering with parts of the hash chain would require re-computation of all subsequent hashes, which is a computationally intensive task and protects the network from alterations.
PoH significantly reduces the amount of information that validators need to process for each block. By using the most recent version of the hash of the transaction state, the block confirmation time is greatly shortened. When validators (or replica nodes) receive a block, the PoH sequence provides them with an encrypted and reliable transaction order that they can trust without the need for re-verification. This efficiency is crucial in speeding up the consensus mechanism as the network can quickly select and move on to the next validator for block validation.
With a better understanding of PoH fundamentals, this section will explain how PoH is applied in Solana’s consensus mechanism (DPoS).
In DPoS, each validator who stakes $SOL has the ability to participate in network governance by voting on the validity of blocks and whether to add them to the blockchain. $SOL holders (including you and me) who are not willing to directly participate in the PoS process can delegate their tokens to other validators, effectively making them delegates. This delegation process allocates the voting power of the delegators (proportional to the amount of $SOL they hold) to these validators. In return for staking $SOL, the delegators receive a portion of the block rewards.
The operation principle of the DPoS system is that nodes with larger stakes are more likely to be selected to validate transactions and add them to the blockchain, increasing their chances of receiving block rewards. This incentivizes nodes to maintain high levels of performance and integrity.
Having understood both DPoS and PoH, let’s combine this knowledge to outline what a typical block confirmation looks like on Solana.
1. Leader Node Selection: The leader node is responsible for generating the PoH sequence (ordering transactions) and building a block.
This selection process is based on the weight of the node’s stake, which increases through delegation by token holders. The role of the leader rotates among validators.
2. Adding Timestamps to Transactions: The leader node receives transactions and adds timestamps to them using PoH, forming the transaction order.
3. Block Building: Using the PoH sequence, the leader node then starts building a block.
4. Block Propagation: The newly built block is propagated to replica nodes (other validators in the decentralized network).
5. Transaction Validity Verification: Replica nodes verify the following two components:
a. Transaction Order: Verify if transactions are correctly ordered using the PoH sequence. This verification does not require round-trip communication between nodes (unlike common consensus mechanisms like PoW and PoS) because it is based on a global clock.
b. Transaction Validity: Check if transactions comply with network rules and are valid.
6. Block Finalization: After verifying the transaction order and validity, the block is added to the blockchain. Then, the next leader node is chosen, and the entire process restarts.
Solana continues to strive for improvements in its blockchain architecture, with recent developments including QUIC, stake-weighted QoS, and localized fee markets. Additionally, the ecosystem is eagerly anticipating the significant efficiency boost from the launch of Firedancer. It is worth noting that Solana’s unique architecture, OPOS (Only on Solana), may bring new use cases.
Related Reports
Solana can be used as an Ethereum Layer 2! Founder claims EVM compatibility after sharding upgrade.
USDP, the stablecoin entering Solana’s ecosystem, expected to explode with Paxos’ launch?