Chapter 02 · ~15 min

Agreement by arithmetic

Byzantine generals, quorums, and why the magic number is 3f + 1.

What you’ll walk away with

The valley

Two armies camp on two hills. Theodora commands the first, Basil the second. If they attack the city in the valley together at dawn, they win. If either attacks alone, that army is destroyed. The only way to coordinate is to send messengers across the valley — where some of them get caught.

Theodora writes “attack at dawn” and sends a runner. Now: does Basil march?

Only if the message arrived. Does Theodora march? Only if she knows Basil got it — so Basil sends a runner back. But now Basil worries: did the acknowledgement arrive? If it didn’t, Theodora won’t march, and Basil dies alone. So Theodora acknowledges the acknowledgement. Which needs an acknowledgement…

Watch it happen. The ladder under the valley tracks what each general knows:

The ladder climbs forever and never finishes. This isn’t a protocol flaw you can patch — it’s a theorem (the Two Generals problem, 1975). Whoever sent the most recent messenger cannot know whether it arrived, so shared certainty — I know, and you know that I know, and I know that you know that I know, all the way up — is unreachable over a link that can lose messages.

Sit with the punchline for a second, because everything in this guide flows from it:

Any system that ever decides anything over a network must decide while still a little bit blind. Consensus protocols are machines for doing that safely.

For the rigor-minded: “impossible” comes in flavors

Two Generals says: no protocol reaches common knowledge over a lossy link. Its more famous cousin, the FLP impossibility (1985), says: even with reliable links, a deterministic protocol in a fully asynchronous network can’t guarantee agreement if even one participant may crash. Different theorem, same vibe: certainty is not on offer. Real protocols route around FLP with timeouts (a.k.a. partial synchrony assumptions) — you’ll meet those in the Simplex chapter. What survives all impossibility results is the thing we actually care about: you can make disagreement impossible, and pay for it only in patience.

A liar is worse than a corpse

The generals’ problem was honest confusion — everyone follows the rules, messages just die. Real committees face something nastier.

Say we add a third general, Justinian, and he’s a traitor. He doesn’t drop messages; he forges reality. He tells Theodora “attack” and tells Basil “retreat” — with a straight face, in the same minute. Each of them now holds a perfectly plausible message and a completely different picture of the world. That’s called equivocation, and it is the defining move of a byzantine fault: not silence, but active, targeted lying.

This is the honest-to-goodness threat model of a shared blockchain committee, and it’s worth being unsentimental about why: validators are run by different operators with different incentives. “Byzantine fault tolerant” (BFT) means the guarantees hold even if some members lie, collude, and coordinate their lies. The crashed, the unreachable, and the malicious all draw from one shared fault budget, called f. A validator that’s merely asleep (Basil) and a validator that’s actively scheming (Justinian) are, to the protocol, the same expense.

Wait — can’t cryptographic signatures stop the lying?

Less than you’d hope. Signatures make lies attributable, not impossible: if Justinian signs “attack” and also signs “retreat”, each recipient sees one valid signed message and believes it. Only when the two signatures are put side by side do they become proof of treachery. That’s detection after the fact — a fork can already have happened by then. So signatures don’t replace the fault budget; they do something else valuable: they produce transferable evidence naming the culprit. Our stack uses exactly this — conflicting votes surface as misbehavior evidence in logs and metrics (what to do to the culprit — e.g. slashing — is deliberately a policy question, not a protocol one).

Votes, quorums, and the overlap

So: no certainty, and some participants lie. Here is the entire trick that makes consensus work anyway, and it is — genuinely — just counting.

Step 1. Stop asking “am I sure?” and start asking “did enough of us sign?”. A decision counts only when it carries a quorum of votes — call the quorum size q. A bundle of q votes for the same thing is a certificate: portable, checkable proof that the committee decided.

Step 2. How big can q be? Not n — Basil naps, and f members might never answer. Demand more than n − f votes and a few crashes stall you forever. So liveness forces q ≤ n − f. (We’ll use exactly q = n − f.)

Step 3. How small can q be? Here’s the pretty part. Imagine two conflicting decisions each gathered a certificate — q votes for A, q votes for B. Two groups of q drawn from n validators must share at least 2q − n members. Those overlap members voted for both A and B. Honest validators never do that. So if the overlap is bigger than the number of liars — 2q − n ≥ f + 1 — at least one honest validator sits in the overlap, and it would have had to vote twice. Contradiction: conflicting certificates cannot both exist.

Put step 2 and step 3 together and solve:

q = n − f        (liveness: can't wait for more)
2q − n ≥ f + 1   (safety: overlap must contain an honest validator)
────────────────
n ≥ 3f + 1

That’s it. That’s the famous number. Not a convention, not a safety margin someone picked in a design review — the exact point where “don’t wait forever” and “never fork” can both hold. Now try to break it with your own hands.

Here’s the scene below: the circle is a committee, and the two arcs are two certificates being assembled — the blue one gathering signatures for some block A, the gold one for a conflicting block B at the same height. That’s precisely the disaster from step 3: if both ever fill up, the chain forks. An arc collects a signature from every validator it covers, and each needs a full quorum of q. Your job is Justinian’s dream assignment: rotate the arcs (the ⟲ ⟳ buttons) to find a position where they share no honest validator — then, when the arithmetic defeats you, try the button that cheats it.

Some values worth memorizing, for committees you’ll actually meet:

committee nfault budget fquorum q = n − fyou may lose
303nobody
413one member
514one member
725two members
401327a third of everything

Two rows deserve a hard stare. n = 3 tolerates nothing — the quorum is all three, so one napping validator halts the chain, and the lying budget is zero. And n = 4 is the smallest committee that survives losing a member — which is why it’s the smallest committee anyone should run in anger.

Terminology you’ll meet in code: 2f + 1

Docs and papers often say a quorum is 2f + 1 votes. With n = 3f + 1, note that n − f = 2f + 1 — same number, two spellings. “Wait for all but f” and “wait for 2f + 1” describe the same quorum when the committee is exactly at the bound. You’ll see both in our code and docs; they are not two different rules.

The two promises

Everything a BFT committee guarantees compresses into two sentences. They’re short enough to be login-screen material, and they anchor every chapter after this one:

Notice the asymmetry in how protocols treat these under stress: a protocol under attack or partition will sacrifice liveness, never safety. A stalled chain resumes and no one outside the ops channel remembers; a forked chain is two chains, two histories, two versions of who owns what — permanently. When you meet operational oddities later (views timing out, leaders skipped, the chain pausing during a partition), read them through this lens: the system is choosing to be slow rather than risk being wrong.

Try to break it

You’ve read the safety argument. Time to attack it — that’s the only way it becomes yours. The committee below is deciding between two competing blocks at the same height. Three validators are honest and have already voted. You are Justinian. Your goal: get both certificates to 3-of-4, i.e. fork the chain.

If you didn’t try the “recruit Zoe” button: try it. Feeling where the cliff is — safety holds at f, shatters at f + 1 — is the operational intuition this entire chapter exists to install. A committee’s fault budget isn’t a vibe; it’s a count, and you now know the count.

The four things to keep

Where this lives in our stack

Time to connect this chapter to the repository you work in:

Next: the arithmetic never changes — but turning it into a protocol took thirty years of pain. PBFT, Tendermint, HotStuff, and finally Simplex: each one is a reaction to what hurt about the one before. That story is short, opinionated, and it’s the next chapter.