Professional Documents
Culture Documents
Agreement
Problem
N (N ¸ 2) processes
Each process starts with an initial value {0,1}
that is modeled as the input register x
Making a decision is modeled by writing to
the output register y
Output registers are write once
Assumptions
Initial independence
Processes can choose their input independently
Commute property :
If events e and f are
on different processes
they commute
Assumptions (contd.)
Asynchrony of events:
Any receive event can be arbitrarily delayed
Every message is eventually delivered
If e is a receive event
and e is enabled at G then
se is also enabled at G
Requirements
Agreement
Two non-faulty processes cannot commit on
different values
Non-triviality
Both 0 and 1 should be possible outcomes
Termination
A non-faulty process terminates in finite time
Informal proof of the impossibility result
We show that :
There is an initial global state in which the system
is non-decisive
There exists a way to keep the system non-
decisive
Indecision
Lat G.V be the set of decision values reachable from
a global state G
Since a non-faulty process terminates, G.V is non-
empty
G is :
Bivalent: G.V = { 0 ,1 } – indecisive
0-Valent: G.V = { 0 } – always leads to deciding 0
1-Valent: G.V = { 1 } – always leads to deciding 1
We show that there exists a bivalent initial state
Claim: Every consensus protocol has a
bivalent initial state
Assume claim is false
Non-triviality : The initial set of global states must
contain 0-valent and 1-valent states
Adjacent global states: If they differ in the state of
exactly one process
There must be adjacent 0-valent and 1-valent states
which differ in the state of, say, p
Apply a sequence where p does not take any steps
Contradiction
Claim: There exists a method to keep the
system indecisive
Event e (on process p) is applicable to G
G is the set of global states reachable from
G without applying e
H = e(G )
Requirements :
Agreement: Non faulty processes cannot decide
on different values
Validity: If all processes propose the same value,
v, then the decided value should be v
Termination: A non-faulty process decides in a
finite time
Algorithm
f denotes the maximum number of failures
Each process maintains V the set of values
proposed by other processes (initially it
contains only its own value)
In every round a process:
Sends to all other processes the values from V
that it has not sent before
After f+1 rounds each process decides on the
minimum value in V
Algorithm
Proof: Agreement
Message complexity:
O((f+1)N2)
If each value needs b bits then the total bits
communicated per round is O(bN3)
Time:
Needs f+1 rounds
Consensus under Byzantine faults
Story:
N Byzantine generals out to repel an attack by a
Turkish Sultan
Each general has a preference – attack or retreat
Coordinated attack or retreat by loyal generals
necessary for victory
Treacherous Byzantine generals could conspire
together and send conflicting messages to
mislead loyal generals
Byzantine General Agreement
(BGA)
Reliable messages
Possible to show that no protocol can tolerate
f failures if N · 3f
kingvalue = myvalue
Knowledge
Everyone knows b: