After the introduction of Bitcoin in 2009, alternative currencies like Ethereum developed a better version of the decentralized blockchain system for crypto-traders. The transitions keep coming as new blockchain systems enter the market, each with its own added features and functionalities.
Solna brought a revolution to the blockchain systems by introducing new consensus mechanism protocols. Making the blockchain network faster, more secure, and scalable. With roughly 65,000 transactions per second (TPS), Solna has outpaced Ethereum (15 TPS) and Bitcoin (7 TPS). Solana has attributed this speed to its innovative consensus mechanism, called Proof-of-History.
Conventionally, the validator nodes solved the mathematical puzzle to validate the block and broadcasted the solution in the network. The nodes then compared the validated block by other nodes with their ledger to confirm its authenticity. The nodes then broadcast their votes on the network and if the blocked receives majority votes, it is added to the blockchain.
In Solana, the leader node creates a proof of history for each transaction and broadcasts it to the validators. The leaders are the selected computers that create a cryptographic proof of history that is to be validated by the nodes. The nodes then vote on the validity of a transaction and send their votes to the leader node for audit.
Table of contents
The Crypto Trilemma
Blockchain developers often deal with the crypto trilemma while making a scalable, decentralized, and secure blockchain network. Different algorithms and techniques are utilized to improve the key aspects of the network. Thus, making sure that the transactions are authentic and the ownership of the currency is not fraudulent.
Some of the standard features of blockchain are:
- P2P networking
- Decentralization
- Consensus mechanism
- Transparent transactions
- Correct verification of transactions
These features are an indispensable part of all the blockchain networks, however, the protocols vary. To put it simply, different blockchain systems have their own way of incorporating these features in their working models.
However, every blockchain network has a mechanism to ensure that the nodes on the network agree on the transactions. That’s why the transactions are transparent and can be proved through computational means. The reason why blockchain networks are so focused on decentralization is that centralized digital currencies are more prone to the government’s influence and hackers.
Blockchain networks use the basic economic principle of incentives to ensure authenticity. Nodes have to validate a block correctly to get a reward. Similarly, the node is penalized if it validates a fraudulent transaction. This validation is done by complex mathematical algorithms.
Let’s see how the Proof-of-History mechanism has helped Solana tackle the crypto trilemma.
Proof-of-History
Proof-of-History (PoH) is mistakenly considered a consensus mechanism. This computational technique has been popularized by the Solana network. It verifies the time between the transactions.
PoH makes network computing faster because the transactions are already sequenced. The nodes do not have to communicate to verify the order. This allows them to quickly validate transactions and add new blocks to the blockchain. The transactions can be seen as input or output signals. When we look deeper into the code, we might only see hexadecimal strings traveling back and forth between the nodes.
Proof of History mechanism requires nodes and master nodes just like any other decentralized peer-to-peer network. The nodes can be of different nature depending on the functionality of the blockchain network. For instance, Solana is for decentralized applications, NFTs and much more.
However, all the nodes need a routing function in order to be connected to the network. The routing function helps in the discovery of new nodes and connects with them. Routing also allows them to get partially synchronized with other nodes in the network whenever needed.
Some nodes have a complete backup of the blockchain data, while others only have a few segments of it. To put it simply, all the nodes have different functionality depending on their needs.
In Solana, the validators exist in clusters but are only partially synchronized whenever they are assigned the same transaction to verify. The validators are selected through a proof-of-stake consensus mechanism and the verification is done through the proof-of-history mechanism. Basically, a hybrid of both mechanisms is used to operate the blockchain system. There are other nodes in the Solana network, such as verifiers. They are supposed to create a state of the blockchain to ensure availability of blockchain data.
How Proof of History Works
Through the PoH mechanism, the transactions are taken in by the leader node as input, and the internal clock objectively measures the order of the transactions. This is how a verifiable sequence of hashes is created.
Proof-of-History allows the network to cryptographically verify the time delay between two transactions. This is conducted through a Verifiable Delay Function (VDF). As the name implies, VDF allows nodes to verify that a certain amount of time has passed since the last transaction has occurred.
The time delays allow the network to evaluate the transactions on the basis of time. The transactions are hashed in a sequence and the time delay between them proves that a transaction has actually happened.
It is a bit difficult to imagine the whole concept of Proof of History primarily because of its complex and unique operational characteristics.
Let’s take an example of three transactions that have taken place in the Solana network. The transactions are named X, Y, Z for simplicity. As per the Proof of History protocol, these transactions will be executed in order. Let’s take a look at this sample illustration to get a better understanding of the concept.
The input is taken as follows:
In the PoH mechanism the transactions are time stamped and hashed along with the information about the time of previous transactions. This process is done by the leader node. Hence, the passage of time between two transactions is easily determined. This passage of time is actually proof that the transaction has happened in real time.
Voting in Proof of History
The validators have to vote on the cryptographic proof of the history of the transaction. In order to prove that certain contents in the dataset existed at a particular time.
Let’s see how voting happens in the PoH network.
Transactions are received by a master node that generates cryptographic proof of the transactional history. This is done by appending a timestamped transaction with the previous hash. So every hash in the network contains information regarding the prior transaction, which makes it easy to calculate the time delay between two transactions.
The appended hashes are then sent to the validator nodes that solve the hash through sequential computing. Then, they vote on the validity of the transaction by creating the same transaction state as generated by the master node.
The validator nodes again append the hash with their signature and the client’s private key. Once this is done, the validators vote on the cryptographic proof by publishing their signed state of the transactions. If a cryptographic proof receives 2/3rd majority votes within a specific time, the transactions are considered authentic.
Validator nodes when send the validated transaction back to the leader node they add theri signature, private key and data regarding the previous hash. Thus a to and fro communication happens between the validaters and the leader node.
PoH in terms of Scalability
The PoH mechanism has made Solana more scalable as compared to Bitcoin or Ethereum. Scalability defines the ability of nodes to process transactions faster to keep up with the constant inflow of transactions verification.
In consensus models like Proof of Stake or Proof of Work, the transactions inside the blocks are in random order. The nodes have to communicate back and forth to sort the data in order according to their timestamps which lengthens the process of time consensus in the blockchain network.
However, in Solana, the transactions are hashed in order. The validators then verify the order and time of the transaction through sequential computing.
The consensus on time through Proof of History is incredibly fast as the time is already hashed in the transactions. That makes it easier for the nodes to keep up with the massive influx of transactions. The validators in the network are partially synchronized, which makes the communication even more efficient.
The synchronization between the validators is transitive. This means the validators can mix their states into the sequence through the process of horizontal scaling.
PoH in terms of Security
Proof of History is a computational method through which the hashes are generated in a sequence. This function also ensures the security of the network as the output cannot be predicted by the input hash. The validators can regenerate the output from the same method of sequential computing.
PoH has been popularized by Solana, which uses the bitcoin’s algorithm SHA256 to hash the transactions. In the Solana network, instead of blocks, a stream of hashes is created.
The validators have to run the whole sequence of indexes through the same function in order to generate a series of hashes.
The validators regenerate the output, which is then entered as an input into the same function to generate the next output. This means that without solving the previous hash, the following hash cannot be decrypted. The data is already timestamped; hence the validators know the order of the transactions.
Through PoH, the time is embedded in the hash, which ensures that every transaction takes place at a certain point in time. When a master node creates a cryptographic proof of history, others can vote on it to validate the transaction and add a new block to the blockchain. The fraudulent votes can easily be detected by other validators.
Long Range Attacks in PoH
A long-range attack occurs when a hacker tries to insert malicious transactions into the ledger by overtaking it. Due to the fast speed of the master node and the voting time of just 500ms, the attacker will have to perform faster than the speed at which cryptographic proof of history is generated and voted on in the network. This is almost impossible as the Solana network has other security measures to detect malicious acts.
Moreover, the block is added to the block when it receives 2/3rd of the majority votes that are taken within 500ms of the timeout. This makes it impossible for the hacker to look into the votes of other validators. Hence, the high speed and sequential computing in PoH prevents the network security from getting compromised.
How are Errors handled in PoH?
A hardware error or a bug can cause the validator to generate an incorrect hash. The other validators can simply omit that hash by not voting for it. Every validator in PoH has a specific identity through which it can sign the transactions and publish them for voting. In case the master node fails to perform, a new master node is selected from the validators based on their performance in the network.
If two different states are signed by the same validator, it means that a validator has voted for different sequences. The wrong vote is detected, the voter is penalized, and the coins put at stake are compromised. A malicious event can be easily detected if any of the nodes detect that the event is not in sequence with the previous hash.
Parting Comments
Proof of History is one feature of Solana which makes the network processing faster when combined with the staking mechanism of Proof of Stake. The verifiable delay function is a complex computing mechanism incorporated in PoH, which enables the nodes to track time rationally. The information regarding transaction time, the time taken by verifier, and the time taken by validators to implement VDF is used in PoH processing. This makes Solana faster and more secure than its competitors.
The throughput in the Solana network will increase as more nodes join the network. The validation of cryptographic proof of history can be done with the help of a 12-core CPU with 128GB RAM along with some additional compatibility requirements. However, PoH is not the only thing happening in Solana, there are other computing techniques that run in parallel to PoH such as AVX512f and SHA-NI that accelerate the processing of transactions.