byzantine fault tolerance
play

Byzantine Fault Tolerance Consensus Strikes Back Announcements Lab - PowerPoint PPT Presentation

Byzantine Fault Tolerance Consensus Strikes Back Announcements Lab 2 Lab 2 Hopefully everyone has started by now, maybe even finished large portions. Lab 2 Hopefully everyone has started by now, maybe even finished large portions.


  1. Sending to Everyone is Insu ffi cient 0 0 1 thinks slot 4 1 thinks slot 4 is c1 is c0 Success 1 2 3 4 Slot 4 is c0 Success

  2. Sending to Everyone is Not Su ffi cient • Faulty node can send differing messages to "everyone".

  3. Sending to Everyone is Not Su ffi cient • Faulty node can send differing messages to "everyone". • Run some protocol to detect this problem.

  4. Sending to Everyone 0 0 0->1: AppendEntries(..., [(c1, index=4)]) 0->1: AppendEntries(..., [(c0, index=4)]) 1 2 3 4 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c0, 4 0 0->1: c1, 4 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4

  5. Sending to Everyone 0 0 1 2 3 4 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c0, 4 0 0->1: c1, 4 1 1 1 1 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 2 2 2 2 3 3 3 3 4 4 4 4

  6. Sending to Everyone 0 0 1 2 3 4 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c0, 4 0 0->1: c1, 4 1 1 1 1 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 2 2 2 2 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 3 3 3 3 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 4 4 4 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4

  7. Sending to Everyone 0 0 Choose majority, 1 2 3 4 breaking ties deterministically. 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c0, 4 0 0->1: c1, 4 1 1 1 1 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 2 2 2 2 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 3 3 3 3 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 4 4 4 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4

  8. Sending to Everyone 0 1 2 2 3 4 0 0->1: c0, 4 0 0->1: c0, 4 0 0->1: c0, 4 0 0->1: c0, 4 1 1 1 1 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 2 2 2 2 ??? ??? ??? 3 3 3 3 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 4 4 4 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4

  9. Sending to Everyone 0 Choose majority, 1 2 2 3 4 breaking ties deterministically. 0 0->1: c0, 4 0 0->1: c0, 4 0 0->1: c0, 4 0 0->1: c0, 4 1 1 1 1 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 2 2 2 2 ??? ??? ??? 3 3 3 3 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 4 4 4 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4

  10. Not Possible for 1 failure with 3 participants 0 0 0->1: x=1 0->1: x=1 0->1: x=1 0->1: x=2 2 1 1 2

  11. Not Possible for 1 failure with 3 participants 0 0 0->1: x=2 0->1: x=2 2 1 1 2 0->1: x=1 0->1: x=1

  12. Not Possible for 1 failure with 3 participants 0 0 0->1: x=2 0->1: x=2 2 1 1 2 0->1: x=1 0->1: x=1 Cannot distinguish between these two cases. Cannot meet the two requirements state at the beginning.

  13. Limitations • More generally cannot solve for m failures with < 3m+1 participants.

  14. Limitations • More generally cannot solve for m failures with < 3m+1 participants. • Proof by reduction to the case with 3.

  15. Sending to Everyone 0 0 1 2 3 4 5 6 0 0->1: c0, 4 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c1, 4 1 1 1 1 1 1 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 2 2 2 2 2 2 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 3 3 3 3 3 3 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 4 4 4 4 4 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 5 5 5 5 5 0->1: c1, 4 0->1: c1, 4 5 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 6 6 6 6 6 0->1: c0, 4 0->1: c0, 4 6 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 • However, note that doing this once is not sufficient for more than 1 faults.

  16. Sending to Everyone 0 0 1 2 2 3 4 5 6 0 0->1: c0, 4 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c0, 4 0 0->1: c1, 4 0 0->1: c1, 4 1 1 1 1 1 1 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 2 2 2 2 2 2 ??? ??? ??? ??? ??? 3 3 3 3 3 3 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 4 4 4 4 4 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 5 5 5 5 5 0->1: c1, 4 0->1: c1, 4 5 0->1: c1, 4 0->1: c1, 4 0->1: c1, 4 6 6 6 6 6 0->1: c0, 4 0->1: c0, 4 6 0->1: c0, 4 0->1: c0, 4 0->1: c0, 4 • However, note that doing this once is not sufficient for more than 1 faults. • For example, can force any decision in this case.

  17. Solution: Recursively call again.

  18. When are Messages Correct? • Every correct node receives the same messages (and acts correctly). • Every message is "consistent" with the protocol.

  19. Proving Consistency with the Protocol

  20. What Does this Even Mean? 0 AppendEntries(..., [(index=4)]) 1 2 3 4

  21. What Does this Even Mean? 0 Success 1 2 3 4

  22. What Does this Even Mean? 0 AppendEntries(..., [], leaderCommit = 4), Proof that a majority have accepted entires until 4. 1 2 3 4

  23. Problem • How to generate proofs?

  24. Problem • How to generate proofs? • Many possibilities, but just going to include messages here.

Recommend


More recommend