Understanding Consensus and Byzantine Fault Tolerance
A simple walkthrough of distributed consensus, the Byzantine Generals Problem, atomic broadcast, and modern Byzantine Fault Tolerance.
Introduction
A blockchain is not difficult because storing transactions is difficult. The difficult part is getting many independent computers to agree on the same history when there is no central authority telling them what is correct.
That single problem leads to most of the important ideas in distributed systems and blockchain:
- distributed record keeping,
- consensus,
- the Byzantine Generals Problem,
- Byzantine Fault Tolerance
(BFT) , - atomic broadcast,
- and consensus algorithms such as PBFT, Proof of Work, and Proof of Stake.
This post explains those ideas from the ground up, without assuming a deep background in distributed systems.
Note (The core idea)
If only one sentence is remembered from this post, it should be this:
A distributed system needs a way for many computers to agree on one version of the truth, even when some computers fail or lie.
Why distribute the record?
In a traditional centralized system, one server or authority can maintain the official database.
Users | vCentral Server | vDatabaseThis is simple, but the central server becomes a single point of failure. If it crashes, is compromised, or deliberately modifies data, the whole system can be affected.
A distributed system instead keeps data across several nodes:
+--------+ | Node A | +--------+ / \ / \+--------+ +--------+| Node B |----| Node C |+--------+ +--------+ \ / \ / +--------+ | Node D | +--------+This improves reliability, availability, and resistance to manipulation.
However, it creates a new problem:
If several computers keep copies of the data, how do they all agree on what the correct data is?
That is the consensus problem.
Consensus
A consensus algorithm is a procedure that allows several distributed nodes to agree on a single value or system state.
In blockchain, consensus is used to decide:
- which transactions are valid,
- the order of those transactions,
- the current state of the ledger,
- and which chain should be considered valid if multiple versions appear.
A useful mental model is:
Consensus = everyone agrees on what is true.
For example, imagine the network receives:
Alice -> Bob: 5 BTCBefore adding the transaction to the blockchain, nodes need to agree that:
- Alice really owns the coins,
- the transaction is correctly signed,
- Alice has not already spent those coins,
- and the transaction belongs at a particular position in the ledger.
Without consensus, different nodes could maintain different histories.
Fork choice
Sometimes more than one valid-looking blockchain history may temporarily exist.
Block B /Block A \ Block CA consensus mechanism therefore needs a fork-choice rule to decide which version becomes the accepted chain.
Different blockchains solve this differently. In Bitcoin, for example, the network follows the chain with the greatest accumulated Proof-of-Work.
The Byzantine Generals Problem
The Byzantine Generals Problem gives us a simple way to understand why consensus can be difficult.
Imagine several generals surrounding an enemy city. They must agree on one action:
ATTACKor
RETREATThey can only communicate by sending messages.
The problem is that some generals may be traitors.
A traitor could tell one general:
ATTACKand another:
RETREATThe loyal generals now receive conflicting information.
Their goal is therefore:
- all loyal generals should reach the same decision;
- a small number of traitors should not be able to force the loyal generals into a bad decision.
Important
The loyal generals do not necessarily need to identify the traitor.
The primary goal is to still reach a correct and consistent decision.
From generals to computers
The analogy maps directly to distributed systems:
| Byzantine story | Distributed system |
|---|---|
| General | Computer / node |
| Messenger | Network communication |
| Attack / Retreat | Proposed value or decision |
| Traitor | Faulty or malicious node |
| Agreement | Consensus |
A node may behave incorrectly because of:
- hardware failure,
- software bugs,
- network problems,
- misconfiguration,
- or a deliberate security attack.
A node that can behave arbitrarily is called a Byzantine node.
Byzantine Fault Tolerance
Byzantine Fault Tolerance
In simple terms:
BFT = the network can still agree even when some participants lie.
For classical Byzantine consensus, an important relationship is:
where:
- = total number of nodes,
- = maximum number of Byzantine nodes that can be tolerated.
For example:
| Total nodes | Byzantine nodes tolerated |
|---|---|
| 4 | 1 |
| 7 | 2 |
| 10 | 3 |
| 13 | 4 |
Another way to remember this is:
Byzantine nodes must remain below one-third of the system.
For example, if we have four nodes:
A -> honestB -> honestC -> honestD -> maliciousthe honest nodes can still outvote the malicious one.
But if too many participants become Byzantine, there may no longer be enough trustworthy information to determine the correct result.
Crash Faults vs. Byzantine Faults
Not every failure is Byzantine.
A machine may simply crash and stop responding.
This gives us two useful fault models.
Crash Fault Tolerance
A Crash Fault Tolerant
Typical algorithms include:
- Paxos
- Raft
A useful memory shortcut is:
CFT = broken computer.
Byzantine Fault Tolerance
A Byzantine node can do much more than crash. It may:
- send incorrect messages,
- send different messages to different nodes,
- deliberately violate the protocol,
- collude with other malicious nodes.
Algorithms such as PBFT are designed for this model.
BFT = broken or malicious computer.
Atomic Broadcast
Consensus is closely connected to another distributed-systems concept: atomic broadcast.
Atomic broadcast ensures that messages are delivered consistently across nodes.
A simple way to remember it is:
Everyone receives the same messages in the same order.
It usually aims to provide several properties.
Uniform delivery
If a valid message is delivered, all correct nodes should eventually receive it.
No duplication
A message should be processed only once.
For example, if this transaction is retried because of a network problem:
Alice -> Bob: 100it must not accidentally execute twice.
Total ordering
All nodes should process messages in the same order.
Suppose we have:
T1: Alice -> Bob: 100T2: Bob -> Carol: 100We do not want:
Node A: T1 -> T2Node B: T2 -> T1because the result may differ depending on the order.
Instead:
Node A: T1 -> T2Node B: T1 -> T2Node C: T1 -> T2Atomicity
The intuitive goal is:
Either the operation is consistently delivered across the participating system, or it is not partially applied.
Tip
A good exam-style memory line is:
Atomic Broadcast = same message, exactly once, same order.
Common Consensus Algorithms
Different environments need different types of consensus.
There is no single algorithm that is best for every distributed system.
Paxos
Paxos is a classical consensus protocol designed to tolerate crashes, message loss, and network delays.
Its participants can be understood using three roles:
- Proposer — proposes a value,
- Acceptor — accepts a proposed value,
- Learner — learns the final agreed value.
At a high level, Paxos has two important phases:
Prepare -> AcceptPaxos is robust, but it is famous for being difficult to understand and implement.
Raft
Raft was designed to make consensus easier to understand.
It uses a leader-based model:
+--------+ | Leader | +--------+ / | \ v v v Follower Follower FollowerThe leader receives new log entries and replicates them to followers.
Raft is usually explained through three ideas:
- Leader election
- Log replication
- Safety
If the leader fails, the remaining nodes elect a new leader.
A simple mental model is:
Raft = one elected leader keeps everyone’s log synchronized.
Practical Byzantine Fault Tolerance
Practical Byzantine Fault Tolerance
Its core flow is commonly summarized as:
Pre-Prepare -> Prepare -> CommitPre-Prepare
The primary
Prepare
Replicas communicate with one another and confirm that they received the same proposal.
Commit
Once a sufficient supermajority agrees, the replicas commit the operation.
PBFT can tolerate up to Byzantine nodes when:
Note
The sequence worth remembering is:
Pre-Prepare → Prepare → Commit
Why PBFT does not scale well
PBFT works well when the network contains a relatively small number of known participants.
The problem appears when the number of nodes becomes large.
In traditional PBFT-style communication, many nodes need to communicate with many other nodes.
Its communication overhead is roughly:
This means that doubling the number of nodes can produce far more than double the communication.
For example:
| Nodes | Rough pairwise communication scale |
|---|---|
| 10 | ~100 |
| 100 | ~10,000 |
| 1,000 | ~1,000,000 |
The exact protocol behavior is more nuanced, but the important intuition is:
PBFT is excellent for small networks, but all-to-all communication becomes expensive at large scale.
BFT models for different network sizes
Different network sizes lead to different design choices.
| Network type | Common approaches | Main idea |
|---|---|---|
| Small / permissioned | PBFT, SBFT | Direct voting between known nodes |
| Medium / consortium | FBA, Tendermint, HotStuff | Quorums and optimized voting |
| Large / public | PoW, PoS-based BFT, asynchronous BFT | Economic incentives, committees, or scalable protocols |
Small networks
PBFT works particularly well when:
- participants are known,
- the number of nodes is small,
- strong finality is required.
The trade-off is high communication overhead.
Medium-sized networks
Protocols such as Federated Byzantine Agreement, Tendermint, and HotStuff attempt to retain Byzantine tolerance while reducing communication cost.
Large public networks
Open blockchains may contain thousands of nodes and unknown participants.
Direct PBFT-style communication between every participant becomes impractical.
Systems therefore use approaches such as:
- Proof of Work,
- Proof of Stake,
- committees,
- randomized validator selection,
- asynchronous protocols.
Quorums
A quorum is a set of participants large enough for the protocol to accept a decision.
In plain language:
Quorum = enough votes.
Instead of asking every single node individually to agree forever, a protocol can define how much agreement is sufficient to preserve correctness.
Quorums are fundamental to many consensus protocols.
Federated Byzantine Agreement
Federated Byzantine Agreement
Instead of requiring every node to trust the exact same global group, nodes may define smaller trusted groups called quorum slices.
A simple mental model is:
FBA = trust is built from overlapping smaller groups.
This approach is associated with federated blockchain systems such as Stellar.
It can improve scalability, although the safety of the network depends heavily on how those trust relationships overlap.
HotStuff
HotStuff is a modern BFT protocol designed to improve scalability compared with classical PBFT-style communication.
A key idea is reducing communication toward approximately linear message complexity:
rather than the quadratic pattern associated with traditional PBFT.
HotStuff also uses rotating leadership, helping prevent the system from depending permanently on one leader.
A useful comparison is:
PBFT -> O(n²) communicationHotStuff -> O(n) communicationNakamoto Consensus and Proof of Work
Bitcoin uses a very different approach generally called Nakamoto Consensus.
Instead of having every node participate in PBFT-style voting, miners compete to solve a computational puzzle.
This is Proof of Work
A miner must find a value that produces a valid cryptographic hash according to the network’s difficulty requirement.
Very roughly:
Transactions | vCandidate Block | vMining / Hash Computation | vValid Proof of Work | vBroadcast BlockThe important idea is not the exact puzzle. It is that producing a valid block requires expensive computation, while checking that proof is relatively easy.
This makes large-scale manipulation expensive.
Why Proof of Work helps
PoW provides resistance against attacks such as Sybil attacks because creating thousands of fake identities does not automatically give the attacker thousands of times more influence.
Influence depends on computational power, not simply on the number of identities.
Its major disadvantage is obvious:
Proof of Work consumes significant computational power and energy.
Proof of Stake
Proof of Stake
Validators lock cryptocurrency as collateral.
Very roughly:
Validator | vLocks Stake | vParticipates in Consensus | +--> Honest behavior -> reward | +--> Malicious behavior -> possible penaltyThe security idea is economic:
A validator has something valuable to lose by behaving dishonestly.
Compared with Proof of Work, PoS is generally much more energy efficient.
PoW vs. PoS
| Proof of Work | Proof of Stake | |
|---|---|---|
| Participants | Miners | Validators |
| Resource | Computation | Stake |
| Security cost | Electricity + hardware | Locked capital |
| Energy usage | High | Much lower |
| Main idea | Prove work was performed | Put value at risk |
Asynchronous BFT
Many consensus protocols assume that messages will eventually arrive within some predictable time.
Real networks are not always so cooperative.
An Asynchronous Byzantine Fault Tolerant protocol is designed to work without depending on strict timing assumptions.
In simple terms:
Asynchronous BFT does not assume that a slow message means a dead node.
This makes asynchronous protocols useful in networks with unpredictable latency or unreliable communication.
Modern BFT in practice
Modern BFT systems combine several techniques.
Replication
The system maintains multiple copies of its state.
If one node fails, other replicas can continue operating.
Voting
Nodes vote on proposals or updates.
A proposal becomes accepted when the required agreement threshold is reached.
Cryptography
Digital signatures and hashes help verify:
- who sent a message,
- whether a message was modified,
- and whether two pieces of data are identical.
Leader rotation or leaderless designs
A permanent leader creates an obvious target.
Modern protocols may:
- periodically rotate leaders,
- select leaders randomly,
- or avoid fixed leaders entirely.
Fault detection and recovery
Timeouts, redundant communication, verification, and recovery mechanisms help detect or isolate malfunctioning participants.
Consensus security threats
Consensus protocols must survive more than ordinary hardware failures.
Sybil attack
A Sybil attack occurs when one attacker creates many fake identities.
Attacker / | \ Fake1 Fake2 Fake3If voting were based purely on identity count, the attacker could manufacture a majority.
PoW and PoS make this harder by tying influence to scarce resources:
- computation in PoW,
- stake in PoS.
Double spending
Double spending means attempting to spend the same digital asset more than once.
For example:
Alice -> Bob: 1 BTCAlice -> Carol: 1 BTCusing the same original coin.
Consensus determines which transaction becomes part of the accepted ledger history.
Denial of Service
A Denial-of-Service
Consensus protocols therefore need mechanisms that remain functional when nodes become slow or unavailable.
51% attacks
In PoW systems, an attacker controlling a majority of the network’s effective mining power may be able to manipulate chain selection or reorganize recent history.
This is different from the classical BFT threshold, but both concepts answer the same broader question:
How much malicious influence can the system tolerate before its guarantees fail?
The scalability problem
Consensus creates a fundamental trade-off.
We want:
More nodes+ More decentralization+ More security+ More throughput+ Lower latencybut improving all of them simultaneously is difficult.
Some common scalability problems are:
Limited throughput
Block size, validation requirements, and consensus rules restrict how many transactions can be processed in a given period.
High latency
Nodes need time to exchange information and reach agreement.
More communication can mean slower finalization.
Message overhead
Protocols such as PBFT require significant node-to-node communication.
Computational requirements
PoW replaces message-heavy voting with expensive computation, creating a different scalability and energy trade-off.
Warning
There is no “perfect” consensus protocol.
Every design trades some combination of performance, scalability, decentralization, security, energy consumption, and implementation complexity.
A compact comparison
| Algorithm | Main fault model | Core idea | Main weakness |
|---|---|---|---|
| Paxos | Crash faults | Prepare and accept values | Complex |
| Raft | Crash faults | Leader replicates logs | Leader bottleneck |
| PBFT | Byzantine faults | Supermajority voting | communication |
| HotStuff | Byzantine faults | Optimized leader-based BFT | More protocol complexity |
| PoW | Adversarial public network | Computational work | Energy consumption |
| PoS | Adversarial public network | Economic stake | Stake concentration / protocol complexity |
| FBA | Federated Byzantine faults | Quorum slices | Depends on trust structure |
| ABFT | Byzantine + unpredictable timing | No strict timing dependency | Complex implementation |
Putting everything together
The complete chain of ideas now becomes much easier to see.
Distributed Record Keeping | vMany nodes hold the data | vNodes need to agree | vConsensus Problem | vSome nodes may fail or lie | vByzantine Generals Problem | vNeed Byzantine Fault Tolerance | vChoose an appropriate consensus mechanism | +--> PBFT +--> HotStuff +--> PoW +--> PoS +--> FBA +--> ABFTAtomic broadcast complements this by ensuring that nodes process agreed messages consistently:
Consensus | vWhat should we agree on?
Atomic Broadcast | vHow do we deliver it consistently and in order?The shortest possible summary
If everything else is forgotten, these are the lines worth keeping:
Tip (Memory sheet)
Distributed system
Many computers cooperate as one system.
Consensus
The nodes agree on one common state.
Byzantine Generals Problem
How can honest nodes agree when some participants may lie?
BFT
The system still works correctly despite malicious or faulty nodes.
Classical BFT requirement
.
CFT
Handles crashes.
BFT
Handles arbitrary or malicious behavior.
Atomic Broadcast
Same messages, exactly once, in the same order.
Paxos
Prepare → Accept.
Raft
Leader → replicated log → followers.
PBFT
Pre-Prepare → Prepare → Commit.
PBFT scalability
Roughly communication.
HotStuff
Optimizes BFT toward roughly communication.
PoW
Security through computational work.
PoS
Security through economic stake.
FBA
Consensus through overlapping quorum slices.
ABFT
BFT without depending on strict network timing.
Abbreviations
| Abbreviation | Full Form |
|---|---|
| ABFT | Asynchronous Byzantine Fault Tolerance |
| BFT | Byzantine Fault Tolerance |
| CFT | Crash Fault Tolerance |
| DoS | Denial of Service |
| DDoS | Distributed Denial of Service |
| FBA | Federated Byzantine Agreement |
| PBFT | Practical Byzantine Fault Tolerance |
| PoA | Proof of Authority |
| PoB | Proof of Burn |
| PoS | Proof of Stake |
| PoW | Proof of Work |
| SBFT | Simple Byzantine Fault Tolerance |
| VR | Viewstamped Replication |
Conclusion
Blockchain consensus is easier to understand when it is treated as a distributed-systems problem rather than as a collection of cryptocurrency terms.
The story starts with a simple requirement: several computers need to maintain the same record.
Once those computers are distributed across a network, they need consensus. Once we assume that some of them can fail or behave maliciously, we arrive at the Byzantine Generals Problem. BFT protocols then provide different ways to preserve agreement, each making different trade-offs between security, communication, performance, scalability, and decentralization.
There is therefore no single “best” consensus mechanism.
A small permissioned network may prefer PBFT. A larger consortium may use a more scalable BFT design. A public blockchain may instead rely on Proof of Work, Proof of Stake, committees, or another consensus architecture.
The implementation changes, but the central question remains the same:
How can independent computers agree on one trustworthy version of the truth when they cannot completely trust one another?