How Solana’s Proof of History Actually Works

A detailed, non-technical guide on what makes Solana’s Proof of History so special

Agbakwuru Chisom
8 min readNov 22, 2021
Photo by Moritz Kindler on Unsplash

Over the last two years, Solana has gained a lot of attention in the crypto space. With the problem of ever-growing gas fees and long transaction times being experienced within the Ethereum and Bitcoin network (currently at about 7&13 TPS respectively), Solana’s claim of being able to reach peak transaction times of over 65,0000 transactions per second and transaction fees as low as $. 00001 of a cent to be exact, make it pretty hard to ignore.

To recap, blockchain technology at its simplest is a trustless, peer-to-peer, decentralized network of computers that verifies transactions in a digital ledger. One of the most important features of a blockchain is its mechanism of reaching consensus which is simply a way different people around the world agree on what gets to be added to the blockchain. The problem here is that these different people are spread around the world with different time zones and everyone has to agree on the order of events before they can be entered into the blockchain.

Up until Solana previous blockchains required miners to communicate with each other to agree on the time and order of transactions. For example, imagine you worked in an office with about a hundred staff(miners) and your jobs were to confirm customer transactions and enter them into a ledger after which you earned a fraction of each transaction as commission. You and every other one of your colleagues had to confirm a group of transactions and this was done by writing all the transaction details on a sheet of paper (blocks). The first person to complete this task then had to submit a copy of this sheet to all of his/her other colleagues to confirm if they wrote the transactions in the right order and make sure there weren't any false transactions added (consensus) before it could get entered into the ledger (blockchain) and earn the worker his/her commission. This is a simple way of explaining how Bitcoin and Ethereums Proof of Work (PoW) is carried out. Yes, this process is as tedious as it sounds but more importantly it makes transaction speed slow and Gas (transaction cost) high.

This problem led to Proof of Stake(PoS) which is Solana’s actual consensus mechanism. So what is Proof of History (PoH)? and where does it come into play? Well, PoH is not a consensus mechanism but a historical record that serves as a kind of “global clock” which reduces the time validators spend communicating with each other before reaching consensus using Solana's actual consensus mechanism (PoS). The system does this by using a verifiable delay function (VDF) to cryptographically chain transactions or events in order of sequence, thereby creating reliable proof of the historical order of events.

For non-technical people, this might be a bit confusing so let’s break it down by understanding why time and order are so important in a blockchain. In our first example, we established that transactions had to be verified before they can be entered into the blockchain (ledger). Only after this does it become valid. This is important in preventing double-spending. Double spending is a case whereby a person spends a digital currency more than once. For instance, if James has two BTC and sends it to Anna but it hasn’t been recorded in the blockchain yet, then he can’t spend that 2 BTC again and Anna can’t receive it yet, but if Ann receives it without the transaction being recorded on the blockchain and James sends 2 BTC to another friend, he has double-spent.

Making sure each transaction is verified and entered into the blockchain (ledger) in the right order before it can be confirmed by the parties on both ends of the transaction is very important. The order in which it is entered is particularly important as it acts as a reference for miners when verifying transactions. For example, for a miner to verify James’ transaction of 2 BTC to Anna the miner needs to have past references to know if James has BTC in his account and that it is still there at the time he wants to spend it. But what if prior to James sending two BTC to Anna, he had received and spent some BTC and these transactions weren't stored in the correct order in the ledger, it would be impossible for the current miner to know if James has enough BTC to carry out the transaction.

This is why communication is important as it helps miners agree on the time, but, this is difficult because, in a blockchain, we have to remember that miners are different people spread out across different countries with different time zones, and don't know each other so it's hard to agree if a timestamp placed on a transaction by someone else could be considered valid, but what if it could? This is where PoH comes in.

Solana was designed for speed and it achieves this mainly by an amazing combination of PoS and PoH. In our first example, the worker(miner) who was able to finish writing down his transactions the fastest was the next person the enter his block into the ledger (blockchain), and we described this as PoW. It's a secure way of making sure workers (miners) do the right thing in the office(network) as they wouldn't want to waste energy just to get their block rejected, thereby losing their commission.

In Bitcoin, miners actually, solve mathematical puzzles using computers to show PoW. PoS removes this process by replacing miners with validators. A validator is simply chosen to confirm the transactions and then sends his or her block of transactions to all other validators for final validation (consensus) before its added to the ledger. For security, each validator has to stake his/her cryptocurrency in the network and the validator who is chosen to mine the next block (which earns commission) is chosen based on the value of cryptocurrency he/she has staked. This removes the stress of PoW and at the same time encourages honesty between validators as they could lose both the amount they staked and commission if false transactions were validated.

This is good but still leaves a problem as validators have to still spend time communicating with each other to verify the ordering of events on the ledger. PoH makes this easier by encoding the passage of time in a sequential-hashing verifiable delay function (VDF). A VDF is a function that takes a certain number of steps (thereby a certain amount of time) to evaluate but can be verified in less time than it took to evaluate the function. Hashing on the other hand can be described as converting a set of arbitrary data to a fixed size value. A semi-plausible example of this is with zip codes that map an area in America into an “envelope” (fixed-size value) of five numbers. Because this hash or “envelope” is also a set of arbitrary data on its own, it too could be hashed into another envelope and this could go on forever with each envelope containing its information, this is an example of how sequential hashing works.

Remember we said a VDF is a function that takes a certain amount of time to evaluate but can be verified quickly, now, let’s use an example to explain how it all comes together with sequential hashing. Imagine you lived beside Stamford bridge which is located in fulham, meaning that fulham’s zipcode acts as sort of an envelope or in this case a hash for where you live, going by this you would agree that London of which fulham is an area, acts as a hash for fulham and it continues in that way, England to London, Europe to England and finally the Earth to Europe. If I were to ask where you lived and your answer was “Earth” I would not be able to pinpoint exactly where you live (pre-image resistance). At the same time, if you told me you lived in fulham and then asked me to prove that fulham was on earth, I would have to trace upwards that fulham is in London, London in England, England in Europe, and Europe on Earth. This implies that if you were to give me this string of data starting from fulham and ending at Earth I could quickly verify that the string is correct. Now let’s assume that each time a computer was asked to do this it would have to go through all the areas in London to confirm fulham as one of its areas and, in turn, go through all the cities in England to confirm London as a city and continue in that manner till it reaches Earth. You would notice that it would take a certain amount of time to prove or verify this.

This is a little example of how a sequential-hashing verifiable delay function works on Solana. What it does exactly is that it takes a transaction and hashes it using a SHA-256 hash function which, unlike our given example, is unreadable and cannot be predicted. This generates an unpredictable output which is then used as the input for the next transaction. With this, a validator cannot predict the output of the function from a given input until the function is complete (and a certain amount of time must have elapsed), this output is pre-image resistant. like in our previous example this process must be done sequentially but can be verified pretty quickly.

This record acts as a cryptographic timestamp that provides an easily verifiable sequence of historical events and can prove that a given transaction must have occurred before another transaction and vice-versa, and also, that, a certain period in time must have passed verifying the transaction before another one could have taken place. The process significantly cuts down the time validators spend interacting with each other to agree on the state of the network before consensus. It also gives an undelayed opportunity for the next validator to start validating more transactions with a high degree of certainty that his transactions will eventually be entered into the blockchain and in the right order, unlike previous blockchains who rely on a sequential production of blocks that are hindered by waiting for confirmation across the network before moving forward.

Although Solana is just a part of a number of new blockchain networks which together with off-chain solutions are trying to solve scalability in cryptocurrency, it has gathered a lot of enthusiasts, as seen with the surge of its native currency $SOL, and more importantly an ever-increasing number of dApps being built on the network. Solana is also so early and I’m really excited to watch it all unfold in real-time.

  • If You’re new to Solana, you can learn more about the network here

--

--