Synchronous Byzantine agreement #
Deterministic synchronous message passing on the complete graph of processes P, in the presence
of Byzantine faults, following the model of Fischer, Lynch and Merritt
(§2) for the problem of Pease, Shostak and Lamport.
A Protocol P State Msg gives every process an initial state from its input bit, and in every
round a message to every process, a new state computed from the messages received, and a Boolean
decision. Every process may run different code, since all fields take the process as an argument.
The processes in a set F are faulty: in round r + 1 a faulty process j sends adv r j i to
i, arbitrarily and possibly differently to different recipients. Protocol.state and
Protocol.decision give the resulting run. Since runs are deterministic, quantifying over a fixed
table adv loses nothing against adaptive (even rushing) adversaries: the messages an adaptive
adversary sends in the run on a given input form such a table. Protocol.adaptiveState_eq_state
checks this for a rushing adversary that sees the global state before choosing its messages.
Protocol.SolvesByzantineAgreement t R asks that, whenever at most t processes are faulty, the
correct processes' decisions after R rounds satisfy
- agreement: all correct processes decide the same value, and
- validity: if all correct processes have input
v, they decidev.
Termination is built in: decisions are read off after round R. A protocol that decides earlier
can keep its state unchanged in later rounds. Protocols whose decision round depends on the run
are not covered. For finite P and Msg this loses nothing, since by König's lemma such a
protocol decides within a bound uniform over all runs, but for infinite Msg a fixed R is
strictly narrower than eventual decision.
Protocol.coverState runs the protocol on a covering network, in which every node runs the code
of some process and receives the message of process j from a designated neighbour. The covering
lemma Protocol.state_eq_coverState says that a Byzantine run coincides on the correct processes
with a covering network whenever the faulty processes replay what the network shows them. It
packages the Locality and Fault axioms of Fischer, Lynch and Merritt, proved here for this model,
and is the engine of the impossibility proofs in
CslibFrontier.Computability.Distributed.Byzantine.NodeBound.
Main definitions #
Cslib.Distributed.Byzantine.Protocol: synchronous deterministic protocols.Cslib.Distributed.Byzantine.Protocol.state,Protocol.decision: runs with Byzantine faults.Cslib.Distributed.Byzantine.Protocol.adaptiveState: runs against a rushing adversary.Cslib.Distributed.Byzantine.Protocol.SolvesByzantineAgreement: agreement and validity against at mosttByzantine faults afterRrounds.Cslib.Distributed.Byzantine.Protocol.ownInput: decide the own input, without communication.Cslib.Distributed.Byzantine.Protocol.coverState: runs on covering networks.
Main results #
Cslib.Distributed.Byzantine.Protocol.adaptiveState_eq_state: a rushing adversary is no stronger than a fixed message table.Cslib.Distributed.Byzantine.Protocol.SolvesByzantineAgreement.adaptive: agreement and validity hold against rushing adversaries.Cslib.Distributed.Byzantine.Protocol.SolvesByzantineAgreement.mono: toleratingtfaults implies tolerating fewer.Cslib.Distributed.Byzantine.Protocol.solvesByzantineAgreement_ownInput: a single process solves Byzantine agreement against any number of faults.Cslib.Distributed.Byzantine.Protocol.state_eq_coverState: the covering lemma.
References #
A deterministic synchronous message-passing protocol on the complete graph of processes P.
Process i with input bit b starts in state init i b. In round r + 1 it sends
send r i s j to every process j (itself included) and then moves to update r i s m, where
s is its state and m j the message it received from j. Its decision in state s is
output i s.
- init : P → Bool → State
The initial state of a process with a given input bit.
- 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 → Bool
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. A faulty process's own state
evolves by the protocol, but nobody sees it: only its messages matter.
π solves Byzantine agreement against at most t faults in R rounds: whenever at most
t processes are faulty, whatever they send, the correct processes agree after R rounds, and
they decide v when all of them have input v
Fischer, Lynch and Merritt, §3.
- agreement (F : Finset P) : F.card ≤ t → ∀ (adv : ℕ → P → P → M) (x : P → Bool), ∀ 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 → Bool) (v : Bool), (∀ 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.
The state of process i after r rounds against a rushing adversary: in round r + 1 a
faulty j sends strat r σ j i to i, where σ is the global state after r rounds, which
determines the messages of the correct processes in round r + 1.
A rushing adversary is no stronger than a fixed table: the run against strat is the run
against the table of the messages that strat sends in it.
Agreement and validity hold against rushing adversaries as well.
On at most one process, deciding the own input solves Byzantine agreement against any number
of faults, with any decision round R.
The state of node a of a covering network after r rounds. Node a runs the code of
process label a on input input a, and receives the message of process j from node
nbr a j, which sends it as j would. In the covering networks of interest
label (nbr a j) = j, but the definition does not need this.
The covering lemma. Suppose that the correct processes embed into a covering network by
e, preserving their code, their inputs and their mutual wiring, and that every faulty process
j sends to a correct i what the neighbour of e i standing for j sends. Then every correct
process i is in the same state as node e i after every round. This is the content of the
Locality and Fault axioms of Fischer, Lynch and Merritt, §2 in this
model.