Documentation

CslibFrontier.Computability.Distributed.PartialSynchrony.Liveness

Post-GST deterministic liveness and tight resiliency bounds under partial synchrony #

Post-stabilization termination of byzQuorumProtocol (3 * t < Fintype.card P) and omissionQuorumProtocol (2 * t < Fintype.card P) under the shared round-robin Cslib.Distributed.rotatingCoordinator, together with the matching impossibility results (2 ≤ Fintype.card P ≤ 3 * t for unauthenticated Byzantine faults and 2 ≤ Fintype.card P ≤ 2 * t for crash/omission faults) and exact characterizations of when deterministic partial-synchrony consensus is solvable (Dwork, Lynch and Stockmeyer, §§3.2, 4.3).

Main definitions #

Main results #

References #

Post-GST bounded termination of byzQuorumProtocol (3 * t < Fintype.card P) #

theorem Cslib.Distributed.PartialSynchrony.byzQuorum_terminates_in_honest_view {P : Type u_1} {V : Type u_2} [Fintype P] [DecidableEq P] [DecidableEq V] {procs : List P} (leader : ℕ → P) {t : ℕ} {F : Finset P} (hprocs : ∀ (p : P), p ∈ procs) (hn : 3 * t < Fintype.card P) (hF : F.card ≤ t) {deliver : ℕ → P → P → Bool} {adv : ℕ → P → P → Option (ByzViewMsg V)} (x : P → V) {vStar : ℕ} (hl : leader vStar ∉ F) (hsync : ∀ (r : ℕ), 6 * vStar ≤ r → r < 6 * (vStar + 1) → ∀ j ∉ F, ∀ i ∉ F, deliver r j i = true) (i : P) :
i ∉ F → ((byzQuorumProtocol P V procs leader t).byzantineDecision F deliver adv x (6 * (vStar + 1)) i).isSome = true

Single-honest-view termination (byzQuorum_terminates_in_honest_view): when 3 * t < Fintype.card P, F.card ≤ t, the view coordinator leader v* is correct (∉ F), and all 6 subrounds 6 * v* .. 6 * v* + 5 of view v* deliver every message between correct processes, every correct process i ∉ F has decided (isSome = true) at 6 * (v* + 1).

theorem Cslib.Distributed.PartialSynchrony.byzQuorum_terminates_after_gst {P : Type u_1} {V : Type u_2} [Fintype P] [DecidableEq P] [DecidableEq V] {procs : List P} {t : ℕ} {F : Finset P} (hprocs : ∀ (p : P), p ∈ procs) (fallback : P) (hn : 3 * t < Fintype.card P) (hF : F.card ≤ t) {deliver : ℕ → P → P → Bool} {gst : ℕ} (hgst : IsGST deliver F gst) (adv : ℕ → P → P → Option (ByzViewMsg V)) (x : P → V) (i : P) :
i ∉ F → ((byzQuorumProtocol P V procs (rotatingCoordinator procs fallback) t).byzantineDecision F deliver adv x (gst + 6 * (t + 2)) i).isSome = true

Post-GST bounded termination (byzQuorum_terminates_after_gst): under rotatingCoordinator, once IsGST deliver F gst holds with 3 * t < Fintype.card P and F.card ≤ t, every correct process i ∉ F has decided by round gst + 6 * (t + 2) (O(t) rounds after GST, cf. Dwork, Lynch and Stockmeyer, §3.2.3, Remark 1, p. 302).

theorem Cslib.Distributed.PartialSynchrony.solvesByzantinePartialSync_byzQuorumProtocol {P : Type u_1} {V : Type u_2} [Fintype P] [DecidableEq P] [DecidableEq V] {procs : List P} {t : ℕ} (hprocs : ∀ (p : P), p ∈ procs) (fallback : P) (hn : 3 * t < Fintype.card P) :

byzQuorumProtocol with rotatingCoordinator solves unauthenticated Byzantine partial-synchrony consensus whenever 3 * t < Fintype.card P (witnessing the existence half of Dwork, Lynch and Stockmeyer, Theorem 3.3, p. 302 in the §3.1 basic round model via a six-subround rotating-coordinator view-locking protocol).

Post-GST bounded termination of omissionQuorumProtocol (2 * t < Fintype.card P) #

theorem Cslib.Distributed.PartialSynchrony.omission_terminates_in_honest_view {P : Type u_1} {V : Type u_2} [Fintype P] [DecidableEq P] [DecidableEq V] {procs : List P} (leader : ℕ → P) {t : ℕ} {F : Finset P} (hprocs : ∀ (p : P), p ∈ procs) (hn : 2 * t < Fintype.card P) (hF : F.card ≤ t) {deliver : ℕ → P → P → Bool} (x : P → V) {vStar : ℕ} (hl : leader vStar ∉ F) (hsync : ∀ (r : ℕ), 3 * vStar ≤ r → r < 3 * (vStar + 1) → ∀ j ∉ F, ∀ i ∉ F, deliver r j i = true) (i : P) :
i ∉ F → ((omissionQuorumProtocol P V procs leader t).omissionDecision deliver x (3 * (vStar + 1)) i).isSome = true

Single-honest-view omission termination (omission_terminates_in_honest_view): if 2 * t < Fintype.card P, F.card ≤ t, leader v* ∉ F, and all 3 subrounds 3 * v* .. 3 * v* + 2 deliver every message between correct processes, then every correct process i ∉ F has decided at round 3 * (v* + 1).

theorem Cslib.Distributed.PartialSynchrony.omission_terminates_after_gst {P : Type u_1} {V : Type u_2} [Fintype P] [DecidableEq P] [DecidableEq V] {procs : List P} {t : ℕ} {F : Finset P} (hprocs : ∀ (p : P), p ∈ procs) (fallback : P) (hn : 2 * t < Fintype.card P) (hF : F.card ≤ t) {deliver : ℕ → P → P → Bool} {gst : ℕ} (hgst : IsGST deliver F gst) (x : P → V) (i : P) :
i ∉ F → ((omissionQuorumProtocol P V procs (rotatingCoordinator procs fallback) t).omissionDecision deliver x (gst + 3 * (t + 2)) i).isSome = true

Post-GST bounded omission termination (omission_terminates_after_gst): under rotatingCoordinator, once IsGST deliver F gst holds with 2 * t < Fintype.card P and F.card ≤ t, every correct process i ∉ F has decided by round gst + 3 * (t + 2).

theorem Cslib.Distributed.PartialSynchrony.solvesOmissionPartialSync_omissionQuorumProtocol {P : Type u_1} {V : Type u_2} [Fintype P] [DecidableEq P] [DecidableEq V] {procs : List P} {t : ℕ} (hprocs : ∀ (p : P), p ∈ procs) (fallback : P) (hn : 2 * t < Fintype.card P) :

omissionQuorumProtocol with rotatingCoordinator solves crash/omission partial-synchrony consensus whenever 2 * t < Fintype.card P (witnessing the existence half of Dwork, Lynch and Stockmeyer, Theorem 3.1, p. 297 in the §3.1 basic round model via a three-subround rotating-coordinator view-locking protocol).

Synchronous GST = 0 reduction and tight lower bounds (2t < n and 3t < n) #

def Cslib.Distributed.PartialSynchrony.PartialSyncProtocol.toSyncProtocol {P : Type u_1} {V : Type u_2} {S : Type u_3} {M : Type u_4} [DecidableEq V] (π : PartialSyncProtocol P V S M) (v₀ v₁ : V) :

Specializes a PartialSyncProtocol P V S M to a synchronous Boolean Cslib.Distributed.Byzantine.Protocol P S (Option M) at GST = 0 (deliver = fun _ _ _ => true), mapping input bits false ↦ v₀, true ↦ v₁ and testing output i s = some v₁.

theorem Cslib.Distributed.PartialSynchrony.PartialSyncProtocol.byzantineState_always_eq_state {P : Type u_1} {V : Type u_2} {S : Type u_3} {M : Type u_4} [DecidableEq P] [DecidableEq V] (π : PartialSyncProtocol P V S M) (v₀ v₁ : V) (F : Finset P) (adv : ℕ → P → P → Option M) (b : P → Bool) (r : ℕ) (i : P) :
π.byzantineState F (fun (x : ℕ) (x_1 x_2 : P) => true) adv (fun (j : P) => if b j = true then v₁ else v₀) r i = (π.toSyncProtocol v₀ v₁).state F adv b r i

With zero network omissions (deliver = fun _ _ _ => true), byzantineState coincides round for round with (π.toSyncProtocol v₀ v₁).state.

theorem Cslib.Distributed.PartialSynchrony.not_partialSync_of_le_three_t {P : Type u_1} {V : Type u_2} {S : Type u_3} {M : Type u_4} [Fintype P] [DecidableEq P] [Nontrivial V] (π : PartialSyncProtocol P V S M) {t R : ℕ} (h2 : 2 ≤ Fintype.card P) (h3 : Fintype.card P ≤ 3 * t) (hag : ∀ (F : Finset P), F.card ≤ t → ∀ (adv : ℕ → P → P → Option M) (x : P → V), ∀ i ∉ F, ∀ j ∉ F, ∀ (v₁ v₂ : V), π.byzantineDecision F (fun (x : ℕ) (x_1 x_2 : P) => true) adv x R i = some v₁ → π.byzantineDecision F (fun (x : ℕ) (x_1 x_2 : P) => true) adv x R j = some v₂ → v₁ = v₂) (hval : ∀ (F : Finset P), F.card ≤ t → ∀ (adv : ℕ → P → P → Option M) (x : P → V) (v : V), (∀ i ∉ F, x i = v) → ∀ i ∉ F, ∀ (w : V), π.byzantineDecision F (fun (x : ℕ) (x_1 x_2 : P) => true) adv x R i = some w → w = v) (hbdd : ∀ (F : Finset P), F.card ≤ t → ∀ (adv : ℕ → P → P → Option M) (x : P → V), ∀ i ∉ F, (π.byzantineDecision F (fun (x : ℕ) (x_1 x_2 : P) => true) adv x R i).isSome = true) :

Synchronous-special-case impossibility (not_partialSync_of_le_three_t): since GST = 0 with deliver = fun _ _ _ => true embeds synchronous Byzantine.Protocol directly, Cslib.Distributed.Byzantine.Protocol.not_solvesByzantineAgreement rules out any protocol that achieves fixed-round R agreement, correct-input validity, and termination at deliver = fun _ _ _ => true when 2 ≤ Fintype.card P ≤ 3 * t.

Unbounded unauthenticated Byzantine impossibility (not_solvesByzantinePartialSync, Dwork, Lynch and Stockmeyer, §1.2 and Table I, p. 291): when 2 ≤ Fintype.card P ≤ 3 * t and V has at least two values, no deterministic protocol solves SolvesByzantinePartialSync t (even with run-dependent unbounded termination rounds and infinite message spaces).

As noted in Dwork, Lynch and Stockmeyer, §1.2, p. 291, for unauthenticated Byzantine faults with correct-input validity (∀ i ∉ F, x i = v) the 2 ≤ |P| ≤ 3t lower bound reduces at GST = 0 (deliver = fun _ _ _ => true) to the completely synchronous bound of Pease, Shostak and Lamport, proved here via the synchronous covering simulation Cslib.Distributed.Byzantine.Protocol.state_eq_coverState of Fischer, Lynch and Merritt (distinct from DLS Theorem 4.4, p. 306, which establishes 2 ≤ N ≤ 3t for authenticated Byzantine faults and weak unanimity via pre-GST partition delay and is not formalized here).

theorem Cslib.Distributed.PartialSynchrony.not_omissionPartialSync_weakUnanimity {P : Type u_1} {V : Type u_2} {S : Type u_3} {M : Type u_4} [Fintype P] [Nontrivial V] (π : PartialSyncProtocol P V S M) {t : ℕ} (h2 : 2 ≤ Fintype.card P) (h2t : Fintype.card P ≤ 2 * t) (hag : ∀ (deliver : ℕ → P → P → Bool) (x : P → V) (r₁ r₂ : ℕ) (i j : P) (v₁ v₂ : V), (∃ (gst : ℕ), IsGST deliver ∅ gst) → π.omissionDecision deliver x r₁ i = some v₁ → π.omissionDecision deliver x r₂ j = some v₂ → v₁ = v₂) (hwu : ∀ (deliver : ℕ → P → P → Bool) (x : P → V) (v : V), (∃ (gst : ℕ), IsGST deliver ∅ gst) → (∀ (i : P), x i = v) → ∀ (r : ℕ) (i : P) (w : V), π.omissionDecision deliver x r i = some w → w = v) (hterm : ∀ (F : Finset P), F.card ≤ t → ∀ (deliver : ℕ → P → P → Bool) (gst : ℕ) (x : P → V), IsGST deliver F gst → ∀ i ∉ F, ∃ (r : ℕ), (π.omissionDecision deliver x r i).isSome = true) :

Weak-unanimity crash/omission lower bound (not_omissionPartialSync_weakUnanimity, Dwork, Lynch and Stockmeyer, Theorem 4.3, pp. 305–306): in the §3.1 basic round model, when 2 ≤ Fintype.card P ≤ 2 * t and V has at least two values, no deterministic protocol achieves post-GST termination against ≤ t omission faults together with failure-free (F = ∅, ∃ gst, IsGST deliver ∅ gst) agreement and weak unanimity.

Matches the partition-and-healing proof of Theorem 4.3: partitioning P into A and Aᶜ of size ≤ t forces a ∈ A to decide at some round R₀ on all-v₀ inputs (which must equal v₀ by healing the partition after R₀ so IsGST _ ∅ R₀ holds and invoking weak unanimity) and b ∉ A to decide v₁ at some round R₁ on all-v₁ inputs (healing after R₁), contradicting failure-free agreement on the mixed-input schedule that heals at max R₀ R₁.

theorem Cslib.Distributed.PartialSynchrony.not_solvesOmissionPartialSync {P : Type u_1} {V : Type u_2} {S : Type u_3} {M : Type u_4} [Fintype P] [Nontrivial V] (π : PartialSyncProtocol P V S M) {t : ℕ} (h2 : 2 ≤ Fintype.card P) (h2t : Fintype.card P ≤ 2 * t) :

Crash/omission lower bound (not_solvesOmissionPartialSync, Dwork, Lynch and Stockmeyer, Theorem 4.3, pp. 305–306): when 2 ≤ Fintype.card P ≤ 2 * t and V has at least two values, no deterministic protocol solves SolvesOmissionPartialSync t (immediate from not_omissionPartialSync_weakUnanimity).

Sharp resiliency characterizations #

Sharp characterization of unauthenticated Byzantine consensus under partial synchrony (exists_solvesByzantinePartialSync_iff, Dwork, Lynch and Stockmeyer, Table I, p. 291): over any nontrivial value domain [Nontrivial V], deterministic consensus tolerating t unauthenticated Byzantine faults under partial synchrony is solvable if and only if Fintype.card P ≤ 1 ∨ 3 * t < Fintype.card P.

Sharp characterization of crash/omission consensus under partial synchrony (exists_solvesOmissionPartialSync_iff, Dwork, Lynch and Stockmeyer, Table I, p. 291): over any nontrivial value domain [Nontrivial V], deterministic consensus tolerating t crash/omission faults under partial synchrony is solvable if and only if Fintype.card P ≤ 1 ∨ 2 * t < Fintype.card P.