the byzantine generals problem
play

The Byzantine Generals Problem Zixin Chi Julian Angeles Motivation - PowerPoint PPT Presentation

The Byzantine Generals Problem Zixin Chi Julian Angeles Motivation A reliable system must be fault-tolerant. having some degree of redundancy. Consensus protocol. How can we reach consensus? What is the problem? First proposed by


  1. The Byzantine Generals Problem Zixin Chi Julian Angeles

  2. Motivation A reliable system must be fault-tolerant. having some degree of redundancy. Consensus protocol. How can we reach consensus?

  3. What is the problem? ● First proposed by Lamport, et al in 1982 Loyal generals vs Traitors. ● ● Attack? Retreat? ● Reach consensus among “loyal 1 generals”given f “traitors” 9 2 8 3 7 4 6 5

  4. Requirements of the Algorithm All loyal generals decide upon the ● same plan. 1 ● Small number of traitors cannot cause loyal generals to adopt bad plan. 9 2 8 3 7 4 6 5

  5. v(i) represents the Reach an Agreement message the i th general sends 1 9 2 Restate the conditions 8 3 1) Every loyal general must obtain same v(1)..v(n) 1’) Any two loyal generals use same value of v(i) 7 4 2) If ith general is loyal, then the value he sends must be used by every other general as v(i) 6 5 Reduce to the final conditions IC 1. All loyal lieutenants obey the same order IC 2. If the commanding general is loyal, then every loyal lieutenant obeys the order the general sends Interactive Consistency conditions

  6. Impossibility results For oral message communication, traitors must be less than ⅓. Commander Commander Attack Attack Attack Retreat Attack!? ATTACK! He said retreat He said retreat Lieutenant A Lieutenant B Lieutenant A Lieutenant B

  7. Impossibility results For oral message communication, traitors must be less than ⅓. Commander Commander Retreat Retreat Attack Retreat Retreat! Retreat!? He said attack He said attack Lieutenant A Lieutenant B Lieutenant A Lieutenant B

  8. Impossibility results For oral message communication, traitors must be less than ⅓. Commander Attack Retreat Retreat! ATTACK! He said attack Lieutenant A Lieutenant B

  9. A solution with oral messages Assumptions of oral messages A1. Every message that is sent is delivered correctly. What if it’s not? A2. The receiver of a message knows who sends it. Gets nullified later in Sighed Messages A3. The absence of a message can be detected.

  10. A solution with oral messages OM(m) : Oral Message algorithms when coping with m traitors (m >= 0) No traitor OM(0) (1) The commander sends his value. (2) Each lieutenant follows the value he received OM(m), m > O. (1) The commander sends his value to every lieutenant. (2) every lieutenant act as command to send his value by conducting a OM(m-1) (3) Majority Voting Default value is Retreat

  11. Lieutenant is a Traitor One traitor, four total(m = 1, N = 4) A A OM(1) A R OM(0) L3 L1 L2 L1 = m (A, A, R); L2 = m (A, A, R); Both attack!

  12. Commander is a Traitor One traitor, four total(m = 1, N = 4) C1 A R A OM(1) L1 L2 L3 OM(0) L2 L3 L1 L1=m(A, R, A); L2=m(A, R, A); L3=m(A,R,A); Attack!

  13. Both are Traitors (bigger army) Two traitors, seven total(m= 2, N = 7) All loyal lieutenants cannot reach agreement

  14. Both are Traitors (bigger army) Two traitor, seventotal(M = 2, N = 7) Verify that lieutenants tell each other the same thing •Requires rounds = m+1 What messages does L1 receive in this example? •OM(2): A •OM(1): 2R, 3A, 4R, 5A, 6A (doesn’t know 6 is traitor) •OM(0): 2{ 3A, 4R, 5A, 6R} 3{2R, 4R, 5A, 6A} 4{2R, 3A, 5A, 6R} 5{2R, 3A, 4R, 6A} 6{ total confusion } L6 is lying! m(A,R,A,R,A,-) ==> Attack!

  15. Good Enough? Why so difficult? Traitor’s ability to Lie

  16. No More Lying! Include OM assumptions A4 ● A loyal general's signature cannot be forged, and any alteration of the contents of his signed messages can be detected. ● Anyone can verify the authenticity of a general's signature.

  17. Signed Messages Algorithm - SM(m) Each Lieutenant has a set of orders V ● Generals send signed order ● Lieutenant receives an order Commander ● Verifies authenticity & puts in V Attack : C Attack : C ● If m < distinct signatures, sign message Attack : C : A ● Sends to Lieutenants that haven’t seen Attack : C : B When no new messages, use choice(V) ● Lieutenant A Lieutenant B to decide action V = { } Attack V = { } Attack

  18. SM(1) - Traitor Lieutenant Commander Lieutenant B ignores the Retreat : C Retreat : C traitor’s message Satisfies IC1 & IC2!! Attack: C : A Lieutenant A Lieutenant B Retreat : C : B V = { } Retreat

  19. SM(1) - Traitor General Commander Both Loyal Lieutenants get Attack: C Retreat : C same set V of orders Satisfies IC1!! Attack : C : A Lieutenant A Lieutenant B Retreat : C : B V = { } Attack, Retreat V = { } Attack , Retreat

  20. Can We Do Better? Commander Lieutenant A Lieutenant B Lieutenant C

  21. What if... Commander Near, far, wherever you are... Lieutenant A Lieutenant B Lieutenant C

  22. A p-regular graph? Every node has the same amount of neighbors A B Every node’s neighbors has a path to some other node, where they share no common node other than the endpoint p is the amount of neighbors per node D C 2-regular graph

  23. p-graph Examples

  24. Extending Oral Messages for Missing Paths Commander sends message to neighbors only Lieutenants send messages to each other via paths that don’t include the Commander Solves for p >= 3m

  25. Solved But There’s a Catch? FULLY CONNECTED! C C A D A D B B BOTTLENECK

  26. Signed Messages for Missing Paths Solves if subgraph of loyal generals is connected WORKS FOR NON C P-GRAPHS TOO! A D B

  27. In Terms of Computing Systems IC1. All non-faulty processors must use the same input value (so they produce the same output) IC2. If the input unit is non-faulty, then all non-faulty processes use the value it provides as input (so they produce the correct output).

  28. Computing Systems - Assumption 1 Every message sent by a non-faulty processor is delivered correctly

  29. Computing Systems - Assumption 2 Any processor can determine the originator of any message that it received.

  30. Computing Systems - Assumption 3 Absence of a message can be detected

  31. Computing Systems - Assumption 4 Processors must be able to sign their messages in such a way that a non-faulty processor's signature cannot be forged.

  32. Conclusion ● Consensus w/o trust is hard ● Reasonable solutions (Expensive & Complex) ● Practical Application - Reliability vs Performance

  33. Q&A

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend