Documentation

CslibFrontier.Computability.Distributed.Paxos.Liveness.SoleLeader

Conditional sole-leader 4-phase progress steps #

Proves paxos_liveness_from_phase2a_crashStop (Phase 2 progress using only an accept quorum) and paxos_liveness_of_sole_leader_crashStop (conditional 4-phase crash-stop progress under a fresh sole-leader ballot).

Main results #

theorem Cslib.Distributed.Paxos.paxos_liveness_from_phase2a_crashStop {Proposer : Type u_1} {Acceptor : Type u_2} {Learner : Type u_3} {V : Type u_4} [LinearOrder Proposer] [DecidableEq Acceptor] [DecidableEq Learner] [DecidableEq V] (qs : QuorumSystem Acceptor) {inputs : Proposer → V} {ss : ωSequence (SynodState Proposer Acceptor Learner V)} {xs : ωSequence (SynodAction Proposer Acceptor Learner V)} (hr₀ : Reachable qs inputs (ss 0)) (hexec : (synodLts qs).OmegaExecution ss xs) {b : Ballot Proposer} {Q : Finset Acceptor} {l : Learner} (hQ : Q ∈ qs.acceptQuorums) (hbound : ∀ (n : ℕ), ∀ a ∈ Q, ∀ (mb : Ballot Proposer), ((ss n).acceptors a).maxBal = some mb → mb ≤ b) (hphase2a : ∀ (n : ℕ) (v : V), Msg.phase2a b v ∈ (ss n).msgs → ∀ a ∈ Q, ∃ (j : ℕ), n ≤ j ∧ xs j = SynodAction.recvPhase2a a b v) (hphase2b : ∀ (n : ℕ) (a : Acceptor) (v : V), a ∈ Q → Msg.phase2b a b v ∈ (ss n).msgs → ∃ (j : ℕ), n ≤ j ∧ xs j = SynodAction.recvPhase2b l a b v) {n₂ : ℕ} {v : V} (h2a_mem : Msg.phase2a b v ∈ (ss n₂).msgs) :
∃ (k : ℕ), SynodState.LearnedAt qs (ss k) l b v ∧ ((ss k).learners l).learned = some v

Crash-stop phase-2 progress after a proposal has been sent: an accept quorum suffices, even if no prepare quorum remains live. With no higher promise on that quorum and fair delivery of the proposal and its votes, a reachable execution eventually records the proposal at the learner. No proposer liveness or delivery of phase-1 messages is required. This is a phase-2 step after [HMS17], §§3–4.1, in the crash-stop model; persistent-storage recovery and Multi-Paxos remain outside this kernel (issue #7207).

theorem Cslib.Distributed.Paxos.paxos_liveness_of_sole_leader_crashStop {Proposer : Type u_1} {Acceptor : Type u_2} {Learner : Type u_3} {V : Type u_4} [LinearOrder Proposer] [DecidableEq Acceptor] [DecidableEq Learner] [DecidableEq V] (qs : QuorumSystem Acceptor) {inputs : Proposer → V} {ss : ωSequence (SynodState Proposer Acceptor Learner V)} {xs : ωSequence (SynodAction Proposer Acceptor Learner V)} (hr₀ : Reachable qs inputs (ss 0)) (hexec : (synodLts qs).OmegaExecution ss xs) {p : Proposer} {r : ℕ} {Q : Finset Acceptor} {l : Learner} (hQ : qs.Supports Q) (hprep₀ : xs 0 = SynodAction.prepare p r) (hbelow : BallotsBelow (ss 0) { round := r, proposer := p }) (hno_higher : ∀ (j : ℕ) (q : Proposer) (r' : ℕ), xs j = SynodAction.prepare q r' → { round := r', proposer := q } ≤ { round := r, proposer := p }) (hlive : LiveAndLossless { round := r, proposer := p } p Q l ss xs) :
∃ (k : ℕ) (v : V), SynodState.LearnedAt qs (ss k) l { round := r, proposer := p } v ∧ ((ss k).learners l).learned = some v

Conditional crash-stop 4-phase progress step towards [Lam01] §2.4 and [Lam98] §2.1 Theorem 2 / §2.4, and not the crash-recovery or timeout-based leader-election liveness result: assuming an already-selected sole leader p (without modeling leader election, NACK nextBal[q] ballot-bumping, persistent-storage crash recovery, or real-time timeout bounds), from any reachable crash-stop Synod state ss 0, if live proposer p issues prepare p r at step 0 with ballot b = ⟨r, p⟩ strictly exceeding all ballots previously present or promised (BallotsBelow (ss 0) b), no ballot strictly greater than b is subsequently prepared, and ballot-b packets among p, a live cohort Q containing a quorum of each phase (qs.Supports Q), and live learner l are delivered without loss (LiveAndLossless b p Q l ss xs), then l eventually learns a decree value v at ballot b (and ((ss k).learners l).learned = some v).