One-Shot and Slot-Trace Total-Order Broadcast Steps and Cslib.FLP Reduction #
This module formalizes one-shot initial-broadcast and discrete-time slot-trace steps toward #7297 for asynchronous crash-fault Total-Order (Atomic) Broadcast, its reductions to and from Consensus, and its fault-tolerance contrast against single-group Causal Broadcast (after Hadzilacos and Toueg [HT94], §§3.1, 3.4, 3.8–3.9, 7.1–7.2, and Chandra and Toueg [CT96], §§4, 7, 7.1).
One-Shot Asynchronous Crash-Fault Broadcast Model (
TotalOrderBroadcastAlg): Models deterministic event-driven asynchronous broadcast algorithms over process setPin which each process receives one initial broadcast inputinp p : Vatstart, with labelled transition system (TotalOrderBroadcastAlg.lts), schedule fairness (BcastProcFair,BcastFairRun), and crash count (bcastNumProcFaulty) aligned directly withCslib.FLP.Algorithm. Defines one-shotValidity,Integrity,Agreement,SolvesReliableBroadcast, non-uniformTotalOrder([HT94], §3.4, p. 13; [CT96], §7, p. 248),UniformTotalOrder([HT94], §3.8, p. 15), andSolvesTotalOrderBroadcast.One-Shot Reduction to
Cslib.FLPConsensus (consensusOfTotalOrderBroadcast) andf ≥ 1Impossibility Step (not_exists_oneShotTotalOrderBroadcast_ge_one): Adapts anyf-resilient one-shotTotalOrderBroadcastAlg P M S Boolinto anf-resilientCslib.FLP.Algorithm P M S(consensusOfTotalOrderBroadcast_consensus, after [HT94], §7.2.1, Figure 13 & Theorem 13, p. 58; [CT96], §7, p. 249) by deciding the payload of the first delivered message, and invokesCslib.FLP.Consensus.ge_one_not_existsto rule outf ≥ 1crash-resilientTotalOrderBroadcastAlgfor2 ≤ Fintype.card Pand[Nontrivial V](not_exists_oneShotTotalOrderBroadcast_ge_one). Paired with the0-fault deterministic sequencerzeroFaultTotalOrderAlg(zeroFaultTotalOrderAlg_solves),exists_oneShotTotalOrderBroadcast_iff_eq_zerocharacterizes one-shot solvability ast = 0.Abstract Slot-Trace Reduction Step from Consensus + Reliable Broadcast (
ConsensusSlotExec,totalOrderBroadcast_of_consensusSlotExec): Models the batch-delivery reduction of [CT96], §7.1 (Figure 7, Lemmas 7.1.2–7.1.5 & Theorem 7.1.6, pp. 249–252) and [HT94], §7.2.2 (Figure 14 & Theorem 14, pp. 60–63) over[LinearOrder Msg](canonicalBatch,runConsensusSlots) at the abstract discrete-time (t : ℕ) subprotocol-execution level (ConsensusSlotExec), proving duplicate freedom, uniform integrity, uniform total order, agreement, and validity.Single-Group Causal vs. One-Shot Total-Order Fault-Tolerance Dichotomy Step (
causal_vs_oneShotTotalOrder_dichotomy): Contrasts∀ t < Fintype.card Psolvability ofBSSSolvesAtomicMulticastCausalBroadcastagainstt = 0-only solvability of one-shotTotalOrderBroadcastAlgfor2 ≤ Fintype.card Pand[Nontrivial V].
Model scope relative to primary sources #
- Single initial broadcast per process in
TotalOrderBroadcastAlg: FollowingCslib.FLP.Algorithm, each processp : Preceives one initial broadcast inputinp p : Vat initialization (TotalOrderBroadcastAlg.start) rather than dynamic multi-shotbroadcast(m)invocations; dynamic multi-shotTotalOrderBroadcastAlgremains open under #7297. - Discrete-time modular subprotocol interface in
ConsensusSlotExec:ConsensusSlotExecandtotalOrderBroadcast_of_consensusSlotExecwork over an arbitrary multi-shot message typeMsgwith[LinearOrder Msg]and broadcast setscorrectBcast ⊆ bcast : Set Msg, axiomatizing subprotocol execution traces (rDelivered,decidedBatches,Proposed,faulty_eventually_halted) rather than transforming executable networkAlgorithms (and leaving failure-detector classes of [CT96] §§3, 5–6 out of scope).
Main definitions #
Cslib.Distributed.CausalBroadcast.BcastMsg,Cslib.Distributed.CausalBroadcast.NetEnvelope,Cslib.Distributed.CausalBroadcast.BcastEvent,Cslib.Distributed.CausalBroadcast.BcastProcState,Cslib.Distributed.CausalBroadcast.BcastState: message, envelope, event, and state structures for one-shot asynchronous crash-fault broadcast algorithms.Cslib.Distributed.CausalBroadcast.TotalOrderBroadcastAlg: deterministic one-shot asynchronous broadcast algorithm and itslts,AdmissibleRun,Validity,Integrity,Agreement,TotalOrder,UniformTotalOrder,SolvesReliableBroadcast, andSolvesTotalOrderBroadcastpredicates.Cslib.Distributed.CausalBroadcast.consensusOfTotalOrderBroadcast:Cslib.FLP.Algorithm P M Sadapter reducing binary consensus to one-shotTotalOrderBroadcastAlg.Cslib.Distributed.CausalBroadcast.zeroFaultTotalOrderAlg: deterministic fixed-sequencer one-shot algorithm solving0-faultSolvesTotalOrderBroadcast.Cslib.Distributed.CausalBroadcast.canonicalBatch,Cslib.Distributed.CausalBroadcast.runConsensusSlots: executable canonical[LinearOrder Msg]batch-delivery engine for sequential consensus slots.Cslib.Distributed.CausalBroadcast.ConsensusSlotExec: abstract discrete-time (t : ℕ) execution specification of sequential Consensus slots over Reliable Broadcast.
Main results #
Cslib.Distributed.CausalBroadcast.consensusOfTotalOrderBroadcast_consensus: anyf-resilient one-shotTotalOrderBroadcastAlgoverBoolyields anf-resilientCslib.FLP.Algorithm.Cslib.Distributed.CausalBroadcast.uniformTotalOrder_of_solvesTotalOrderBroadcast: for one-shotTotalOrderBroadcastAlg, non-uniformSolvesTotalOrderBroadcast fimpliesUniformTotalOrderacross all reachable configurations.Cslib.Distributed.CausalBroadcast.not_exists_oneShotTotalOrderBroadcast_ge_one: impossibility step forf ≥ 1crash-resilient one-shotTotalOrderBroadcastAlgwhen2 ≤ Fintype.card Pand[Nontrivial V], proved viaCslib.FLP.Consensus.ge_one_not_exists.Cslib.Distributed.CausalBroadcast.zeroFaultTotalOrderAlg_solvesandCslib.Distributed.CausalBroadcast.exists_oneShotTotalOrderBroadcast_iff_eq_zero:0-fault one-shot sequencer solvability and exactt = 0characterization for2 ≤ Fintype.card P.Cslib.Distributed.CausalBroadcast.canonicalBatch_extandCslib.Distributed.CausalBroadcast.runConsensusSlots_nodup: canonical set-to-sequence batch uniqueness and duplicate-free multi-slot execution.Cslib.Distributed.CausalBroadcast.totalOrderBroadcast_of_consensusSlotExec: abstract slot-trace reduction step proving duplicate freedom, uniform integrity, uniform total order, agreement, and validity for anyConsensusSlotExec.Cslib.Distributed.CausalBroadcast.causal_vs_oneShotTotalOrder_dichotomy: fault-tolerance dichotomy step contrasting∀ t < Fintype.card Psingle-group atomic-multicast causal broadcast againstt = 0-only one-shot total-order broadcast.
References #
- K. Birman, A. Schiper, P. Stephenson, Lightweight causal and atomic group multicast
- T. D. Chandra, S. Toueg, Unreliable failure detectors for reliable distributed systems
- V. Hadzilacos, S. Toueg, A modular approach to fault-tolerant broadcasts and related problems
- H. Völzer, A constructive proof for FLP
Part 1: Asynchronous Crash-Fault Total-Order Broadcast Model #
An event delivered to dest in a TotalOrderBroadcastAlg: Sum.inl v delivers dest's
initial broadcast input v : V, and Sum.inr m delivers an in-flight protocol message m : M.
- dest : P
Recipient process identity.
- evt : V ⊕ M
Per-process configuration in a TotalOrderBroadcastAlg, pairing internal protocol state state
with the append-only chronological list delivered of A-delivered broadcast messages.
- state : S
Internal protocol state of the process.
Chronological sequence of broadcast messages delivered at this process so far.
Global network configuration of a TotalOrderBroadcastAlg: unordered multiset msgs of pending
events/messages in transit and per-process local states proc.
- msgs : Multiset (BcastEvent P M V)
Unordered multiset of pending input triggers and in-flight network messages.
- proc : P → BcastProcState P S V
Local state of each process.
Specification of a deterministic asynchronous message-passing broadcast algorithm over process
set P, network message type M, local state type S, and broadcast payload type V.
Mirrors Cslib.FLP.Algorithm: protocol transitions depend only on the incoming BcastEvent and
the recipient's internal state : S, never on the specification log delivered.
- init : P → S
Initial internal state of each process
p : P. - next : BcastEvent P M V → S → S
Updated internal state of
e.destupon receiving evente. Network messages emitted by
e.destupon receiving evente.Broadcast messages newly delivered to
e.destupon receiving evente.
Action label of TotalOrderBroadcastAlg.lts: some e processes event e, and none is a
stuttering step (matching Cslib.FLP.Action).
Initial global configuration for input assignment inp : P → V: one initial trigger
⟨p, Sum.inl (inp p)⟩ per process p : P and empty delivery logs.
Global state transition when e.dest receives e in state s.
Labelled transition system of π, with stuttering step none matching
Cslib.FLP.Algorithm.
Reachability from π.start inp.
Process p crashes (BcastProcFaulty) in (ss, xs) iff from some time k onward there is an
undelivered event addressed to p while p never processes another event (matching
Cslib.FLP.ProcFaulty).
Process p is fair/correct (BcastProcFair) in (ss, xs) iff every event in msgs addressed
to p is eventually processed by p (matching Cslib.FLP.ProcFair).
An infinite run is fair iff every process is either crash-faulty or fair
(matching Cslib.FLP.FairRun).
Number of crash-faulty processes in (ss, xs) (matching Cslib.FLP.numProcFaulty).
An infinite execution (ss, xs) of π on input inp is f-admissible iff it starts at
π.start inp, follows π.lts, is fair, and has at most f crash-faulty processes
(matching Cslib.FLP.Algorithm.AdmissibleRun).
One-shot broadcast validity on TotalOrderBroadcastAlg (after [HT94], §3.1,
p. 10; [CT96], §4, p. 238): in every f-admissible run, every correct (BcastProcFair)
process p eventually delivers its own initial broadcast ⟨p, inp p⟩.
One-shot broadcast integrity on TotalOrderBroadcastAlg (after [HT94], §3.1,
p. 10; [CT96], §4, p. 238): in every f-admissible run, every correct process delivers
each message at most once (Nodup), and every delivered message m equals the initial broadcast
⟨m.sender, inp m.sender⟩ of its sender.
One-shot broadcast agreement on TotalOrderBroadcastAlg (after [HT94], §3.1,
p. 10; [CT96], §4, p. 238): in every f-admissible run, if a correct process p
delivers m, then every correct process q eventually delivers m.
Non-uniform total-order delivery on one-shot TotalOrderBroadcastAlg (after
[HT94], §3.4, p. 13; [CT96], §7, p. 248): in every f-admissible run, if
two correct processes p and q both deliver m₁ and m₂, then p delivers m₁ before m₂ iff
q delivers m₁ before m₂.
Uniform total-order delivery on one-shot TotalOrderBroadcastAlg (after [HT94],
§3.8, p. 15): in every reachable global configuration s, for any two processes p and q
(faulty or correct) that have both delivered m₁ and m₂, p delivered m₁ before m₂ iff q
delivered m₁ before m₂.
One-shot f-resilient reliable broadcast specification on TotalOrderBroadcastAlg (after
[HT94], §3.1).
One-shot f-resilient total-order (atomic) broadcast specification on TotalOrderBroadcastAlg
(after [HT94], §3.4; [CT96], §7).
Part 2: Reduction 1 — Total-Order Broadcast → Cslib.FLP Consensus & Impossibility #
One-shot initial-broadcast reduction adapter from TotalOrderBroadcastAlg P M S Bool to
Cslib.FLP.Algorithm P M S (toward #7297, after [HT94], §7.2.1, Figure 13, p. 58
and [CT96], §7, p. 249): each process p broadcasts its initial boolean input inp p
upon receiving ⟨p, Sum.inl (inp p)⟩ and decides the payload of the first message delivered in its
local delivery log (latched write-once by Cslib.FLP.Algorithm.recvMsg).
One-shot initial-broadcast reduction step from TotalOrderBroadcastAlg to binary Consensus in
Cslib.FLP (toward #7297, after [HT94], §7.2.1, Figure 13 & Theorem 13, p. 58 and
[CT96], §7, p. 249): for every fault bound f : ℕ, if π solves f-resilient
one-shot SolvesTotalOrderBroadcast over Bool, then consensusOfTotalOrderBroadcast π solves
f-resilient Cslib.FLP.Algorithm.Consensus.
One-shot initial-broadcast impossibility step for f ≥ 1 crash faults (toward #7297, after
[HT94], §7.2.1, Corollary 2, p. 58 and [CT96], §7, observation (1),
p. 249): for any finite process set P with 2 ≤ Fintype.card P, any nontrivial payload type V,
and any fault bound 1 ≤ f, there is no deterministic asynchronous f-resilient one-shot
TotalOrderBroadcastAlg.
Proved by reducing binary Consensus to one-shot TotalOrderBroadcastAlg via
consensusOfTotalOrderBroadcast and applying Cslib.FLP.Consensus.ge_one_not_exists directly.
One-shot initial-broadcast uniformity step via Cslib.FLP.FairScheduler (toward #7297): in
purely asynchronous crash-stop message passing, non-uniform SolvesTotalOrderBroadcast f on a
one-shot TotalOrderBroadcastAlg implies UniformTotalOrder on all reachable configurations,
because any finite reachable prefix extends to a 0-fault admissible run in which every process is
BcastProcFair.
Part 3: Zero-Fault Deterministic Sequencer Algorithm (f = 0) #
Result of draining consecutive available slots from a sequencer reorder buffer.
- nextDeliver : ℕ
Updated next-undelivered slot index.
Broadcast messages newly drained in slot order.
Protocol message type of zeroFaultTotalOrderAlg: processes send propose item to the fixed
leader, and leader broadcasts ordered slot item to all processes.
Local state of each process in zeroFaultTotalOrderAlg.
Drain consecutive slots k, k + 1, … available in buf for up to fuel steps.
One-shot deterministic 0-fault fixed-sequencer algorithm (leader : P) on
TotalOrderBroadcastAlg (toward #7297):
- Upon receiving initial input
Sum.inl vatp,psendsSeqMsg.propose ⟨p, v⟩toleader. - Upon receiving
SeqMsg.propose itematleader,leaderassignsslot := st.nextSlot, incrementsnextSlot, and sendsSeqMsg.ordered slot itemto everyq : P. - Upon receiving
SeqMsg.ordered slot itematq,qbuffers⟨slot, item⟩and delivers all consecutive available slots starting atst.nextDeliver.
Reorder-buffer drain lemmas #
Sequencer invariant and shadow log #
Per-action preservation of SeqInv #
Fairness, buffer monotonicity, and eventual slot delivery #
Broadcast specification properties for zeroFaultTotalOrderAlg #
One-shot 0-fault solvability step (toward #7297): zeroFaultTotalOrderAlg leader satisfies
SolvesTotalOrderBroadcast 0 on any finite process set P.
Exact t = 0 crash-fault solvability characterization step for one-shot
TotalOrderBroadcastAlg (toward #7297): on any finite process set P with 2 ≤ Fintype.card P and
any nontrivial payload type V, a deterministic asynchronous t-resilient one-shot
TotalOrderBroadcastAlg exists if and only if t = 0.
Part 4: Reduction 2 — Sequential Consensus Slots → Total-Order Broadcast #
Given the list alreadyDelivered of previously A-delivered messages and a raw Consensus-decided
batch rawBatch, filter out already-delivered messages, deduplicate, and sort into canonical
strictly increasing [LinearOrder Msg] order ([CT96], §7.1, Figure 7, Task 3, p. 249;
[HT94], §7.2.2, Figure 14, p. 60).
Fold a finite list of Consensus-decided batches into the resulting chronological A-delivery log,
appending canonicalBatch acc batch at each sequential slot.
Extensionality of canonicalBatch on undelivered elements: two raw Consensus-decided batches
with the same undelivered elements produce the identical canonical sequence
canonicalBatch deliv raw₁ = canonicalBatch deliv raw₂, regardless of duplicates or internal list
ordering.
runConsensusSlots batches never delivers duplicate messages (Nodup).
Abstract discrete-time (t : ℕ) slot-execution specification step toward #7297 (after
[CT96], §7.1, Figure 7, pp. 249–252; [HT94], §7.2.2, Figure 14,
pp. 60–63) over finite process set P, static crash-fault set F : Set P, and message type Msg
equipped with [LinearOrder Msg], axiomatizing the execution traces of an underlying Reliable
Broadcast and sequential per-slot Consensus instances (k = 0, 1, …).
Each process p maintains:
rDelivered p t : Finset Msg— messages R-delivered by the underlying Reliable Broadcast up to timet;decidedBatches p t : List (List Msg)— raw Consensus batches sequentially decided bypin slots0, 1, …, (decidedBatches p t).length - 1up to timet, from whichp's chronological A-delivery log is computed byaDelivered p t := runConsensusSlots (decidedBatches p t).
- bcast : Set Msg
All messages submitted to Atomic Broadcast during the execution.
- correctBcast : Set Msg
Subset of
bcastinitiated by non-faulty (∉ F) broadcasters. - correctBcast_sub : self.correctBcast ⊆ self.bcast
Every message in
correctBcastwas submitted tobcast. Local set
R_delivered_pof Reliable-Broadcast-delivered messages atpat timet.Sequential Consensus batches
msgSet^0, …, msgSet^{k-1}decided atpby timet.Proposed p k t batchholds whenpexecutespropose(k, batch)at timet.R_delivered_pgrows monotonically with time.Reliable Broadcast Uniform Integrity: every R-delivered message was broadcast.
Reliable Broadcast Validity: every message broadcast by a correct process is eventually R-delivered by every correct process
q ∉ F.- rb_agreement (p : P) : p ∉ F → ∀ q ∉ F, ∀ (m : Msg) (t : ℕ), m ∈ self.rDelivered p t → ∃ (t' : ℕ), m ∈ self.rDelivered q t'
Reliable Broadcast Agreement: every message R-delivered by a correct process
p ∉ Fis eventually R-delivered by every correct processq ∉ F. - decidedBatches_prefix (p : P) {t₁ t₂ : ℕ} : t₁ ≤ t₂ → self.decidedBatches p t₁ <+: self.decidedBatches p t₂
Sequential slot decisions at each process only extend by appending new slots.
- propose_spec (p : P) (k t : ℕ) (batch : List Msg) : self.Proposed p k t batch → (self.decidedBatches p t).length = k ∧ batch ≠ [] ∧ ∀ (m : Msg), m ∈ batch ↔ m ∈ self.rDelivered p t ∧ m ∉ runConsensusSlots (self.decidedBatches p t)
Task 3 proposal rule ([CT96], Figure 7, p. 249): when
pproposesbatchin slotkat timet,phas completed slots< k,batchis nonempty, andbatchconsists ofR_delivered_p \ A_delivered_p. - decide_requires_propose (p : P) (t k : ℕ) : k < (self.decidedBatches p t).length → ∃ t₀ ≤ t, ∃ (batch : List Msg), self.Proposed p k t₀ batch
A process enters
decide(k, -)only after executingpropose(k, -)in Task 3. - task3_fair (p : P) : p ∉ F → ∀ (t k : ℕ), (self.decidedBatches p t).length = k → (∃ m ∈ self.rDelivered p t, m ∉ runConsensusSlots (self.decidedBatches p t)) → ∃ (t' : ℕ) (batch : List Msg), self.Proposed p k t' batch
Task 3 fairness at correct processes
p ∉ F: wheneverpis at slotkwith an undelivered R-delivered message,peventually executespropose(k, -). - faulty_eventually_halted (r : P) : r ∈ F → ∃ (K_r : ℕ), ∀ (k : ℕ), K_r ≤ k → ∀ (t : ℕ) (batch : List Msg), ¬self.Proposed r k t batch
Crash-stop bound on faulty proposers ([CT96], Lemma 7.1.4, p. 251): each faulty process
r ∈ Fcrashes after finitely many steps and therefore proposes in only finitely many Consensus slots. - cons_agreement (p q : P) (t₁ t₂ k : ℕ) (hk₁ : k < (self.decidedBatches p t₁).length) (hk₂ : k < (self.decidedBatches q t₂).length) (m : Msg) : m ∈ (self.decidedBatches p t₁)[k] ↔ m ∈ (self.decidedBatches q t₂)[k]
Consensus Uniform Agreement per slot
k: any two processes that decide slotkdecide extensionally equal message setsmsgSet^k. - cons_validity (p : P) (t k : ℕ) (hk : k < (self.decidedBatches p t).length) : ∃ (r : P) (t_r : ℕ) (batch : List Msg), self.Proposed r k t_r batch ∧ ∀ (m : Msg), m ∈ (self.decidedBatches p t)[k] ↔ m ∈ batch
Consensus Uniform Validity per slot
k: any decided batch in slotkwas proposed by some processrin slotk. - cons_termination (k : ℕ) : (∀ q ∉ F, ∃ (t : ℕ) (batch : List Msg), self.Proposed q k t batch) → ∀ q ∉ F, ∃ (t : ℕ), k < (self.decidedBatches q t).length
Consensus Termination per slot
k: if all correct processesq ∉ Fpropose in slotk, then all correct processes eventually decide slotk.
Chronological A-delivery log of process p at time t in E, obtained by running
runConsensusSlots on E.decidedBatches p t.
Abstract discrete-time (t : ℕ) slot-trace reduction step from Reliable Broadcast and
sequential Consensus slot specifications (ConsensusSlotExec) to Total-Order Broadcast properties
(toward #7297, after [CT96], §7.1, Figure 7 & Theorem 7.1.6, pp. 249–252 and
[HT94], §7.2.2, Figure 14 & Theorem 14, pp. 60–63):
For any finite process set P, any crash-fault set F : Set P, and any [LinearOrder Msg], every
abstract slot execution E : ConsensusSlotExec P Msg F satisfies:
- Uniform No Duplicates:
(E.aDelivered p t).Nodupfor allp : P(faulty or correct); - Uniform Integrity:
m ∈ E.aDelivered p t → m ∈ E.bcastfor allp : P; - Uniform Total Order: for all
p, q : P(faulty or correct) andt₁, t₂ : ℕ, ifm₁, m₂have been A-delivered at both(p, t₁)and(q, t₂), thenpdeliveredm₁beforem₂iffqdeliveredm₁beforem₂; - Agreement: if
p ∉ FA-deliversmatt₁, then everyq ∉ Feventually A-deliversm; - Validity: for every
m ∈ E.correctBcastand everyp ∉ F,peventually A-deliversm.
Part 5: Single-Group Causal vs. One-Shot Total-Order Fault-Tolerance Dichotomy Step #
Fault-tolerance dichotomy step between single-group atomic-multicast CBCAST and one-shot
TotalOrderBroadcastAlg (toward #7297, after [BSS91], §5.1;
[HT94], §3.3, §3.4 & Corollary 2; [CT96], §7):
Over any finite process set P with 2 ≤ Fintype.card P and any nontrivial payload type V, for
every crash-fault threshold t < Fintype.card P:
- Single-group atomic-multicast causal broadcast (
bssLTS) is deterministically solvable for allt < Fintype.card P: for every fault setF : Set PwithF.ncard ≤ t, non-faulty processes exist (∃ q, q ∉ F) andbssLTS FsatisfiesBSSSolvesAtomicMulticastCausalBroadcast P V F; - One-shot total-order broadcast (
TotalOrderBroadcastAlg) is deterministically solvable ifft = 0(impossible fort ≥ 1by reduction toCslib.FLP).