The Ethereum project is in the process of getting rid of the Proof Of Work Algorithm. We’re going to see a Proof Of Stake algorithm running at a significant scale (Casper).

But what are these Proof Of Work and Proof Of Stakes algorithms? What are they used for exactly? And are they important?

In the three pillars of the Blockchain, I described the core components of Distributed Consensus:

Imagine a system with NO Proof Of …

We have a network of servers connected through P2P protocols. These machines use Blockchain Structures to store and compare data.

Each participant broadcasts every new Block. It’s like a virus spreading.

But what happens when multiple users submit operations to different servers?

Each server receives a block and broadcasts it, from one machine to the next. They spread and some servers receive both Blocks.

The blockchain relies on the idea that we allow only a single CHAIN of events. These servers must make a choice:

“Keep the block I already know”
When a machine is contaminated, it never changes again, the system freezes.

“Accept the new block”
Each machine changes its mind whenever another participant sends them a block. The system oscillates and converges very slowly. Or it never agrees on a single Block.

In both cases, the network may never reach a consensus ever again!

Distributed System, Pre-Blockchain

What we have so far is a common model in Distributed Systems. We should allow a single leader to emit modifications.

In the case of Distributed System, this is a good enough solution. Having a single server responsible for changes is simple to implement and reliable. It spares us from dealing with concurrent modifications of the database.

But we need to trust all the members to agree on ONE leader. And we need to trust them to broadcast changes coming from the leader ONLY.

The keywords Leader Election and Master-Slave Replication signal this “semi-centralized” model. For example:

In a decentralized system, we cannot rely on the same algorithms. We do not know every participant; they may connect, disconnect, cheat and lie, etc.

That’s where we use Proof Of …

Methods like Proof Of Stake of Proof Of Work give each member of the network a “recipe” to accept blocks. This recipe allows each participant to take local decisions. They know which block to keep, which to broadcast and which blocks to ignore.

They are local rules that make the system converge globally to a new consensus. These algorithms enable networks such as Bitcoin and Ethereum to decide on a single block among the millions that may be submitted at any moment.

This is an introduction. Later we’ll dig deeper into each algorithm: Proof Of Work is a cornerstone piece of technology. And the Proof Of Stake is a clever way to reimplement leader election.

Photo by Laura Kranz.