and spent a while studying about blockchain, thankfully not from a crypto-bro perspective, however slightly from real curiosity about the way it really works. And whereas I used to be taking place that rabbit gap, I saved bumping into an idea I had by no means heard of earlier than. That was Byzantine Fault Tolerance.
In a nutshell, Byzantine Fault Tolerance is a system property that enables a system to proceed to function correctly, even when some malicious actors are included within the system. So this Water Cooler Small Speak goes to be about Byzantine Fault Tolerance: what it’s, the place it comes from, why it issues, and the way blockchain ended up being one of the crucial elegant options to a really previous downside.
So, let’s have a look!
from Byzantine generals to computer systems
So, Byzantine Fault Tolerance is a system property that owes its title to the next recreation idea downside, particularly the Byzantine Generals Drawback:
A gaggle of Byzantine generals has surrounded a fortress. They need to attain a collective resolution to both assault or retreat. Each the choices of retreating and attacking can work, however provided that everybody acts in coordination. A coordinated assault succeeds. A coordinated retreat additionally succeeds. But when some generals assault whereas others retreat, the result’s defeat.
The communication between the generals is all-to-all and the generals can solely talk by sending messengers to one another. Nevertheless, a few of the generals could also be traitors. Specifically, a traitor doesn’t solely vote the unsuitable means, but in addition tries to deceive the opposite generals by sending conflicting messages to completely different generals. For instance, a traitor could inform one normal to assault and one other to retreat, intentionally making an attempt to create a cut up. In the meantime, the loyal generals haven’t any means of realizing prematurely who the traitors are.
The issue is: is it attainable, and if sure how and beneath which situations, can such a setup of generals attain consensus?
This downside was first formally described by laptop scientists Leslie Lamport, Robert Shostak, and Marshall Pease in their 1982 paper. And whereas the setting is medieval and army, the described downside is without doubt one of the most basic challenges in laptop science. That’s, how do you attain a dependable consensus in a distributed system when a few of the contributors is likely to be sending false info?

In a distributed laptop system, as a substitute of generals we have now nodes: particular person computer systems or servers, every holding a duplicate of some shared state (a database, a ledger, a report of transactions). All nodes of a distributed system must agree on what that shared state of reality is. Just like the generals, they convey by sending messages to one another, and just like the generals, a few of these nodes is likely to be defective.
However why not simply vote? Intuitively, one could assume that every normal might simply ship their vote (assault or retreat) to all different generals, then rely the votes, and do what the bulk proposes. Assault if greater than half say assault, retreat if greater than half say retreat.
The difficulty is that this solely works if every normal (node) actually trusts the messages that they obtain. However in such a community, traitors can also be included, which can ship completely different votes to completely different generals, with the objective of making a cut up resolution. Basic A may obtain a message saying “I vote assault”, whereas Basic B receives a message from the identical traitor saying “I vote retreat”. So, generals A and B could find yourself with completely different concepts on what nearly all of the community determined to do. In different phrases, we will not simply belief the bulk vote as a result of the bulk for every node is likely to be counting completely different messages. And this lack of ability to succeed in consensus is an actual problem for these hypothetical Byzantine generals, as a lot as for distributed laptop networks.
Primarily, that is the definition of what a Byzantine fault is. A Byzantine fault is a fault in a distributed system the place a element doesn’t merely fail, however as a substitute behaves in an unpredictable means. This implies sending conflicting info to completely different nodes, showing to be functioning accurately to some nodes whereas malfunctioning for others, actively producing false outputs, and so forth. Nonetheless, a Byzantine fault doesn’t essentially originate from a malicious actor within the community, since it might probably additionally happen from electrical faults, software program bugs, or {hardware} failures that trigger a node to provide arbitrary outputs. A node with such behaviour is known as a Byzantine node.

In any case, within the unique 1982 paper, the authors mathematically show that for a system with n nodes to proceed regular operation (that’s, to tolerate) f Byzantine (traitor) nodes, no less than n ≥ 3f + 1 whole variety of nodes is required. In different phrases, if greater than one-third of the nodes are Byzantine, it’s mathematically inconceivable for such a system to reliably attain consensus, and there’s no algorithm to make such a system proceed to function. A system that has no less than two-thirds of the full nodes uncorrupted and may function usually, reaching consensus, has the property of Byzantine Fault Tolerance, or is known as a Byzantine Fault Tolerant system.
What about blockchain?
For many years after the 1982 paper, Byzantine Fault Tolerance remained a theoretical downside with sensible options solely in tightly managed environments like aerospace techniques, nuclear energy crops, or some other place the place each node might be vetted prematurely and assure that fewer than a 3rd would go rogue. In different phrases, a sure belief was wanted among the many nodes comprising the community, so even when a few of the nodes turned to traitors, these traitors would nonetheless be beneath the 1/3 threshold (hopefully).
1. Bitcoin and Proof of Work
This was the case till 2008, when the Bitcoin whitepaper was revealed, fully sidestepping the classical voting strategy. Not like distributed networks that existed up so far, the place consensus is reached by majority vote of (hopefully) trusted events, the Bitcoin whitepaper proposed a mechanism for working a trustless distributed system. Because of this, not like nuclear energy crops, the place there was belief among the many nodes prematurely, Bitcoin can function with none of the nodes trusting each other, as a result of the Bitcoin consensus mechanism itself ensures the transactions.
The precise mechanism by means of which Bitcoin manages to do that is known as Proof of Work (PoW). To place it merely, PoW makes it computationally costly to take part within the consensus course of, and much more costly (virtually inconceivable) to be a traitor. Extra particularly, so as to add a brand new transaction, a node should clear up a cryptographic puzzle that requires monumental quantities of computing energy. This puzzle is tough to resolve for the node that proposes the transaction, however straightforward for different nodes to confirm if the answer of the puzzle is appropriate.
A traitor node that desires to deprave the system and suggest a false transaction would want to redo the computational work, not only for the transaction it needs to deprave, however for each subsequent transaction. That is A LOT of computation! On prime of this, it might want to do that sooner than the remainder of the trustworthy community mixed. In apply, this might require controlling greater than 50% of the full computational energy of the community, which is very costly – virtually inconceivable. So on this means, the price of dishonest exceeds any potential profit one may anticipate from dishonest, rendering it economically irrational. Having stated that, even when PoW permits for dependable transactions in a trustless, decentralized system, it additionally comes with excessive prices and excessive latency (Bitcoin transactions could take as much as 10 minutes to finalize), as a result of huge computation required.
2. trendy blockchains and Proof of Stake
Constructing additional on this “making it economically irrational to cheat” idea, but in addition making an attempt to make the system itself sooner, one other consensus strategy is Proof of Stake (PoS). PoS has been used on Ethereum’s blockchain since 2022, and on different trendy blockchains like Solana and Sui. The rationale behind PoS is identical as PoW, however as a substitute of creating dishonest economically costly not directly by means of computation, it makes it costly instantly by making community nodes submit financial collateral. Specifically, in a PoS blockchain, validators (nodes proposing transactions) should lock up a big quantity of the blockchain’s token to have the power to suggest and confirm transactions. If a node proposes a transaction that’s incorrect, then the system penalizes it and retains a part of the submitted collateral. The distinction with PoW is that in PoS, Byzantine behaviour is punished economically slightly than made computationally infeasible.
One other factor about PoS is that it does make the system extra BFT-like. Not like Proof of Work, which sidesteps the classical BFT voting mannequin solely and units the corruption threshold at 50% of whole computational energy, Proof of Stake brings us again nearer to the unique Byzantine Fault Tolerance framework. In a PoS system, validators vote on the validity of transactions utilizing their staked tokens as weight. This implies the 1/3 threshold from the unique 1982 paper applies once more: if greater than 1/3 of the full staked worth is managed by Byzantine validators, consensus can break down. PoS is explicitly Byzantine Fault Tolerant within the classical sense, whereas PoW shouldn’t be – it simply solves a distinct model of the identical downside.
On my thoughts: BFT past blockchain
What struck me probably the most about BFT is how previous the issue is and the way lengthy it took to go from documenting the theoretical downside to working options. Specifically, the issue is recognized and formalised within the unique 1982 paper, however the first sensible algorithm for dealing with it in actual laptop techniques, referred to as Sensible Byzantine Fault Tolerance (PBFT), didn’t seem till 1999. And the primary system to truly deploy it in a real-world setup (Bitcoin) didn’t come till 2008.
The opposite factor I maintain occupied with is how common the issue is. Past blockchain, Byzantine fault tolerance, or extra typically, the issue of reaching consensus amongst doubtlessly unreliable contributors, is in every single place round us. Anytime you have got a number of impartial events that must agree on one thing, and you can’t absolutely belief all of them, you have got a model of the Byzantine Generals Drawback.
In distributed databases, BFT protocols make sure that a cluster of database servers can agree on the present state of the info even when some servers are corrupted or sending unsuitable info. In aerospace, flight management computer systems use BFT-style voting to make sure that a single defective sensor can not trigger a catastrophic failure. A committee making a call with some bad-faith members. A provide chain the place some suppliers may ship fraudulent info. A distributed AI coaching setup the place some gadgets may ship poisoned updates. The generals are in every single place. The query is at all times the identical: how do you attain a dependable consensus when you possibly can’t belief everybody within the room?
✨ Thanks for studying! ✨
When you made it this far, you may discover pialgorithms helpful: a platform we’ve been constructing that helps groups securely handle organisational information in a single place.
Cherished this put up? Be part of me on 💌 Substack and 💼 LinkedIn
All photographs by the creator, besides the place talked about in any other case
















