Lec 10 AgreementProtocols
Lec 10 AgreementProtocols
Lec 10 AgreementProtocols
Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur
Classification of Faults
Based on components that failed
Program / process Processor / machine Link Storage Clock
Classification of Tolerance
Types of tolerance:
Masking system always behaves as per specifications even in presence of faults Non-masking system may violate specifications in presence of faults. Should at least behave in a well-defined manner
Core problems
Agreement (multiple processes agree on some value) Clock synchronization Stable storage (data accessible after crash) Reliable communication (point-to-point, broadcast, multicast) Atomic
q1
q2
qf
qf+1
pj pi
Byzantine Agreement
Variants
Consensus Each process broadcasts its initial value
Satisfy agreement condition If initial value of all non-faulty processes is v, then the agreed upon value must be v
All non-faulty processes agree on a common vector (v1,v2,,vn) If the kth process is non-faulty, then the kth value in the vector agreed upon by non-faultyprocesses must be vk
Lower Bound:
Needs at least (m+1) rounds of message exchanges
Oral messages messages can be forged / changed in any manner, but the receiver always knows the sender
Proof
Theorem: There is no t-Byzantine-robust broadcast protocol for t N/3
S
0 0 0 0 1 0 1 1
S S
1 0 1 1
U U
T T
U U
S S
0 0 1 0 1 1
T
Dept. of CSE, IIT KGP
U U U
Scenario-2: -- similar to Scenario-0 for T -- similar to Scenario-1 for U -- T decides 0 and U decides 1
Lamport-Shostak-Pease Algorithm
Algorithm Broadcast( N, t ) where t is the resilience For t = 0, Broadcast( N, 0 ):
Pulse 1
The general sends value, xg to all processes, the lieutenants do not send. Receive messages of pulse 1. The general decides on xg. Lieutenants decide as follows: if a message value, x was received from g in pulse-1 then decide on x else decide on udef
Features
Termination: If Broadcast( N, t ) is started in pulse 1, every process decides in pulse t + 1 Dependence: If the general is correct, if there are f faulty processes, and if N > 2f + t, then all correct processes decide on the input of the general Agreement: All correct processes decide on the same value The Broadcast( N, t ) protocol is a t-Byzantine-robust broadcast protocol for t < N/3 Time complexity: O( t + 1 )
Dept. of CSE, IIT KGP
Message complexity: O( Nt )