What is Proof of History and Why it’s Better Than Proof of Stake
One of the most difficult problems in distributed systems is agreement on time.
Bitcoin and Ethereum are widely lauded for pioneering the concepts of blockchain and smart contract platforms respectively, but both also come under heavy criticism for their lack of scalability. Even with the evolution of Proof of Stake, side-chains, rollups and sharding, projects are still struggling to deploy a scalable, cost-effective and secure blockchain.
However, a new player recently entered the race. It’s not a new consensus protocol — rather, a means of speeding up consensus. A blockchain project called Solana had developed a secure, scalable blockchain that can handle up to 50,000 transactions per second.. How does it achieve this? It uses a feature called Proof of History to determine the passage of time, which, in turn, considerably reduces the weight of consensus.
Proof of History
Proof of History (PoH) aims to lighten the load of the network nodes in processing blocks by providing a means of encoding time itself into the blockchain.
In a PoW scenario, the successful block miner is the first to find the correct nonce, which requires a certain amount of computing power to perform. However, PoH uses a newer cryptographic concept called Verifiable Delay Functions (VDFs.) A VDF can only be solved by a single CPU core applying a particular set of sequential steps.
Nodes in a traditional network can’t trust an external source of time or any timestamp that appears in a message. Hashgraph for example, solves this problem with a “median” timestamp. Each message that is seen by the network is signed and timestamped by a supermajority of the network. The median timestamp for the message is what Hashgraph calls “fair” ordering. Each message has to travel to the supermajority of the nodes in the system, then after the message collects enough signatures, the entire set needs to be propagated to the entire network. As you can imagine, this is really slow.
Decentralized networks have solved this problem with trusted, centralized timing solutions. For example, Google’s Spanner uses synchronized atomic clocks between its data centers. Google’s engineers synchronize these clocks to a very high precision and constantly maintain them.
PoH solves the time challenge, and thus reduces the processing weight of the blockchain, making it lighter and faster.
Clock before consensus, reduces messaging overhead and drastically increases scalability.https://entre.army/media/c0075e8a6edb43dc07e70044e0639f26
With every node in the network able to easily verify time stamps of transactions Proof of History systems are able to achieve throughputs of 15,000 transactions per second. Because it avoids the “soft” delays in speed, Proof of History is able to scale transaction throughout with Moore’s Law.
Moore’s law is the observation that the number of transistors in a dense integrated circuit doubles about every two years
This means PoH transaction costs are almost purely pased off hardware expenses.
On Solana, it costs roughly $10 for 1 million transactions. This is extremely cheap compared to Ethereum’ s gas fee of $4-$80 per transaction.
Let’s get Technical
Proof of History relies on a new cryptographic concept known as Verifable Delay Functions (VDF). You can solve a VDF with just one CPU core using an exact set of sequential steps. Since parallel processing isn’t allowed, it’s easy to determine how long each step took. Thus the passage of time is clear — solving the time challenge.
Each node is given access to a VDF which will make sure each block procedure can prove they’ve waited the needed amount of time so the network can move forward.
The next producer needs to locally generate a portion of the VDF until the scheduled slot. As soon as nodes are received the state transition can begin. This is because they’re is cryptographic proof that the producer followed the protocol in place.
Solana can confirm 25 blocks by 25 validators whereas other networks can only confirm one.
Is it Secure?
Solana, the first blockchain project to successfully implement proof of history at scale, combines PoH with a security protocol called Tower Byzantine Fault Tolerance (Tower BFT), which allows participants to stake tokens so they can vote on the validity of a PoH hash. This protocol penalizes bad actors if they vote in favor of a fork that doesn’t match the PoH records.
Breaking it down even further
The Proof of History is a high frequency Verifiable Delay Function. A Verifiable Delay Function requires a specific number of sequential steps to evaluate, yet produces a unique output that can be efficiently and publicly verified.
Our specific implementation uses a sequential pre-image resistant hash that runs over itself continuously with the previous output used as the next input. Periodically the count and the current output are recorded.
For a SHA256 hash function, this process is impossible to parallelize without a brute force attack using ²¹²⁸ cores.
We can then be certain that real time has passed between each counter as it was generated, and that the recorded order each counter is the same as it was in real time.
Upper bound on Time
Data can be inserted into the sequence by appending the hash of the data to the previous generated state. The state, input data, and count are all published. Appending the input causes all future output to change unpredictably. It is still impossible to parallelize, and as long as hash function is pre-image and collision resistant, it is impossible to create an input that would generate a desired hash in the future, or create an alternative history with the same hashes. We can prove that time passed between any two append operations. We can prove that the data was created sometime before it was appended. Just like we know that the events published in the New York Times occurred before the newspaper was written.
Lower bound on Time
Inputs into Proof of History can have references back to Proof of History itself. The back reference could be inserted as part of a signed message with the users signature, so it cannot be modified without the users private key. This is just like taking a photograph with the New York Times newspaper in the background. Because this message contains 0xdeadc0de hash we know it was generated after count 510144806912 was created.
But since the message is also inserted back into Proof of History stream, it is as if you took a photo with the New York Times in the background, and the next day the New York Times published that photo. We know that the content of that photo existed before and after a specific day.
While the recorded sequence can only be generated on a single CPU core, the output can be verified in parallel.
Each recorded slice can be verified from start to finish on separate cores in 1/(number of cores) time it took to generate. So a modern day GPU with 4000 cores can verify a second in 0.25 milliseconds.
Projects using Proof of History:
Solana: because Solana is built using Proof of History, their is no need for dApp builders to deal with sharding and roll-ups. Solana is currently open for public use on the mainnet.
Proof of history can achieve lighting fast speeds:
- 15,000 TPS
- $0.00025 cost per transaction
- Scale without side chains or sharding