How 12th Century Byzantine Generals solved a 21st Century Blockchain problem

Sanjeet Sahay
Jul 10, 2017 · 3 min read
Byzantine General’s Problem

A brief description of the problem

Suppose there are multiple generals surrounding an enemy castle. Each general commands a piece of the Byzantine army. Each general can talk to another only through messengers. The generals may decide to attack or retreat only if they ALL agree. It makes sense doesn’t it? Imagine what happens if some agree to attack and some do not. Do you think they can ever win? To add to this consensus or agreement problem, there is a possibility that one or more generals can be traitors. Spooky!

The problem is how many traitorous generals can the army have and still function as a unified force?

Connecting the dots

You might be wondering how is this historical puzzle relevant to the Blockchain technology. Read the second paragraph again. The answer is simple — Byzantine General’s problem tries to solve Consensus (agree or disagree for an attack or retreat decision) and problem of reliability (traitors can cause Faults in the system) in a decentralized system (multiple Generals). Imagine each Byzantine General as a node in the decentralized system. Each node carries the Blockchain ledger and participates as equals to solve the cryptographic problem.

Is there a Solution?

Do we have a solution to this problem? Well, I thought you wouldn’t ask. The solution to this problem is: Practical Byzantine Fault Tolerance (PBFT).

PBFT ensures that a minimum of 2*f + 1 nodes reach consensus on the order of transactions before appending them to the shared ledger. A PBFT network guarantees data consistency and integrity despite Byzantine faults on fewer than one-third of all network nodes.

Did you say, Consensus?

I thought consensus was a thing of “democracy”. Does it apply to Blockchain as well? Why is it important?

Consensus is a method for validating the order of requests, or transactions (deploy and invoke), on a blockchain network. The correct ordering of transactions is critical, because many transactions have a dependency on one or more prior transactions (account debits often have a dependency on prior credits, for example).

On a blockchain network, there is no centralized authority that determines the transaction order; instead, many validating nodes (or peers) implement the network consensus protocol. Consensus ensures that a quorum of nodes agree on the order in which transactions are appended to the shared ledger. By resolving any discrepancies in the proposed transaction order, consensus guarantees that all blockchain network nodes are operating on an identical ledger. In other words, consensus guarantees the integrity and consistency of all blockchain network transactions.

Practical Implementations

There are two prominent PBFT implementations in use today:

Proof of Work is the most popular method; used in Bitcoins; repeatedly run algorithms to validate transactions of the system’s other participants

Proof of Stake punishes nodes that do not follow consensus protocol; participants bet a predefined amount of digital assets (e.g. Bitcoins) on a consensus outcome. If the outcome doesn’t take place then the malicious node loses their assets; this requires fewer laborious computation than POW.

In the followup posts, I will try to explore the Blockchain frameworks that have implemented the above consensus mechanisms in easy, digestible chunks.

Sanjeet Sahay

Written by

Solutions Architect

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade