Proof of History
Proof of History is a core component of the Solana blockchain's architecture that functions like a universal clock for the network. Before we delve deeper into how it works, we need to clarify some details.
Ticks
First, in our introduction to Solana, we wrote that Solana's block time is 400 ms - in reality, it's the ideal block time the chain is aiming for, but there's a drift window that allows both faster and slower blocks to be produced and added to the blockchain. This drift window for each block slot ranges from -25% to +150% of the ideal block time, so in practice a block slot can be as short as ~300 ms or as long as ~1 s without being rejected by the network's validators - in human time.
And even though there technically is a hard "human time" cap on each block, Proof of History isn't an actual atomic clock - it's more like the beating heart of the Solana network, where each individual heartbeat is recorded and considered to be the basic unit of time within the network. One beat of the Proof of History "heart" is called a tick.
Each tick is a SHA256 hash of the previous tick* - creating a deterministic, cryptografically self-verifiable sequence of "timestamps" the whole network then coordinates around. Each Solana block proposed to the network has to fit the block slot (must fill 64 tick slots), otherwise it will be rejected by validators as invalid. Let's now have a look at how blocks are proposed and what role the PoH mechanism plays.
Epochs and Leader Schedule
In order to add a block of data to a blockchain's ledger, the block has to be first proposed and then confirmed by validators. The block is proposed by a single node, designated to operate as what is called a leader on the Solana blockchain. The leader is the only node with authority to propose a new block to the current block slot, and all other nodes can then check the leader's proposal and either confirm or reject it with their vote. In theory, a node that's currently not the leader can also propose a block, but this block will certainly be rejected by validators because it will not have the current leader's signature in it - this ensures that there is only one leader per block slot at all times. All other nodes that aren't currently the leader are called replica nodes (because they replay a replica of the leader's generated block data and then decide if the block is valid and can be added to the blockchain).
When compared to Ethereum, where the leader node is decided by on-chain randomness seconds before a new block slot starts, the leader for each block slot on Solana is decided by a pre-calculated leader schedule which is calculated every 432.000 block slots, or every 2 days or so in practice. This 2-day period is called an epoch.
When an epoch ends, a snapshot of the state of the blockchain ledger from its last confirmed block is taken and from this snapshot, a list of nodes that meet all conditions to function as a leader is created and ordered by stake* in the network (from largest to smallest). This list is then algorithmically shuffled and new leaders are selected to fill in the 432.000 slots of a new epoch (the bigger the stake, the higher the chance for each eligible node to be assigned as leader to a slot).
There's a one-epoch offset for the schedule, which means that at the end of each epoch, the leader schedule is calculated not for the new epoch that just started, but for the next one after it.
PoH Stream, Transaction Execution and Block Assembly
When a validator becomes the leader for its 4-slot turn, it takes the last tick hash from the last block added to the blockchain and runs a repeated sequence of hashing it and recording the subsequent PoH ticks while also receiving user transactions and interweaving them with the ticks as they come.
This essentially assigns each executed transaction a PoH tick which serves as a timestamp. The leader broadcasts the time-stamped data to the network in real time, and after the 64th tick closes the slot, validators replay the hashes and vote to confirm the block.
The next leader will take the last PoH tick hash and start this process anew. This makes the PoH tick sequence completely unbreakable - if a validator in replica mode receives a block proposal, replays it and finds out it started from a different tick than the last tick of the previous block or that it's shorter or longer than 64 ticks, it will simply cast a "no" vote.
Note that the Proof of History chain itself can’t be faked or reordered, but PoH alone doesn’t stop a leader from proposing two conflicting blocks; Tower BFT, Solana's PoS consensus mechanism, prevents a malicious block from being added to the blockchain in this case.
So, in summary, Proof of History is Solana's built-in clock mechanism in the form of a chain of "ticks" that prove how much time has passed. By weaving each incoming transaction into this chain, PoH gives every validator the same tamper-proof record of transaction ordering, letting the network reach consensus and execute transactions without constant back-and-forth messaging between validators.
In a way, PoH can be thought of as a pre-consensus mechanism - because of it, all nodes agree on the ordering of events without having to speak to one another. But this alone isn't enough to decide if a block should be confirmed, although it makes the process easier. We'll explore Tower BFT, Solana's Proof-of-Stake consensus mechanism, in the next article.
Last updated