Consensus, Explained
An interactive field guide to BFT consensus, for engineers working on zksync-os-server. No prior consensus background assumed — bring only curiosity and a healthy distrust of your fellow validators.
Our sequencer is becoming a committee: several validators, run by operators who don't trust each other, jointly producing one chain. The protocol is Simplex, the stack is commonware, and the whole thing is already running in the repo. This guide exists so that the ideas underneath it — quorums, views, certificates, epochs — feel obvious to you, not arcane.
Every chapter is built around things you can poke: simulations you can break, protocols you can sabotage, cryptography that runs for real in your browser. Reading is optional equipment here; the point is to play until it clicks, then follow the links into the real code and the reference docs (docs/src/consensus/ in the repo).
The committee
Four validators star in every diagram and every simulation in this guide. Learn their colors once — they keep them forever.
Chapters
- 01 One sequencer is a promise What validity proofs promise, what they can't, and why a committee. read
- 02 Agreement by arithmetic Byzantine faults, quorums, and why n = 3f + 1. read
- 03 A short history of not trusting each other PBFT → Tendermint → HotStuff → Simplex, each one a response to pain. read
- 04 Simplex, live Views, three kinds of votes, and a committee you can break. read
- 05 Signatures & certificates Real BLS in your browser. Aggregation, thresholds, light clients. read
- 06 Commonware: the parts we stand on The library ideology, the crates we pin, the traits we implement. read
- 07 How it lives in our node Verify-before-vote, speculative state, and the finality store. read
- 08 Now you’re dangerous Operating and evolving a chain that has a committee. read
- 09 How we know it works Six rungs from a smoke test to the chaos rig — why consensus is test-first. read
- 10 Capstone: run the real thing Spin up the devnet, kill a validator, watch the metrics. read
- 11 The chain governs itself The on-chain validator registry — self-governance, and why config stays the floor. read
- 12 DISASTER! — the worst can happen When settlement and consensus disagree, and the remedies ranked by trust spent. read
- 13 More DISASTER! — the other ways Development risks: the protocol, the library, our own glue — and what watches each. read
This is not a research curriculum, and it will not make you a consensus researcher. It aims for something more useful: that when you touch the sequencer, read the consensus code, or get paged about a stalled view, the system's behavior feels reasonable to you — because you know what promises it keeps and what arithmetic keeps them.