flp impossibility of consensus
play

FLP Impossibility of Consensus Yan Ji Oct 26, 2017 Slides - PowerPoint PPT Presentation

FLP Impossibility of Consensus Yan Ji Oct 26, 2017 Slides inspired by Lorenzo Alvisi (CS5414 FA16) slides and Philip Daian (CS6410 FA16) slides I think you ought to know I'm feeling very depressed. I think you ought to know I'm feeling


  1. Model It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. p 1 0/1, b/0/1 ... Step: C’= e(C) = (s’, M’) ● (p i , m) p i M 0/1, b/0/1 ... p 1 p 1 p k 0/1, b/0/1 C = (s, M) 0/1, b/0/1 C = (s, M) 0/1, b/0/1 . . s . . . . M M p k p k 0/1, b/0/1 0/1, b/0/1 s s

  2. Model It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. p 1 0/1, b/0/1 ... Step: C’= e(C) = (s’, M’) ● (p i , m) p i M 0/1, b/0/1 ... p 1 p 1 p k 0/1, b/0/1 C = (s, M) 0/1, b/0/1 C = (s, M) 0/1, b/0/1 . ... s . (p i , m) p i 0/1, b M . M ... (p i , m) p k p k 0/1, b/0/1 0/1, b/0/1 s s

  3. Model It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. p 1 0/1, b/0/1 ... Step: C’= e(C) = (s’, M’) ● (p i , m) p i M 0/1, b/0/1 ... p 1 p 1 p k 0/1, b/0/1 C = (s, M) 0/1, b/0/1 C = (s, M) 0/1, b/0/1 . ... s . p’ i 0/1, b 0 M . M ... (p i , m) p k p k 0/1, b/0/1 0/1, b/0/1 s s’

  4. Model It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. p 1 0/1, b/0/1 ... Step: C’= e(C) = (s’, M’) ● (p i , m) p i M 0/1, b/0/1 ... p 1 p 1 p k 0/1, b/0/1 C = (s, M) 0/1, b/0/1 C = (s, M) 0/1, b/0/1 . ... s . send p’ i 0/1, b 0 M . M ... (p i , m) p k p k 0/1, b/0/1 0/1, b/0/1 s s’

  5. Model It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. p 1 0/1, b/0/1 ... Step: C’= e(C) = (s’, M’) ● (p i , m) p i M 0/1, b/0/1 ... p 1 p 1 p k 0/1, b/0/1 C = (s, M) 0/1, b/0/1 C’ = (s’, M’) 0/1, b/0/1 . ... s . p’ i 0/1, b 0 M’ . M ... (p i , m) p k p k 0/1, b/0/1 0/1, b/0/1 s s’

  6. Model It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. p 1 0/1, b/0/1 ... Step: C’= e(C) = (s’, M’) ● (p i , m) p i M 0/1, b/0/1 ... p 1 p 1 p k 0/1, b/0/1 C = (s, M) 0/1, b/0/1 C’ = (s’, M’) 0/1, b/0/1 . ... s . p’ i 0/1, b 0 M’ . M ... (p i , m) p k p k 0/1, b/0/1 0/1, b/0/1 s s’

  7. Proof It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. How to prove impossibility?

  8. Proof It is impossible to have a deterministic protocol that solves consensus in a message-passing asynchronous system in which at most one process may fail by crashing. How to prove impossibility? Assume to the contrary that there exists a consensus protocol P such that… How to define P?

  9. More terms A schedule S of P is a finite or infinite sequence of events (e 1 , e 2 , …, e k )of P, ● S(C) = e k (...(e 2 (e 1 (C)))...)

  10. More terms A schedule S of P is a finite or infinite sequence of events (e 1 , e 2 , …, e k )of P, ● S(C) = e k (...(e 2 (e 1 (C)))...) A run of P is a sequence of steps associating a schedule S, in other words, a ● run is a pair of a configuration C and a schedule S, written as (C, S)

  11. More terms A configuration C’ is reachable from a configuration C if there exist a ● schedule S such that C’ = S(C)

  12. More terms A configuration C’ is reachable from a configuration C if there exist a ● schedule S such that C’ = S(C) A configuration C ′ is accessible from an initial configuration C 0 if C’ is ● reachable from C 0

  13. More terms A configuration C’ is reachable from a configuration C if there exist a ● schedule S such that C’ = S(C) A configuration C ′ is accessible from an initial configuration C 0 if C’ is ● reachable from C 0 e 1 (p 1 , m 1 ) e 2 (p k , m 2 ) p’ 1 p 1 p’ 1 0/1, b 0/1, b C 0 = (s 0 , M 0 ) C 2 = (s 2 , M 2 ) C 1 = (s 1 , M 1 ) 0/1, b . . . . . . . . M 2 . M 0 M 1 p’ k p k p k 0/1, b 0 0/1, b 0/1, b s 2 s 0 s 1

  14. More terms A configuration C has decision value v if some process p is in a decision ● state with output=v, which is “write-once”/irreversible

  15. More terms A configuration C has decision value v if some process p is in a decision ● state with output=v, which is “write-once”/irreversible A run is a deciding run if some process reaches a decision state. ●

  16. More terms A configuration C has decision value v if some process p is in a decision ● state with output=v, which is “write-once”/irreversible A run is a deciding run if some process reaches a decision state. ● e 1 (p 1 , m 1 ) p 1 p’ 1 0/1, b C 0 = (s 0 , M 0 ) C 1 = (s 1 , M 1 ) 0/1, b . . . . . . M 0 M 1 p k p k 0/1, b 0/1, b s 0 s 1

  17. More terms A configuration C has decision value v if some process p is in a decision ● state with output=v, which is “write-once”/irreversible A run is a deciding run if some process reaches a decision state. ● e 1 (p 1 , m 1 ) e 2 (p k , m 2 ) p’ 1 p 1 p’ 1 0/1, b 0/1, b C 0 = (s 0 , M 0 ) C 2 = (s 2 , M 2 ) C 1 = (s 1 , M 1 ) 0/1, b . . . . . . . . M 2 . M 0 M 1 p’ k p k p k 0/1, b 0 0/1, b 0/1, b s 2 s 0 s 1

  18. More terms A consensus protocol P is partially correct if: ● No accessible configuration has more than one decision value ○ (agreement) For each v in {0, 1}, some accessible configuration has decision ○ value v (validity) A run is admissible if every process, except possibly one (faulty ● process), takes infinitely many steps in S

  19. Assume to the contrary that there exists P such that P is partially correct ● Agreement + Validity ○

  20. Assume to the contrary that there exists P such that P is partially correct ● Agreement + Validity ○ Every admissible run of P is a deciding run ● Termination ○

  21. Assume to the contrary that there exists P such that P is partially correct ● Agreement + Validity ○ Every admissible run of P is a deciding run ● Termination ○ What kind of contradiction should possibly be like? ●

  22. Categories of configurations Univalent, or i-valent (i in {0, 1}) ● A configuration C is univalent or i-valent if some process has ○ decided i in C, or if all configurations accessible from C are i-valent

  23. Categories of configurations Univalent, or i-valent (i in {0, 1}) ● A configuration C is univalent or i-valent if some process has ○ decided i in C, or if all configurations accessible from C are i-valent ... S 1 p 1 0, b C = (s, M) . . S 2 ... Decide on 0 . M p k 0, b ... S 3 s

  24. Categories of configurations Univalent, or i-valent (i in {0, 1}) ● A configuration C is univalent or i-valent if some process has ○ decided i in C, or if all configurations accessible from C are i-valent ... S 1 p 1 1, b C = (s, M) . . S 2 ... Decide on 1 . M p k 1, b ... S 3 s

  25. Categories of configurations Bivalent ● A configuration C is bivalent if some of the configurations ○ accessible from it are 0-valent while others are 1-valent ... S 1 Decide on 0 p 1 0, b C = (s, M) . . S 2 ... Decide on 1 . M p k 1, b ... S 3 Decide on 0 s

  26. Categories of configurations Bivalent (see Bivalent, read Undeciding) ● A configuration C is bivalent if some of the configurations ○ accessible from it are 0-valent while others are 1-valent ... S 1 Decide on 0 p 1 0, b C = (s, M) . . S 2 ... Decide on 1 . M p k 1, b ... S 3 Decide on 0 s

  27. What kind of contradiction should possibly be like? INDISTINGUISHABILITY between processes: Crashed ● Simply slow in processing or having a terrible network condition ●

  28. What kind of contradiction should possibly be like? INDISTINGUISHABILITY between processes: Crashed ● Simply slow in processing or having a terrible network condition ● For any protocol, there exists a configuration that is always bivalent.

  29. What kind of contradiction should possibly be like? INDISTINGUISHABILITY between processes: Crashed ● Simply slow in processing or having a terrible network condition ● For any protocol, there exists a configuration that is always bivalent. Remaining UNDECIDED in the value

  30. What kind of contradiction should possibly be like? INDISTINGUISHABILITY between processes: Crashed ● Simply slow in processing or having a terrible network condition ● For any protocol, there exists a configuration that is always bivalent. Remaining UNDECIDED in the value

  31. Proof Outline For any protocol, there is an initial configuration that is bivalent ● Then there is another bivalent configuration reachable from it after ● applying some event And another reachable bivalent configuration ● … ● An infinite undeciding run ●

  32. Most exciting part!!! Lemma 1 (commutativity of schedules) ● Suppose that from some C, the schedules S 1 , S 2 lead to C 1 , C 2 ○ respectively. If the steps in S 1 and in S 2 are disjoint, then S 2 can be applied to C 1 and S 1 can be applied to C 2 and both lead to the same C 3 .

  33. Most exciting part!!! Lemma 1 (commutativity of schedules) ● Suppose that from some C, the schedules S 1 , S 2 lead to C 1 , C 2 ○ respectively. If the steps in S 1 and in S 2 are disjoint, then S 2 can be applied to C 1 and S 1 can be applied to C 2 and both lead to the same C 3 . C S 1 S 2 C 1 C 2 S 2 S 1 C 3

  34. Proof Outline For any protocol, there is an initial configuration that is bivalent ● Then there is another bivalent configuration reachable from it after ● applying some event And another reachable bivalent configuration ● … ● An infinite undeciding run ●

  35. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○

  36. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. p 1 0, b 0, b 0, b 0, b 1, b 1, b 1, b 1, b p 2 0, b 0, b 1, b 1, b 1, b 1, b 0, b 0, b 1, b 0, b 0, b 1, b 1, b 0, b 0, b 1, b p 3

  37. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. p 1 0, b 0, b 0, b 0, b 1, b 1, b 1, b 1, b p 2 0, b 0, b 1, b 1, b 1, b 1, b 0, b 0, b 1, b 0, b 0, b 1, b 1, b 0, b 0, b 1, b p 3 1 1 0 0 0 0 1 1

  38. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. p 1 0, b 0, b 0, b 0, b 1, b 1, b 1, b 1, b p 2 0, b 0, b 1, b 1, b 1, b 1, b 0, b 0, b 1, b 0, b 0, b 1, b 1, b 0, b 0, b 1, b p 3 1 1 0 0 0 0 1 1

  39. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. p 1 0, b 0, b 0, b 0, b 1, b 1, b 1, b 1, b p 2 0, b 0, b 1, b 1, b 1, b 1, b 0, b 0, b 1, b 0, b 0, b 1, b 1, b 0, b 0, b 1, b p 3 1 0 0 0 1 1 1 0

  40. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. p 1 0, b 0, b 0, b 0, b 1, b 1, b 1, b 1, b p 2 0, b 0, b 1, b 1, b 1, b 1, b 0, b 0, b 1, b 0, b 0, b 1, b 1, b 0, b 0, b 1, b p 3 1 0 0 0 1 1 1 0

  41. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. Adjacent: differ in the C 1 C 2 initial state of a single process

  42. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... differ in the C 1 C 2 C i C i+1 C k initial state of a single process

  43. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  44. Most exciting part!!! Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  45. Most exciting part!!! differ in the initial state C i C i+1 of a single process p Lemma 2 ● P has a bivalent initial configuration. ○ Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  46. Most exciting part!!! differ in the initial state C i C i+1 of a single process p S in Lemma 2 ● which p takes no P has a bivalent initial configuration. ○ step C/p Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  47. Most exciting part!!! differ in the initial state C i C i+1 of a single process p S in S in Lemma 2 ● which p which p takes no takes no P has a bivalent initial configuration. ○ step step C/p Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  48. Most exciting part!!! differ in the initial state C i C i+1 of a single process p S in S in Lemma 2 ● which p which p takes no takes no P has a bivalent initial configuration. ○ step step C/p Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... 0 differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  49. 0/1 Most exciting part!!! differ in the initial state C i C i+1 of a single process p S in S in Lemma 2 ● which p which p takes no takes no P has a bivalent initial configuration. ○ step step C/p Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... 0 differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  50. Most exciting part!!! differ in the initial state C i C i+1 of a single process p S in S in Lemma 2 ● which p which p takes no takes no P has a bivalent initial configuration. ○ step step C/p Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... 1 differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  51. 0/1 Most exciting part!!! differ in the initial state C i C i+1 of a single process p S in S in Lemma 2 ● which p which p takes no takes no P has a bivalent initial configuration. ○ step step C/p Assume all initial configurations are either 0-valent or 1-valent. Adjacent: ... ... 1 differ in the C 1 C 2 C i C i+1 C k initial state of a single process 0 0 0 1 1

  52. Proof Outline For any protocol, there is an initial configuration that is bivalent ● Then there is another bivalent configuration reachable from it after ● applying some event And another reachable bivalent configuration ● … ● An infinite undeciding run ●

  53. Most exciting part!!! Lemma 3 ● Let C be a bivalent configuration of P, and e=(p, m) be an event that is ○ applicable to C. Let E be the set of configurations reachable from C without applying e, and let D=e(E), the set of configurations after applying e to all those in E. Then, D contains a bivalent configuration.

  54. Most exciting part!!! Lemma 3 ● Let C be a bivalent configuration of P, and e=(p, m) be an event that is ○ applicable to C. Let E be the set of configurations reachable from C without applying e, and let D=e(E), the set of configurations after applying e to all those in E. Then, D contains a bivalent configuration. C 0/1

  55. Most exciting part!!! Lemma 3 ● Let C be a bivalent configuration of P, and e=(p, m) be an event that is ○ applicable to C. Let E be the set of configurations reachable from C without applying e, and let D=e(E), the set of configurations after applying e to all those in E. Then, D contains a bivalent configuration. Any schedule E 1 without C applying e E 2 E 3 ... 0/1 E

  56. Most exciting part!!! Lemma 3 ● Let C be a bivalent configuration of P, and e=(p, m) be an event that is ○ applicable to C. Let E be the set of configurations reachable from C without applying e, and let D=e(E), the set of configurations after applying e to all those in E. Then, D contains a bivalent configuration. Any schedule E 1 D 1 Apply e without C applying e E 2 D 2 E 3 D 3 ... ... 0/1 E D

  57. Most exciting part!!! Lemma 3 ● Let C be a bivalent configuration of P, and e=(p, m) be an event that is ○ applicable to C. Let E be the set of configurations reachable from C without applying e, and let D=e(E), the set of configurations after applying e to all those in E. Then, D contains a bivalent configuration. Any schedule E 1 D 1 Apply e without C applying e E 2 D 2 E 3 D 3 0/1 ... ... 0/1 E D

  58. Most exciting part!!! Assume all configurations in D are univalent. ●

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