Chapter 13 · ~13 min

More DISASTER! — the other ways

What if the algorithm is wrong? The library? Our own glue? The floors below the application, and what watches each one.

What you’ll walk away with

What’s left to go wrong?

Chapter 12 ended by pulling a thread and not following it: everything in that chapter assumed consensus itself worked. The committee voted correctly, the protocol behaved, the library was faithful, our adapters were honest — only the state was wrong. Follow the thread now. A bug has to live somewhere, and below the application there are exactly four floors left:

(The fifth suspect — the state-transition binary itself — got its own chapter, because it’s the one bug the committee structurally cannot catch.)

None of these four has an alarm-table row. You can’t page someone about a hole in a proof, and no restart fixes a wrong algorithm. These are development risks: either they’re prevented before anything ships, or they become incidents with no runbook. So this chapter walks the four floors, asking the same three questions on each — the questions are the story, and by the end they should be a reflex:

What exactly do we believe? Why do we believe it? What would tell us we’re wrong?

Trust, in this stack, is not a feeling. It’s an inventory: every belief named, every belief justified, every belief watched.

One spoiler before we descend, because it inverts the scary ordering: the deeper the floor, the older and stronger its assurance. The math is the best-defended thing in the building — and the likeliest defect site is the code closest to home. Ours. The one genuine war story in this chapter happened exactly there — and it never reached production, which is rather the point.

What if the algorithm is wrong?

Concretely: a hole in Simplex’s safety argument — some interleaving of crashes, partitions, and message delays under which two conflicting blocks both finalize with only f faults. Chapter 4 let you fail to find one by hand. What says none exists?

What we believe: no such interleaving exists — safety and liveness hold, in the model.

Why we believe it: pen-and-paper proofs in the published paper — reviewed mathematics, in the open, for a protocol short enough that reading it end to end is a reasonable afternoon. That brevity was chapter 3’s whole thesis: simplicity is a feature you can ship, and also one you can audit. Two limits, stated plainly: the proofs are not machine-checked — human math, checked by human review — and a proof covers the protocol on paper, never any implementation of it. No theorem in that paper says a word about a Rust codebase.

What would tell us we’re wrong: nothing of ours re-proves the math — what we watch are its observable consequences. Every simulation scenario and the chaos watcher assert the theorems’ outputs — identical hashes on every node, finality never moving backward — across every fault schedule we can compose. A real safety hole would have to survive all of that watching, and would then surface as the loudest evidence imaginable: hash divergence on a committee whose own certificates prove it was honest. Reproducible, publishable, and indicting the protocol layer itself. A liveness hole is milder: unexplained stalls, inside alarms that already exist.

What if the assumptions are wrong?

Every theorem in that paper opens the same way: assume that… A proof is a conditional — if at most f of n are corrupt, if messages eventually arrive, if signatures can’t be forged, then safety. The theorems own the “then”. Every operational chapter of this guide has been servicing the “if”:

the proof assumeswhere it breakswhat watches it
≤ f of n corruptkey compromise, operator failureevidence counters — the one alarm that means adversary (ch 8) — then scheduling out (ch 8, 11)
partial synchrony — messages eventually arrivepartitions, outagesbroken synchrony degrades liveness only: stall, never fork (ch 2); staleness alarms tell you (ch 8)
unforgeable signaturesthe cryptographyBLS12-381, the curves the wider industry stakes value on (ch 5) — shared scrutiny, shared fate
keys held by their ownerscustodyproof of possession, never-reused identities (ch 11), and operator discipline no protocol supplies

Read the right-hand column again: it’s this guide’s table of contents. Operating a BFT committee is the maintenance of a proof’s assumptions.

And the first row earns its own paragraph, because it’s the honest edge of the whole design: more than f coordinated corruptions can fork the chain, and no instrument in this guide prevents it. The arithmetic is the boundary — drawn in chapter 2, never moved since. What survives past it is attribution, not prevention: a beyond-budget fork produces signed, conflicting finalizations — certificates naming every signer, deniable by no one, forever. Prevention out there is made of people: operator diversity, custody discipline, chapter 11’s registry ceremony. Every other row of that table has software watching it. This one has governance.

What if commonware is wrong?

Concretely: the engine miscounts a quorum in some rotation edge case; marshal drops a block on a teardown path; a journal format changes shape between releases. This floor is not hypothetical territory — the findings register you’re about to meet exists because library warts are a running fact of life with a young dependency that ships breaking releases monthly.

What we believe: the pinned version implements Simplex correctly, and the runtime, networking, and storage under it do what they say.

Why we believe it: it’s built deterministic-first — chapter 6’s whole argument — we pin the exact version we tested, and upstream publishes per-primitive stability levels. Their site, not this guide, is the source of truth for the library’s maturity and audit status at any given moment.

What would tell us we’re wrong: never “we read the diff and it looked fine.” The fence is executable, four instruments deep:

That register is what makes a fast-moving dependency survivable: upstream bugs become cumulative knowledge instead of recurring surprises. The first upgrade executed under this procedure closed two of its own registered findings and deleted their workarounds on the spot — and its final soak caught a real regression no faster rung could see. The fence earns its keep in both directions.

What if our own glue is wrong?

This one is not hypothetical at all. Both clauses of the integration contract have already been violated — by us, in the production implementation, before any of it shipped. Clause one: commit delivery is at-least-once and may reach below the committed tip, so redelivered blocks must be absorbed as harmless no-ops; the production path mishandled redelivery. Clause two: consensus-facing heights are era-relative — the anchor is height zero, the convention chapter 12’s entire era machinery stands on; the production path answered chain-absolute. Fresh chains masked both bugs (on a fresh chain the anchor is zero, so the two conventions happen to coincide); the first migrated chain would have paid for them.

Two details turn this from the chapter’s most embarrassing story into its best one. First: every simulation stayed green the whole time. Chapter 9 told you simulation is where consensus bugs go to die — but the sims exercise our integration contract by being its reference implementations, so precisely where production must match the model, the model cannot check it. A mirror can’t tell you it’s warped.

Second: it never got anywhere near production. What caught it was an operational review — aggressive testing of the real node outside the test suite, the same instinct the chaos rig institutionalizes — run before launch precisely because the test pyramid was never the whole plan. And the timing is the whole economics of chapter 9, cashed out in one incident: caught before launch, the two bugs arrived as a batch, with reproducers, fixed and re-verified in one change. In production they would have arrived one at a time, under conditions nobody could replay.

The fix outlived the incident, and it’s the most honest piece of engineering in this chapter: the contract itself became executable. Its load-bearing clauses are stated once, as checks, and every environment runs the same checks against itself in its own test suite — the mock, the real-STF simulation env, and the production node env alike. A change that passes its unit tests but breaks the contract is now exactly the bug class the checks exist to stop.

We don’t blindly trust the library — and our own glue gets exactly the same treatment.

One more honesty before the ladder. Every check in this chapter was written by the same team whose work it checks. Same people, same assumptions, same blind spots — chapter 12’s replication problem, wearing a test harness. The structural complement is the same as it was there, too: independent eyes. That is what an external audit is for a system like this — a second, independent implementation of the checking — and it belongs on the inventory beside everything else that’s watched rather than assumed.

When the answer is still chapter 12

Say the fence fails anyway: a library bug ships, or a glue contract bends, and some suffix of the chain ends up wrong. Two answers, cleanly split. The fix belongs to development — a finding registered with an executable reproducer, a workaround with an expiry date, a new conformance clause, a new rung on chapter 9’s ladder. The cleanup, if state was poisoned, is chapter 12’s, unchanged: the taxonomy never asked why the state was wrong, and — the disaster doc’s own words — a fork does not care why the suffix is poisoned. The worst case was already covered one chapter ago. This chapter is the work of never needing it.

Pull the rungs yourself

The ladder below is this chapter as furniture: four rungs under your running chain — our glue, the library, the algorithm, the model — plus the shared spec sitting beside the stack, filed where it belongs (it fails sideways, into chapter 12, not downward). Each card answers the three questions; the ⚠ button asks the one this chapter hopes stays hypothetical: suppose it breaks anyway. Missions:

  1. Click through all five cards. Each one is this chapter compressed: believe, why, watched-by.
  2. Pull suppose it breaks on every rung. You’re hunting for a silent failure — a rung that could break with no instrument noticing. Report what you find.
  3. On the bottom rung, read the ending twice: the one boundary held by people and arithmetic instead of tests. Know exactly where it is.

The four things to keep

Where this lives in our stack

The end. Thirteen chapters ago, one sequencer was a promise. Since then: arithmetic that makes agreement possible, a protocol you drove and broke, real signatures, the library and the seams, the node around it, the pager, the harness, a lab, a chain that governs itself — and two chapters of worst cases, read in the calm before they’re needed. That’s the whole guide. The reference docs in docs/src/consensus/ are yours now; they should read like annotations to things you’ve already done. Nobody wants to need the disaster chapters. You read them anyway. That’s the job — welcome to the committee.