How to read it
Each row is one safety claim. A claim is checked when three judges hold the code that ships to it: TLC checks a TLA+ model that states the claim as an invariant; a seeded walk runs the real state machines with faults on, and an oracle with no code of its own judges it; TLC checks the trace of each walk against the model. A claim is model only when its model is checked and its code is not built yet. A claim is open when something is not proved; its issue says what.
Each judge is tested too. A control is a TLC check that must fail without the rule. A mutant is a bug planted in the driver of a walk, and its oracle or its trace check must fail. A mutant marked (trace) passes every oracle, and only the trace check refuses it.
Mostly bounded. TLC explores small instances of each model completely. Only the single decree has a proof that holds at every size (TLAPS); the other claims do not have one yet: that is the last row of the first table (#1307).
paros-consensus
The sans-IO Paxos roles. Every walk runs the real ColocatedNode, ProxyLeader, ReplicaNode and Matchmaker of the crate.
| Claim | Model · invariant | Trace spec | Walk · oracle | Must die | State |
|---|---|---|---|---|---|
| One value is chosen per slot. | decree walk, multi_paxos, multi_paxos_five, grid, partitions · ONE_VALUE | TLC: inductive_ignore, wipe_revote, lostwalk: ForgetVotes, HideVotes, decree: ForgetPromise, HideVote | checked | ||
| A promise or a vote leaves a node only once it is on the node's disk. | multi-paxos/ Agreement | every flavor · PERSIST_BEFORE_SEND | TLC: durable_afterwalk: SkipPersist | checked | |
| A Commit is sent only for a value that a Phase-2 quorum chose. | node/ CommitBacked, CommitAgreeproxy-leader/ CommitBacked, CommitAgree | proxies, proxies_on_grid, compartments · COMMIT_BACKED | TLC: short, belief_anywalk: EarlyCommit, KeepProxyRounds | checked | |
| What a party learns or applies is the value that was chosen. | multi-paxos/ LearnedChosennode/ LearnedChosen, ReplicaChosen | replicas, compartments_compacting · LEARNED_CHOSEN | TLC: learn_recordwalk: CorruptCommit | checked | |
| The chosen prefix on a disk never moves back while its node runs, and keeps what an fsync covered.Judged by the walk oracle only; no model states it. | none | none yet | every flavor · PREFIX_SHRINKS | walk: LoseChosenIndex | checked |
| A leaderless read sees every write that was acknowledged before it started. | reads, lagging_reads · READ_SEES_WRITES | TLC: fence_belief_lag, ack_no_ballotwalk: LocalRead, BeliefFence, HideWatermark | checked | ||
| A reconfiguration never lets two configurations choose two values. | matchmaker/ Agreementnode/ Agreement | matchmakers, reconfiguring · ONE_VALUE | TLC: phase1_own, match_nocheck, gc_earlywalk: EarlyGc | checked | |
| A retirement never leaves a new ballot without a Phase-1 quorum. | retiring | TLC: retire_one_ack, fence_volatilewalk: RetireUnchecked | checked | ||
| A matchmaker set handover carries every registration and the GC floor to the next generation. | handover | TLC: first_write_majority, frozen_serveswalk: ShrinkBootstrap | checked | ||
| One node at a time leads at a ballot across a handoff, and the successor keeps every pending round. | node/ OneHolder, LeaderFrontierleader-handoff/ OneHolder, LeaderFrontier | handoff | TLC: two_hops, volatile_frontierwalk: RewindHandoff | checked | |
| Truncation and compaction never lose a value above the floor. | compaction · JOURNAL_FOLD | TLC: floor_ignore, compact_earlywalk: CompactPastFold, CorruptTrimJump | checked | ||
| A damaged record never changes a chosen value (CTRL). | truncation/ Agreementnode/ NoFillChosen | disk_faults, disk_faults_three · ONE_VALUE | TLC: ctrl_none, two_rotswalk: HideFaulty | checked | |
| Each write of a batch gets one range of the log, in order. | compartments/ OneRange, AckedChosenbatcher/ LaneOrder, AnswerHolds | batcher walk, compartments | TLC: copies_onerange, order_anywalk: batcher: ReverseLane | checked | |
| Each claim above holds at every size, not only on the bounded instances that TLC explores.TLAPS proves Spec => []Agreement for both: Inv holds at the start, every step keeps it and it implies Agreement (DecreeProof.tla, MultiPaxosProof.tla), and LS4 checks the temporal rule that joins them. The Lean proofs are a later step of #1307. | decree/ Invmulti-paxos/ Inv | none yet | none yet | TLC: inductive_ignore, inductive_prefix | checked#1307 (inductive invariants, then proofs) |
The layered parosd
The layers above the journal: the ids and the takeover. Each model of #1409 adds its row here when it merges. The code of these layers is not built yet, so each row is model only.
| Claim | Model · invariant | Trace spec | Walk · oracle | Must die | State |
|---|---|---|---|---|---|
| One id names at most one journal, forever: a fold gives an id once, deletes included, and a host keeps records under an id only after the fold gave it. Every create ends. | journal-ids/ JournalIdOnce, TenantIdOnce, DiskOneJournal, BookedAfterRecord, GoneStays, AllCreated | none yet | none yet | TLC: book_first, no_tombs, no_tombs_disk, journal_key, counter | model only#1419 (the tenancy wrapper and paros-names) |
| An order of a deposed coordinator never takes effect, and a machine hosts each role once, only where its booking says. Once the faults stop, every coordinator stops sending and every role settles. | takeover/ NoLateEffect, OnceEach, EffectBooked, Complete, Settles, Quiet | none yet | none yet | TLC: two_writes, two_writes_late, no_idem, keep_view, fallback, reg_nofence, ref_in_booking, nack_ignored, gone_ignored | model only#1422 (the takeover by a new controller) |
Where each row comes from
- The models and their checks:
specs/tla/, withchecks.txtin each folder. A name under TLC is a check of that file whose listed result isviolation. - The walks, oracles and mutants of the core:
consensus-sim(FlavorandMutantinsrc/cluster/flavor.rs, the oracles insrc/oracle/). A walk name is aFlavor. - The models of the layered parosd, with the code that each waits on: the table of
specs/tla/README.md, and #1409 (build the layered parosd). - The flavor view of the core: How it is checked.
The techniques
- TLA+ modelsNo code before its model. TLC checks each rule, each rule has a control, and each guard of a model is mutated.
- SimulationSeeded walks with faults on the code that ships, each walk checked against its model, every probe reached. No exception.
- Mutants and assertionscargo-mutants on the core, the score of a dated run, and the hard assertions that stop a broken state.
- Grid quorumsPartitions of acceptors: a write touches one, an election touches all. Stop acceptors and see what still works.
The sans-IO core and its driver loop are in Consensus.