CS6410 – Byzantine Agreement
Kai Sun
*Some slides are borrowed from Ken Birman, Andrea C. Arpaci- Dusseau, Eleanor Birrell, Zhiyuan Teo, and Indranil Gupta
CS6410 Byzantine Agreement Kai Sun *Some slides are borrowed from - - PowerPoint PPT Presentation
CS6410 Byzantine Agreement Kai Sun *Some slides are borrowed from Ken Birman, Andrea C. Arpaci- Dusseau, Eleanor Birrell, Zhiyuan Teo, and Indranil Gupta So Far Weve Talked About State machine replication Paxos So Far Weve
Kai Sun
*Some slides are borrowed from Ken Birman, Andrea C. Arpaci- Dusseau, Eleanor Birrell, Zhiyuan Teo, and Indranil Gupta
“I have long felt that, because it was posed as a cute problem about philosophers seated around a table, Dijkstra's dining philosopher's problem received much more attention than it deserves. …” *
Leslie Lamport
*http://research.microsoft.com/en-us/um/people/lamport/pubs/pubs.html
Attack!
Curses! I’m surrounded!
supposed to tolerate
What should lieutenant 1 (L1) do? Is commander or lieutenant 2 (L2) the traitor? commander attack retreat L1 L2
retreat commander attack L1 L2 attack What must L1 do? By IC2: L1 must obey commander and attack
commander attack retreat L1 L2 retreat What must L1 do? By IC1: L1 and L2 must obey same order --> L1 must retreat
commander attack retreat L1 L2 retreat Problem: L1 can’t distinguish between 2 scenarios retreat commander attack L1 L2 attack
value RETREAT if he receives no value
if he receives no value)
step (or RETREAT if he received no such value).
C L1 L3 L2 A A A Round 0 Round 1 C L1 L3 L2 A A R R Decision L1 = majority(A, A, R); L2 = majority(A, A, R); Both attack! A A A A A
C L1 L3 L2 A R A Round 0 Round 1 L1 L3 L2 A R A A Decision L1=majority(A, R, A); L2=majority(A, R, A); L3=majority(A,R,A); Attack! R A C A R A
C A A A L2 L6 L3 L5 L4 L1 A A A L2 L6 L3 L5 L4 L1 A A A A R R Decision? Messages? majority(A,A,A,A,R,R) ==> All loyal lieutenants attack!
C L2 L6 L3 L5 L4 L1 R A R A A x A,R,A,R,A A R R A A Decision? L2 L6 L3 L5 L4 L1 Messages?
Round 0: A Round 1: 2R, 3A, 4R, 5A, 6A (doesn’t know 6 is traitor) Round 2: 2 { 3A, 4R, 5A, 6R} 3 {2R, 4R, 5A, 6A} 4 {2R, 3A, 5A, 6R} 5 {2R, 3A, 4R, 6A} 6 { ?, ?, ?, ? }
C L2 L6 L3 L5 L4 L1 R A R A A x A,R,A,R,A A R R A A L2 L6 L3 L5 L4 L1 Messages?
invokes (n-1) OM(m-1).
(note: m = number of failures)
nodes, using SM(m)
1. Initially 𝑊
𝑗 = ∅
2. Commander signs 𝑤 and sends to all as (𝑤:0) 3. Each Li. 𝑗: A) If receive (𝑤:0) and no other order 1) 𝑊
𝑗 = {𝑤}
2) Send (𝑤:0:𝑗) to all B) If receive (𝑤:0:𝑘1:...:𝑘𝑙) and 𝑤 not in 𝑊
𝑗
1) Add 𝑤 to 𝑊
𝑗
2) If (𝑙<m) send (𝑤:0:𝑘1:...:𝑘𝑙:𝑗) to all not in 𝑘1…𝑘𝑙
𝑗)
C L1 L2 A:0 R:0 What next? L1 L2 A:0:L1 R:0:L2 𝑊
1={A,R} 𝑊 2={R,A}
Both apply same decision to {A,R}
C L1 L3 L2 A:0 A:0 x Goal? L1 and L2 must make same decision L1 L3 L2 A:0:L1 A:0:L2 A:0:L3 R:0:L3 L1 L2 R:0:L3:L1 𝑊
1 = 𝑊 2 = {A,R} ==> Same decision
m = traitors n = total Synchronous Asynchronous
Oral messages: fails if n <= 3m m >=1 * works if n >= 3m+1 no guarantee Signed messages: fails if won’t fail unless no correct processes m >= 1 * works if n >= 1 no guarantee
*Fischer, Michael J., Nancy A. Lynch, and Michael S. Paterson. "Impossibility of distributed consensus with one faulty process." Journal of the ACM (JACM) 32.2 (1985): 374-382.
source to a destination node are a behavior of the device on that edge
with respect to different participants
inputs it starts with and that it receives on incoming edges
At the receiving end of an edge from it, the receiver can’t distinguish the faulty device from the device it mimics.
be solved; for 3 processes the system looks like this:
B C A
attached to two others by edges
B C A C0 C1 A1 B0 B1 A0
C0 C1 A1 B0 B1 A0 B0 C0 F
done on the edge (A,B) and what A1 would have done on the edge (A,C)
C0 C1 A1 B0 B1 A0 F C0 A1
C0 C1 A1 B0 B1 A0 B1 F A1
different values
and at most 1/3 of the nodes in each group
in our 3-node case, and similarly for B and C