YouTube22 Nov 2025

Mathematics of Consensus — Accidental Lecture

Podcast cover

TigerBeetle

Alex from TigerBeetle is teaching his colleague Tobi, who understands set theory but not consensus algorithms, about the mathematics of consensus using set theory. They plan to construct a consensus algorithm from scratch, using trial and error to fix errors until it works. They define discrete systems evolving over time, using a state space S and behaviors as infinite sequences of states. They discuss specifying behaviors with initial state predicates and state transition predicates, and then move on to defining a correctness predicate to specify desired system behaviors. They then discuss the consensus theorem, and implement systems that hopefully obey the definition. They start with a simple consensus system and then make it distributed, discussing voting, autocracy, and combining the two. They address the issue of democratic voting getting stuck and propose a solution involving each person being a dictator for a day. They refine the approach to ensure a single value is chosen and introduce the concept of safe values to prevent contradictions, ultimately arriving at a consensus algorithm.

Outlines

Part 1: Foundations of Consensus

Part 2: Defining and Modeling Consensus

Part 3: Simple Consensus Systems

Part 4: Voting-Based Consensus

Part 5: Final Thoughts

Sign in to continue reading, translating and more.

Open full episode in Podwise