DSW.

Advanced

Byzantine Generals Problem

Article diagram
August 9, 2026·9 min read

Reliable distributed consensus requires more than two-thirds of participants to be correct when processes can fail in arbitrary, Byzantine ways.

Introduction

The Byzantine Generals Problem is a fundamental challenge in distributed computing that formalizes the difficulty of reaching agreement among distributed processes when some of those processes may be faulty or malicious.
First described by Leslie Lamport, Robert Shostak, and Marshall Pease in 1982, the problem provides the theoretical foundation for understanding fault tolerance in systems where components can fail in arbitrary, unpredictable ways.

Unlike simpler failure models where a process either works correctly or stops entirely (crash failures), Byzantine failures encompass any behavior whatsoever: sending contradictory messages to different peers, selectively withholding information, colluding with other faulty nodes, or actively trying to subvert the protocol.
This makes Byzantine fault tolerance (BFT) the strongest and most general form of fault tolerance in distributed systems.

The Problem Statement

The original formulation uses a military metaphor.
Several divisions of a Byzantine army surround an enemy city.
Each division is commanded by a general, and the generals can communicate only by messenger.
They must agree on a common plan of action (attack or retreat).
Some generals may be traitors who will try to prevent the loyal generals from reaching agreement.

The problem has two requirements:

  1. Agreement: All loyal generals must decide on the same plan of action.
  2. Validity: If all loyal generals start with the same initial value, then that value must be the decision.

The validity condition prevents trivial solutions like "always decide to attack regardless of input." It ensures that the decision reflects genuine input from loyal participants.

A key result from the original paper: no solution exists with fewer than 3f + 1 total generals when f generals are Byzantine. In other words, the system must have more than two-thirds of its participants behaving correctly.
With exactly three generals and one traitor, consensus is impossible.
This bound is tight and applies to any deterministic protocol using oral messages (messages that can be forged).

Why Three Generals Fail

diagram-1
Ambiguity with three generals and one traitor

Consider three generals: A, B, and C.
General C is a traitor.

  • A proposes "attack" and sends this to B and C.
  • C, being a traitor, tells B that A proposed "retreat."
  • B now sees one vote for "attack" (from A) and one for "retreat" (from C, lying about A's message); B cannot distinguish this from the scenario where A is the traitor.

Symmetrically, any protocol that B could run to decide will fail in at least one of these two indistinguishable scenarios.
This impossibility is not a matter of protocol cleverness.
It is a proven lower bound.

Oral Messages vs. Signed Messages

The original paper distinguishes two communication models:

Oral Messages (OM): Messages can be forged.
A faulty node can claim that another node sent a message it never sent.
In this model, the 3f + 1 bound applies.
The algorithm OM(m) solves the problem for n ≥ 3m + 1 generals with at most m traitors.

Signed Messages (SM): Messages carry unforgeable digital signatures.
A faulty node cannot forge a message from a correct node.
In this model, the bound improves dramatically: consensus is possible with any number of faulty nodes as long as at least two generals are loyal (n ≥ f + 2).
The algorithm SM(m) exploits signatures to detect contradictions.

Walkthrough

Algorithm OM(m): Oral Messages Solution

diagram-2
Recursive OM(m) call structure and majority decision

This is a recursive algorithm.
The base case is OM(0), and the recursion reduces the problem by peeling off one level of fault tolerance at each step.
The algorithm assumes n ≥ 3m + 1 nodes with at most m Byzantine faults.

OM(0):

  1. The commander (designated sender) sends its value to every lieutenant.
  2. Each lieutenant uses the value received from the commander as the decision.

OM(m) for m > 0:

  1. The commander sends its value v to every lieutenant.
  2. For each lieutenant i, lieutenant i acts as the commander in a recursive call to OM(m-1), sending the value it received from the original commander to all other lieutenants.
  3. Each lieutenant j collects the values reported by all lieutenants (including its own received value from the commander).
  4. Each lieutenant j takes the majority value among all collected values as its decision.
function OM(commander, lieutenants, m):
    commander sends value v to each lieutenant i

    if m == 0:
        each lieutenant i decides on the value received
        return

    for each lieutenant i:
        let v_i = value that lieutenant i received from commander
        lieutenant i runs OM(v_i, lieutenants - {i}, m - 1)
            acting as sub-commander, forwarding v_i to others

    for each lieutenant j:
        let values = {v_1, v_2, ..., v_{n-1}}
            where v_i is the value that j obtained for lieutenant i's report
            (either directly from sub-commander i, or via deeper recursion)
        decide majority(values)

Complexity analysis: OM(m) requires m + 1 rounds of communication.
The message complexity is O(n^m), which grows exponentially.
For each level of recursion, every node initiates a sub-protocol with n-1 participants.
This makes the algorithm impractical for large values of m, but it establishes the theoretical possibility and the correctness bound.

Worked Example: OM(1) with 4 Generals

diagram-3
OM(1) message exchange with one traitor among four generals

Suppose we have generals G1 (commander), G2, G3, and G4, with G4 being the traitor.
The commander's value is "attack."

Round 1 (OM(1)):

  • G1 sends "attack" to G2, G3, G4.

Round 2 (each lieutenant runs OM(0) as sub-commander):

  • G2 received "attack" and reports "attack" to G3, G4.
  • G3 received "attack" and reports "attack" to G2, G4.
  • G4 (traitor) received "attack" and reports "retreat" to G2 and G3.

Decision:

  • G2 has: {attack (from G1 directly), attack (G3 reports), retreat (G4 reports)} → majority = attack ✓
  • G3 has: {attack (from G1 directly), attack (G2 reports), retreat (G4 reports)} → majority = attack ✓

All loyal generals agree on "attack." The traitor's conflicting message is outvoted.

Practical Implications

The Byzantine Generals Problem is not merely a theoretical exercise.
It directly informs the design of real systems.

Replicated state machines. Practical BFT protocols like PBFT (Practical Byzantine Fault Tolerance, Castro and Liskov 1999) implement Byzantine consensus for replicated services.
PBFT requires 3f + 1 replicas and uses a three-phase protocol (pre-prepare, prepare, commit) to ensure safety and liveness under the assumption that fewer than one-third of replicas are Byzantine.

Blockchain and cryptocurrency. Bitcoin's proof-of-work consensus mechanism can be understood as a probabilistic solution to the Byzantine Generals Problem in an open, permissionless setting.
Nakamoto consensus trades deterministic finality for scalability to thousands of participants without a known membership set.

Aerospace and safety-critical systems. Flight control systems in aircraft such as the Boeing 777 and the Space Shuttle used Byzantine fault-tolerant architectures.
These systems must tolerate sensor malfunctions that produce arbitrary (not just crash) errors, making BFT directly applicable.

Distributed databases. Systems like Google's Spanner and CockroachDB typically assume crash failures (using Paxos or Raft), but understanding Byzantine bounds helps engineers reason about what threat models their systems can and cannot handle.
The distinction between crash-fault tolerance and Byzantine fault tolerance is one of the most important architectural decisions in distributed system design.

Relationship to Other Impossibility Results

The Byzantine Generals Problem is closely related to several other foundational results:

FLP Impossibility (Fischer, Lynch, Paterson 1985): Even with only crash faults (a weaker model than Byzantine), deterministic consensus is impossible in an asynchronous system with even one faulty process.
BFT protocols typically assume partial synchrony to circumvent FLP.

Two Generals Problem: A simpler, related problem showing that consensus over an unreliable communication channel is impossible with two parties.
The Byzantine Generals Problem generalizes this to unreliable participants rather than unreliable channels.

CAP Theorem: While CAP addresses the tradeoff between consistency and availability under network partitions, the Byzantine Generals Problem addresses the feasibility of agreement under arbitrary node failures.
Both constrain what distributed systems can achieve.

Key Points

  • The Byzantine Generals Problem formalizes consensus in the presence of arbitrary (not just crash) faults, making it the strongest fault model in distributed computing.
  • Deterministic Byzantine consensus with oral messages requires at least 3f + 1 total nodes to tolerate f faulty nodes, meaning more than two-thirds must be correct.
  • With unforgeable digital signatures, the bound improves to f + 2 total nodes, because contradictory messages from faulty nodes can be detected and proven.
  • The OM(m) algorithm solves the problem recursively but has exponential message complexity of O(n^m), making it impractical for large-scale deployment without optimization.
  • Practical BFT protocols like PBFT reduce communication overhead while preserving the 3f + 1 bound, enabling real-world Byzantine fault-tolerant services.
  • Blockchain consensus mechanisms (proof-of-work, proof-of-stake) can be viewed as probabilistic, large-scale solutions to the Byzantine Generals Problem in open networks.
  • The distinction between crash-fault tolerance and Byzantine fault tolerance is a critical design decision that determines the threat model, performance characteristics, and complexity of a distributed system.

References

Lamport, L., Shostak, R., and Pease, M. "The Byzantine Generals Problem." ACM Transactions on Programming Languages and Systems, Vol. 4, No. 3, July 1982, pp. 382-401.

Pease, M., Shostak, R., and Lamport, L. "Reaching Agreement in the Presence of Faults." Journal of the ACM, Vol. 27, No. 2, April 1980, pp. 228-234.

Castro, M. and Liskov, B. "Practical Byzantine Fault Tolerance." Proceedings of the Third Symposium on Operating Systems Design and Implementation (OSDI), February 1999.

Fischer, M.J., Lynch, N.A., and Paterson, M.S. "Impossibility of Distributed Consensus with One Faulty Process." Journal of the ACM, Vol. 32, No. 2, April 1985, pp. 374-382.

Nakamoto, S. "Bitcoin: A Peer-to-Peer Electronic Cash System." 2008.

Newsletter

Signal
over noise.

Distributed systems deep-dives, delivered once a week. Consensus, infrastructure, and the architecture that scales.

You will receive Distributed Systems Weekly.