Two-round rotating-king protocol and multivalued-to-binary reduction steps #
The recursive oral messages protocol
(CslibFrontier.Computability.Distributed.Byzantine.RecursiveOralMessages) solves synchronous
Byzantine agreement for n > 3t in t + 1 rounds by relaying full trees of depth t + 1, so its
message size grows exponentially in t. This module lands two polynomial-communication synchronous
protocol steps toward #7210 (#3261) in Cslib.Distributed.Byzantine:
Two-round rotating-king protocol step (
phaseKing, after Berman and Garay): a2 * (t + 1)-round deterministic protocol over any[DecidableEq V]for4 * t < Fintype.card Pin which every point-to-point message is a single value ofV(Msg = V) and each process stores three fields (PhaseKingState V). Primary-source locator verification against the paywalled[BermanGaray1989]proceedings text, inventory registration, and the 3-round-per-phase3 * t < nextension of Berman, Garay and Perry remain open under#7210. Given an injective schedulekings : Fin (t + 1) ↪ Poft + 1phase kings:- In round
2 * k(universal broadcast), every process broadcasts its current estimateest. Because4 * t < nimpliesn < 2 * (n - 2 * t), at most one valuex : Vappears at leastn - 2 * ttimes (and a fortiori at most one appears at leastn - ttimes). Each process recordskingProposal(xif somexhas multiplicity≥ n - 2 * t, elseest) andoverwhelming(some xif somexhas multiplicity≥ n - t, elsenone). - In round
2 * k + 1(king tie-break),kings kbroadcasts itskingProposal, and every process updatesesttoxwhenoverwhelming = some xand to the value received fromkings kotherwise.
Unanimity among correct processes persists across every phase whenever
2 * t < n(phaseKing_persists), even ifkings kis faulty and equivocates. By the pigeonhole principle at least one of thet + 1distinct kings is correct, and in its phase all correct processes converge to that king's proposal whenever4 * t < n(phaseKing_converges_of_notMem): if any correct process hadoverwhelming = some x(multiplicity ≥ n - t), at leastn - 2 * tcorrect processes broadcastx, so the correct king also sawmultiplicity ≥ n - 2 * tand proposedx. The threshold4 * t < nis sharp for this 2-round phase structure: onFin 4witht = 1,phaseKingfails for every king schedule and round bound (phaseKing_fails_four_one), because a single traitor can create a2-versus-2tie atn - 2 * t = 2for an honest king while giving another honest process multiplicityn - t = 3.- In round
Multivalued-to-binary reduction step (
turpinCoan, after Turpin and Coan, §§2–3, pp. 74–75): given anyR₀-round binary protocolπBool : Protocol P SBool MBoolsolvingSolvesByzantineAgreement t R₀,turpinCoan t default πBoolsolves multivalued Byzantine agreement over any[DecidableEq V]inR₀ + 2rounds for all3 * t < Fintype.card P(turpinCoan_solvesByzantineAgreement), sendingV-values in round 1 only (turpinCoan_valueMessagesSent_eq). Verified against the published IPL text (§§1–4, pp. 73–75inmanual/sources.md); inventory registration remains open under#7210pending an outside-fleet source check:- In round 1 (
r = 0), every process broadcasts its initial valueinput : Vand marks itselfperplexedif2 * #{j | heard j = input} ≤ n + t(the exact integer-multiplied form of#{j | heard j ≠ input} ≥ (n - t) / 2in[TurpinCoan1984], §2, p. 74). - In round 2 (
r = 1), every process broadcasts its 1-bitperplexed : Boolflag, setsalert := decide (n - 2 * t ≤ #{j | perp j = true}), records ascandidatethe unique value vouched for by more thantnon-perplexed senders (uniqueAboveOn ... (t + 1)), and initializesπBoolonalert. - Rounds
3throughR₀ + 2runπBool; processes decidedefaultwhenπBooloutputstrueandcandidatewhenπBooloutputsfalse.
- In round 1 (
Model and threshold notes #
- Value-domain wrapper (
MultivaluedProtocol):Cslib.Distributed.Byzantine.Protocolfixes input and output values toBool.MultivaluedProtocol P State Msg Valgeneralizes only the input/output type toValwith identical synchronous execution semantics, bridges losslessly toProtocolatVal = Bool(MultivaluedProtocol.toProtocol), and inherits the2 ≤ n ≤ 3timpossibility bound (MultivaluedProtocol.not_solvesByzantineAgreement) for[Nontrivial Val]. - Exact threshold and self-message conventions:
phaseKingusesn - 2 * tfor the king's proposal threshold andn - tfor the overwhelming-majority lock (uniqueAboveOnreturnsnoneif multiple values tie above threshold, which cannot occur when4 * t < n). InturpinCoan,2 * count(input) ≤ n + texpresses[TurpinCoan1984]§2's rational thresholdcount(other) ≥ (n - t) / 2without division, self-messages inMultivaluedProtocolfill localv(j)andp(j)slots for correct processes (soturpinCoan_valueMessagesSent_eqcounts all(n - |F|) * nround-1 transmissions), andcandidateis evaluated uniformly viauniqueAboveOn {j | perp j = false} (t + 1) heardon both content and perplexed processes (matching §2–§3's majority vote whenalert = false; §4's optional 1-round2T + 5variant for biased binary protocols is not formalized).
Main definitions #
Cslib.Distributed.Byzantine.MultivaluedProtocol: synchronous deterministic protocol over an arbitrary value domainVal.Cslib.Distributed.Byzantine.MultivaluedProtocol.state,Cslib.Distributed.Byzantine.MultivaluedProtocol.decision: execution and decision against a faulty setF.Cslib.Distributed.Byzantine.MultivaluedProtocol.SolvesByzantineAgreement: agreement and validity overValagainst at mosttfaults afterRrounds.Cslib.Distributed.Byzantine.MultivaluedProtocol.toProtocol: conversion of aBool-valuedMultivaluedProtocoltoCslib.Distributed.Byzantine.Protocol.Cslib.Distributed.Byzantine.uniqueAboveOn: unique value on a finite domain meeting a multiplicity thresholdk.Cslib.Distributed.Byzantine.PhaseKingState: three-field local state ofphaseKing.Cslib.Distributed.Byzantine.phaseKing: 2-round-per-phase rotating-king protocol step toward#7210(Msg = V,4 * t < Fintype.card P).Cslib.Distributed.Byzantine.TurpinCoanMsg,Cslib.Distributed.Byzantine.TurpinCoanState: message sum and local state ofturpinCoan.Cslib.Distributed.Byzantine.turpinCoan:(R₀ + 2)-round multivalued-to-binary reduction step toward#7210(after[TurpinCoan1984], §§2–3).Cslib.Distributed.Byzantine.turpinCoanValueMessagesSent: count of value-bearing messages emitted by correct processes overRrounds ofturpinCoan.
Main results #
Cslib.Distributed.Byzantine.MultivaluedProtocol.not_solvesByzantineAgreement: no protocol over a nontrivial value domain toleratestfaults when2 ≤ Fintype.card P ≤ 3 * t.Cslib.Distributed.Byzantine.uniqueAboveOn_eq_some_iff,Cslib.Distributed.Byzantine.uniqueAboveOn_eq_some_iff_of_lt_two_mul: uniqueness and strict majority characterizations ofuniqueAboveOn.Cslib.Distributed.Byzantine.phaseKing_persists: unanimity among correct processes persists across every 2-round phase whenever2 * t < Fintype.card P.Cslib.Distributed.Byzantine.phaseKing_converges_of_notMem: a phase with a correct king brings all correct processes to the same estimate whenever4 * t < Fintype.card P.Cslib.Distributed.Byzantine.phaseKing_solvesByzantineAgreement: protocol-correctness step toward#7210showingphaseKingsolves multivalued Byzantine agreement inR ≥ 2 * (t + 1)rounds whenever4 * t < Fintype.card P.Cslib.Distributed.Byzantine.exists_polyMsg_solvesByzantineAgreement: single-value-message protocol existence step toward#7210for4 * t < Fintype.card PinR ≥ 2 * (t + 1)rounds.Cslib.Distributed.Byzantine.phaseKing_fails_four_one: 2-roundphaseKingfails onFin 4against1fault for every king schedule and round boundR.Cslib.Distributed.Byzantine.turpinCoan_solvesByzantineAgreement: reduction step toward#7210showingturpinCoansolves multivalued Byzantine agreement inR₀ + 2rounds for all3 * t < Fintype.card P.Cslib.Distributed.Byzantine.turpinCoan_valueMessagesSent_eq: acrossR + 1rounds ofturpinCoan, correct processes transmit(Fintype.card P - F.card) * Fintype.card Pvalue-bearing messages (round 1 only).
References #
- P. Berman, J. A. Garay, Asymptotically optimal distributed consensus (extended abstract)
- P. Berman, J. A. Garay, K. J. Perry, Towards optimal distributed consensus
- M. J. Fischer, N. A. Lynch, M. Merritt, Easy impossibility proofs for distributed consensus problems
- R. Turpin, B. A. Coan, Extending binary Byzantine agreement to multivalued Byzantine agreement
Multivalued synchronous protocols #
A deterministic synchronous message-passing protocol on the complete graph of processes P
with input and decision values in Val.
This is the value-parameterized counterpart of Cslib.Distributed.Byzantine.Protocol (which fixes
Val = Bool), sharing the same synchronous round execution against static Byzantine faults.
- init : P → Val → State
The initial state of a process with a given input value.
- send : ℕ → P → State → P → Msg
send r i s j: the message processiin statessends tojin roundr + 1. - update : ℕ → P → State → (P → Msg) → State
update r i s m: the state ofiafter roundr + 1, wherem jcame fromj. - output : P → State → Val
The decision of a process in a given state.
The state of process i after r rounds on inputs x when the processes in F are faulty
and a faulty j sends adv r j i to i in round r + 1.
The decision of process i after R rounds.
π solves multivalued Byzantine agreement over V against at most t faults in R rounds:
whenever at most t processes are faulty, all correct processes decide the same value after R
rounds, and they decide v whenever all correct processes have input v.
- agreement (F : Finset P) : F.card ≤ t → ∀ (adv : ℕ → P → P → M) (x : P → V), ∀ i ∉ F, ∀ j ∉ F, π.decision F adv x R i = π.decision F adv x R j
Agreement: all correct processes decide the same value.
- validity (F : Finset P) : F.card ≤ t → ∀ (adv : ℕ → P → P → M) (x : P → V) (v : V), (∀ i ∉ F, x i = v) → ∀ i ∉ F, π.decision F adv x R i = v
Validity: if all correct processes have input
v, they decidev.
Tolerating t faults implies tolerating at most t' ≤ t faults.
Reinterpret a Bool-valued MultivaluedProtocol as a
Cslib.Distributed.Byzantine.Protocol.
Execution states of π.toProtocol coincide with those of π.
Decisions of π.toProtocol coincide with those of π.
π.toProtocol solves binary Protocol.SolvesByzantineAgreement if and only if π solves
MultivaluedProtocol.SolvesByzantineAgreement.
Over any nontrivial value domain V, no deterministic synchronous protocol on
2 ≤ Fintype.card P ≤ 3 * t processes solves multivalued Byzantine agreement against t faults:
embedding two distinct values of V as Bool reduces to Protocol.not_solvesByzantineAgreement
(after Fischer, Lynch and Merritt, Theorem 1 and §3.1).
Unique threshold extraction #
Return some v when v is the unique value in dom.image f whose multiplicity on dom is
at least k, and none otherwise.
For 1 ≤ k, uniqueAboveOn dom k f = some v if and only if v appears at least k times on
dom and every value appearing at least k times on dom equals v.
When dom.card < 2 * k, at most one value can appear k times on dom, so
uniqueAboveOn dom k f = some v holds precisely when v has multiplicity at least k.
Two-round rotating-king protocol step (4 * t < n) #
Local state of a process in the 2-round-per-phase phaseKing protocol: its current estimate
est, the tie-break value kingProposal it would broadcast as phase king in the second round of
the current phase, and the overwhelming value (if any) seen with multiplicity at least n - t in
the first round of the current phase.
- est : V
Current decision estimate.
- kingProposal : V
Value proposed as phase king in round
2 * k + 1(multiplicity ≥ n - 2 * t, elseest). - overwhelming : Option V
Unique value received at least
n - ttimes in round2 * k, if any.
Two-round-per-phase rotating-king protocol step toward #7210 (after
Berman and Garay; primary-source locator verification and the 3-round-per-phase
3 * t < n extension of Berman, Garay and Perry remain open under #7210).
Runs t + 1 two-round phases indexed by kings : Fin (t + 1) ↪ P, with every point-to-point
message a single element of V:
- Round
2 * k(r % 2 = 0,r / 2 = k < t + 1): every process broadcastss.est, setskingProposalto the unique value of multiplicity≥ n - 2 * t(defaulting tos.est), and setsoverwhelmingto the unique value of multiplicity≥ n - t(if any). - Round
2 * k + 1(r % 2 = 1,r / 2 = k < t + 1):kings ⟨k, hk⟩broadcastss.kingProposal(other processes sends.est), and every process setsesttos.overwhelming.getD (m (kings ⟨k, hk⟩)). - Rounds
≥ 2 * (t + 1): local states freeze.
Unanimity persistence for phaseKing: across any phase k < t + 1 (even when
kings ⟨k, hk⟩ ∈ F equivocates arbitrarily), if F.card ≤ t, 2 * t < Fintype.card P, and all
correct processes enter phase k with est = v, then all correct processes finish phase k with
est = v.
Honest-king convergence for phaseKing: if F.card ≤ t, 4 * t < Fintype.card P, and the
king kings k of phase k is correct (kings k ∉ F), then all correct processes end phase k
with the same estimate (namely kings k's kingProposal from round 2 * k).
phaseKing freezes local states once all t + 1 two-round phases have completed
(2 * (t + 1) ≤ R).
Protocol-correctness step toward #7210 (after Berman and Garay;
primary-source check, inventory registration, and the 3-round-per-phase 3 * t < n extension of
Berman, Garay and Perry remain open under #7210): whenever
4 * t < Fintype.card P and 2 * (t + 1) ≤ R, phaseKing t kings solves multivalued Byzantine
agreement against at most t faults in R rounds with single-value messages (Msg = V).
Single-value-message existence step toward #7210 (after Berman and Garay;
primary-source check and the 3-round-per-phase 3 * t < n extension of
Berman, Garay and Perry remain open under #7210): whenever
4 * t < Fintype.card P and 2 * (t + 1) ≤ R, there exists a synchronous protocol over V with
constant-field local state PhaseKingState V and message alphabet V itself
(2 * (t + 1) * (|P| - |F|) * |P| honest point-to-point transmissions across the 2 * (t + 1)
active rounds) solving t-resilient Byzantine agreement in R rounds.
Sharpness of 4 * t < n for two-round phaseKing: on Fin 4 with t = 1 (4 * t = n,
contrasting with om1 and om, which succeed on Fin 4 using 2-round relay vectors/trees),
phaseKing 1 kings fails to solve 1-fault Byzantine agreement for every king schedule
kings : Fin 2 ↪ Fin 4 and every round bound R.
In phase 0, faulty kings 1 creates a 2-versus-2 tie (multiplicity = n - 2 * t = 2) at the
honest king kings 0 while giving another honest process p multiplicity n - t = 3 for the
opposite bit; in phase 1, kings 1 is the phase king and equivocates to split kings 0 and p.
Multivalued-to-binary reduction step (3 * t < n) #
Messages sent by turpinCoan: an initial domain value val in round 1, a 1-bit perplexed
flag in round 2, and messages bin of the underlying binary protocol in rounds 3 onward.
- val {V : Type u_1} {MBool : Type u_2} (v : V) : TurpinCoanMsg V MBool
Round 1: broadcast of the process's initial value in
V. - perplexed {V : Type u_1} {MBool : Type u_2} (b : Bool) : TurpinCoanMsg V MBool
Round 2: 1-bit flag indicating whether the sender was perplexed after round 1.
- bin {V : Type u_1} {MBool : Type u_2} (m : MBool) : TurpinCoanMsg V MBool
Rounds
≥ 3: message of the underlying binary Byzantine agreement protocol.
Whether a TurpinCoanMsg carries an element of the value domain V.
Local state of a process in turpinCoan.
- input : V
The process's initial input value.
- heard : P → V
heard j: the value received fromjin round 1. - perplexed : Bool
Whether this process was perplexed after round 1 (
2 * count(input) ≤ n + t). - candidate : V
Candidate value endorsed by more than
tnon-perplexed senders after round 2. - binState : SBool
Local state of the underlying binary protocol from round 3 onward.
Two-round multivalued-to-binary preprocessing step toward #7210 (after
Turpin and Coan, §2, p. 74; inventory registration remains open under #7210
pending an outside-fleet source check).
Transforms any binary Byzantine agreement protocol πBool : Protocol P SBool MBool into a
multivalued protocol over V with fallback default : V in two preprocessing rounds:
- Round 1 (
r = 0): broadcasts.input; becomeperplexediff2 * #{j | heard j = s.input} ≤ Fintype.card P + t. - Round 2 (
r = 1): broadcasts.perplexed; setalert := decide (n - 2 * t ≤ #{j | perp j}), computecandidateas the unique value seen in round 1 from at leastt + 1senders reportingperp j = false(defaulting todefault), and initializeπBoolwithalert. - Rounds
r + 2(r ≥ 0): run roundr + 1ofπBool; decidedefaultifπBooldecidestrue(alert) ands.candidateotherwise.
Total number of V-carrying (TurpinCoanMsg.isVal) point-to-point messages sent by correct
processes (univ \ F) across the first R rounds of turpinCoan.
Across R + 1 rounds of turpinCoan, correct processes transmit V-values in round 1 only,
for an exact total of (Fintype.card P - F.card) * Fintype.card P value-bearing messages
(independent of R, t, and the adversary adv).
Multivalued-to-binary reduction step toward #7210 (after
Turpin and Coan, §§2–3, pp. 74–75; inventory registration remains open under
#7210 pending an outside-fleet source check): if 3 * t < Fintype.card P and
πBool : Protocol P SBool MBool solves binary Byzantine agreement against t faults in R₀
rounds, then turpinCoan t default πBool solves multivalued Byzantine agreement over V against
t faults in R₀ + 2 rounds.