Proof of History: How Solana brings time to crypto

by Solana Foundation

Proof of History: How Solana brings time to crypto

This article is part of a series that explains the core technical innovations behind Solana, the world’s most performant blockchain.

Time is a construct. No, really.

It used to be all a matter of perspective. Not that long ago, time was determined by how high the sun was in the sky. Every town had their own version of the time — which was fine, because each of the towns did not need to interact with each other. You could only get to the next town based on how fast you could physically travel, like on a horse or by foot. If noon was a few minutes earlier in your town versus a town a hundred miles to the west, what did it matter? What’s the difference if there’s no way to communicate with them any faster than how fast a horse can gallop?

Then the railroads arrived, and people started moving a lot faster. And those couple of minutes difference started to become a problem. Things needed to be on an accurate schedule so you could plan ahead — you needed to know when a train was going to leave New York and arrive at Philadelphia, Pittsburgh, Cleveland, and Chicago so you could sell goods, send information, and even arrive at the right time. So on November 18th, 1883, American railroads adopted four time zones to standardize time across the United States.

As communication got faster, this idea of standardized time persisted. Computers and phones will check back with a centralized clock when connected to the internet to make sure their internal clocks are accurate.

But how do you determine time when there is no single, centralized clock? How do you validate information without a central source of time?

Have you got the time?

This time problem gets pretty difficult in distributed systems. When you need to move fast and process transactions as soon as possible, you need to be able to time in small units. But many programmable blockchains, like Ethereum, rely on outside programs to assign a “median” timestamp — which they then use to validate transactions in the order they were received.

But referring back to a centralized source defeats the purpose of a decentralized system. Solana solves this problem by using an innovative technology called Proof of History, which allows these “timestamps” to be built into the blockchain itself. This is done through a verifiable delay function, a VDF.

“Every block producer has to crank through the VDF, this proof of history, to get to their assigned slot and produce a block,” says Anatoly Yakovenko, co-founder of Solana Labs.

Solana does this by inserting data into the sequence by appending the hash of the data of the previously generated states. The state, input data, and count are all published — and impossible to recreate or create alternate versions of. This sets up an upper bound on time — and because Proof of History can reference previous hashes, there is also a lower bound of time. While this VDF won’t tell you it’s 12:02:01 PM, it will tell you exactly when in the past and future of the global state machine a transaction occurred.

The block producers are doing this locally, in approximate real time, with a SHA256 hash function — which is what most major chip manufacturers are optimized towards. And using this hash to keep track of time, Yakovenko says, “gives the ledger this interesting property where you can infer when events occurred when you examine it.”

Using time to move quicker

Why is proof of history important? Well, if you know the precise time, you can validate information a lot quicker.

Imagine you wanted to send a very important letter on a train that leaves New York and arrives in Chicago at 5pm, stopping at Philadelphia, Pittsburgh, and Cleveland along the way. And because this letter is so important, you want to verify that this is indeed the train with that letter every time it stops — and not the train going from Boston to Atlanta, Detroit to New Orleans, or even New York to San Francisco.

On Other Chains Railways, it would take a ridiculous amount of time and resources to determine that the information was correct every time the train stopped because there’s no schedule.The train station attendant in Cleveland would have to contact their counterpart in each of the other cities to confirm that this was the correct train — “Hey there, Philadelphia, did this train stop by you?” “Hey Chicago, are you due to get a train from New York?” — because there’s no mark on the letter itself. They could potentially check in with a centralized schedule, but because it’s centralized, any inaccurate (or tampered) information could mess up the whole process. It could take hours to get ahold of everybody and verify everything.

On the Solana Railroad, though, every time that train stops, the letter gets a stamp from that city that includes the time. By the time that train arrives in Cleveland, it already has stamps from Pittsburgh, Philadelphia, and New York — so this train station attendant knows that it’s heading to Chicago and is due to arrive at 5pm. The attendant gives it the appropriate Cleveland stamp and the train heads off in a matter of minutes, instead of the hours spent trying to get in touch with every other station. It saves a ton of time and money.

On the Solana blockchain, any individual node can validate the entire chain with just a small piece of information — even if they’re not connected to the rest of the network. In fact, even if every computer runs at a slightly different speed, the ASIC will stay within 30% of what is bound in the network. “Everybody has this local synchronized atomic clock and these clocks never need to be resynchronized,” Yakovenko says. “So even if we get cut off and communication links go down, our clocks never drift because they are logical based on this SHA256.”

Even better, because the blockchain can be verified by a small piece of info, it means that it can be verified in parallel, or more than one piece can be verified at any given time. Most programmable blockchains can only validate a blockchain one at a time.

Think of it this way: Other Chain Railways only has one attendant doing that long verification process for every letter on the train. But the Solana Railroad has multiple attendants that can check many different letters on the train for their stamps at the same time — which means the trains move much faster.

Learn more

Proof of History is just one of the innovations that make Solana the most performant blockchain in the world.

This is part of a series of articles explaining each of Solana’s core technical innovations. You can read the rest of them here.