Skip to content
jtoghrul, home

Visual proofs

Byzantine agreement needs 3f + 1

Distributed systems · Deep

To agree despite f generals who may lie arbitrarily, you need at least 3f + 1 generals in total; with three generals, one traitor is enough to defeat agreement.

Try this

Switch between World 1 and World 2 and compare what Lieutenant 1 receives. Then set f = 2 and find the smallest n that works.

Why it matters

It is why Byzantine fault-tolerant systems run 4, 7 or 10 nodes, and why ordinary crash-tolerant systems get away with a majority of 2f + 1.

The proof

Three generals: a commander and two lieutenants. In World 1 the commander is a traitor, telling Lieutenant 1 "attack" and Lieutenant 2 "retreat", and Lieutenant 2 honestly reports "the commander said retreat".

In World 2 the commander is loyal and says "attack" to both, but Lieutenant 2 is the traitor and claims "the commander said retreat".

Lieutenant 1 receives exactly the same messages in both worlds. In World 2 it must attack (obey the loyal commander); in World 1 it must agree with loyal Lieutenant 2. No rule can do both.

Group 3f generals into three groups of f and the same argument breaks agreement, so 3f + 1 are needed. Lamport, Shostak and Pease also showed 3f + 1 is enough.

Sources

  • The Byzantine Generals Problem, L. Lamport, R. Shostak, M. Pease, 1982
  • Practical Byzantine Fault Tolerance, M. Castro, B. Liskov, 1999