the byzantine agreement an introduction · pdf file the ngenerals, basic story = 4...

80
Byz Problem Informal EIG Example Attributes Quiz TMR The Byzantine Agreement – An Introduction Radu Nicolescu Department of Computer Science University of Auckland 25 September 2017 1 / 29

Upload: vuongkhanh

Post on 09-Mar-2018

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine Agreement – An Introduction

Radu NicolescuDepartment of Computer Science

University of Auckland

25 September 2017

1 / 29

Page 2: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

2 / 29

Page 3: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Outline

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

3 / 29

Page 4: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• Byzantium history...• http://en.wikipedia.org/wiki/Byzantium

• http://en.wikipedia.org/wiki/Byzantine_Empire

• The N generals, basic story N = 4

• Complete graph KN (loopbacks possible),with secure channels

• Generals’ initial choices can be different:attack or withdraw (database: commit orrollback; binary: 1 or 0)

• Agreement required on one of their initialchoices

• Generals should either all attack or allwithdraw

4 / 29

Page 5: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• Byzantium history...• http://en.wikipedia.org/wiki/Byzantium

• http://en.wikipedia.org/wiki/Byzantine_Empire

• The N generals, basic story N = 4

• Complete graph KN (loopbacks possible),with secure channels

• Generals’ initial choices can be different:attack or withdraw (database: commit orrollback; binary: 1 or 0)

• Agreement required on one of their initialchoices

• Generals should either all attack or allwithdraw

4 / 29

Page 6: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• Byzantium history...• http://en.wikipedia.org/wiki/Byzantium

• http://en.wikipedia.org/wiki/Byzantine_Empire

• The N generals, basic story N = 4

• Complete graph KN (loopbacks possible),with secure channels

• Generals’ initial choices can be different:attack or withdraw (database: commit orrollback; binary: 1 or 0)

• Agreement required on one of their initialchoices

• Generals should either all attack or allwithdraw

4 / 29

Page 7: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• Byzantium history...• http://en.wikipedia.org/wiki/Byzantium

• http://en.wikipedia.org/wiki/Byzantine_Empire

• The N generals, basic story N = 4

• Complete graph KN (loopbacks possible),with secure channels

• Generals’ initial choices can be different:attack or withdraw (database: commit orrollback; binary: 1 or 0)

• Agreement required on one of their initialchoices

• Generals should either all attack or allwithdraw

4 / 29

Page 8: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• However... among the N generals, there may be F traitors,thus only N − F are loyal

• Typically: N = 4, F = 1 (or, N = 7, F = 2)

• In fact, the problem can be solved iff N ≥ 3F + 1 (we’ll provethis later)

• We need two elves (loyals) for each orc plus one hobbit(loyal): N ≥ F + 2F + 1 ,

5 / 29

Page 9: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• However... among the N generals, there may be F traitors,thus only N − F are loyal

• Typically: N = 4, F = 1 (or, N = 7, F = 2)

• In fact, the problem can be solved iff N ≥ 3F + 1 (we’ll provethis later)

• We need two elves (loyals) for each orc plus one hobbit(loyal): N ≥ F + 2F + 1 ,

5 / 29

Page 10: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• However... among the N generals, there may be F traitors,thus only N − F are loyal

• Typically: N = 4, F = 1 (or, N = 7, F = 2)

• In fact, the problem can be solved iff N ≥ 3F + 1 (we’ll provethis later)

• We need two elves (loyals) for each orc plus one hobbit(loyal): N ≥ F + 2F + 1 ,

5 / 29

Page 11: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• However... among the N generals, there may be F traitors,thus only N − F are loyal

• Typically: N = 4, F = 1 (or, N = 7, F = 2)

• In fact, the problem can be solved iff N ≥ 3F + 1 (we’ll provethis later)

• We need two elves (loyals) for each orc plus one hobbit(loyal): N ≥ F + 2F + 1 ,

5 / 29

Page 12: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• A traitor can:

• behave correctly (!)

• stop cooperating (stop sending messages)

• send confusing messages (different messages to differentdirections)

• briefly: anything that could disrupt the agreement!

• The algorithm must cope with such extremely malevolentadversaries

6 / 29

Page 13: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• A traitor can:

• behave correctly (!)

• stop cooperating (stop sending messages)

• send confusing messages (different messages to differentdirections)

• briefly: anything that could disrupt the agreement!

• The algorithm must cope with such extremely malevolentadversaries

6 / 29

Page 14: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• A traitor can:

• behave correctly (!)

• stop cooperating (stop sending messages)

• send confusing messages (different messages to differentdirections)

• briefly: anything that could disrupt the agreement!

• The algorithm must cope with such extremely malevolentadversaries

6 / 29

Page 15: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• A traitor can:

• behave correctly (!)

• stop cooperating (stop sending messages)

• send confusing messages (different messages to differentdirections)

• briefly: anything that could disrupt the agreement!

• The algorithm must cope with such extremely malevolentadversaries

6 / 29

Page 16: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• A traitor can:

• behave correctly (!)

• stop cooperating (stop sending messages)

• send confusing messages (different messages to differentdirections)

• briefly: anything that could disrupt the agreement!

• The algorithm must cope with such extremely malevolentadversaries

6 / 29

Page 17: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement problem

• A traitor can:

• behave correctly (!)

• stop cooperating (stop sending messages)

• send confusing messages (different messages to differentdirections)

• briefly: anything that could disrupt the agreement!

• The algorithm must cope with such extremely malevolentadversaries

6 / 29

Page 18: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement conditions

• Termination: all non-faulty processes eventually decide

• Agreement: no two non-faulty processes ever decide ondifferent values

• Validity: if all non-faulty processes start with the same initialvalue v ∈ V , then v is the only one possible decision value[STRONG]

• if the non-faulty processes start with different initial values,then the final decision could be any of these (as long as it isconsistent)

7 / 29

Page 19: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement conditions

• Termination: all non-faulty processes eventually decide

• Agreement: no two non-faulty processes ever decide ondifferent values

• Validity: if all non-faulty processes start with the same initialvalue v ∈ V , then v is the only one possible decision value[STRONG]

• if the non-faulty processes start with different initial values,then the final decision could be any of these (as long as it isconsistent)

7 / 29

Page 20: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement conditions

• Termination: all non-faulty processes eventually decide

• Agreement: no two non-faulty processes ever decide ondifferent values

• Validity: if all non-faulty processes start with the same initialvalue v ∈ V , then v is the only one possible decision value[STRONG]

• if the non-faulty processes start with different initial values,then the final decision could be any of these (as long as it isconsistent)

7 / 29

Page 21: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement conditions

• Termination: all non-faulty processes eventually decide

• Agreement: no two non-faulty processes ever decide ondifferent values

• Validity: if all non-faulty processes start with the same initialvalue v ∈ V , then v is the only one possible decision value[STRONG]

• if the non-faulty processes start with different initial values,then the final decision could be any of these (as long as it isconsistent)

7 / 29

Page 22: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement examples

Initial Final Notes

0 0 0 0 0 0 0 0 required

0 0 0 1 0 0 0 0 majority rule? NO, required (why?)

0 0 1 1 v v v v depending on a parameter v00 1 1 1 1 1 1 1 majority rule? NO, required (why?)

1 1 1 1 1 1 1 1 required

* 0 0 0 * 0 0 0 required

* 0 0 1 * 0 0 0 or * 1 1 1 depending on parameter v0 and the orc

* 0 1 1 * 0 0 0 or * 1 1 1 depending on parameter v0 and the orc

* 1 1 1 * 1 1 1 required

• The star (*) represents orc’s arbitrary or malevolent choices

• The algorithm we study – EIG – uses an internal parameter,v0, which (1) replaces missing or wrongly formatted messages,and (2) breaks ties

8 / 29

Page 23: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement examples

Initial Final Notes

0 0 0 0 0 0 0 0 required

0 0 0 1 0 0 0 0 majority rule? NO, required (why?)

0 0 1 1 v v v v depending on a parameter v00 1 1 1 1 1 1 1 majority rule? NO, required (why?)

1 1 1 1 1 1 1 1 required

* 0 0 0 * 0 0 0 required

* 0 0 1 * 0 0 0 or * 1 1 1 depending on parameter v0 and the orc

* 0 1 1 * 0 0 0 or * 1 1 1 depending on parameter v0 and the orc

* 1 1 1 * 1 1 1 required

• The star (*) represents orc’s arbitrary or malevolent choices

• The algorithm we study – EIG – uses an internal parameter,v0, which (1) replaces missing or wrongly formatted messages,and (2) breaks ties

8 / 29

Page 24: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement examples

Initial Final Notes

0 0 0 0 0 0 0 0 required

0 0 0 1 0 0 0 0 majority rule? NO, required (why?)

0 0 1 1 v v v v depending on a parameter v00 1 1 1 1 1 1 1 majority rule? NO, required (why?)

1 1 1 1 1 1 1 1 required

* 0 0 0 * 0 0 0 required

* 0 0 1 * 0 0 0 or * 1 1 1 depending on parameter v0 and the orc

* 0 1 1 * 0 0 0 or * 1 1 1 depending on parameter v0 and the orc

* 1 1 1 * 1 1 1 required

• The star (*) represents orc’s arbitrary or malevolent choices

• The algorithm we study – EIG – uses an internal parameter,v0, which (1) replaces missing or wrongly formatted messages,and (2) breaks ties

8 / 29

Page 25: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Outline

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

9 / 29

Page 26: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• The following agreement is required, between the elves:

• Left: #2 and #3 should decide 0.

• Right: #1 and #2 should decide 1.

• Middle: #1 and #3 should reach a consistent decision.

• The orc processes have a perfect disrupting strategy (next)

10 / 29

Page 27: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• The following agreement is required, between the elves:

• Left: #2 and #3 should decide 0.

• Right: #1 and #2 should decide 1.

• Middle: #1 and #3 should reach a consistent decision.

• The orc processes have a perfect disrupting strategy (next)

10 / 29

Page 28: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• The following agreement is required, between the elves:

• Left: #2 and #3 should decide 0.

• Right: #1 and #2 should decide 1.

• Middle: #1 and #3 should reach a consistent decision.

• The orc processes have a perfect disrupting strategy (next)

10 / 29

Page 29: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• The following agreement is required, between the elves:

• Left: #2 and #3 should decide 0.

• Right: #1 and #2 should decide 1.

• Middle: #1 and #3 should reach a consistent decision.

• The orc processes have a perfect disrupting strategy (next)

10 / 29

Page 30: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• The following agreement is required, between the elves:

• Left: #2 and #3 should decide 0.

• Right: #1 and #2 should decide 1.

• Middle: #1 and #3 should reach a consistent decision.

• The orc processes have a perfect disrupting strategy (next)

10 / 29

Page 31: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that they send to each other their initial values:

• Process #3 cannot differentiate between the left and middlecases and should therefore take the same decision in bothcases, i.e., 0.

• Process #1 cannot differentiate between the right and middlecases and should therefore take the same decision in bothcases, i.e., 1.

• Thus, no common decision is possible for the middle case

• Conclusion: 1 round is not enough...11 / 29

Page 32: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that they send to each other their initial values:

• Process #3 cannot differentiate between the left and middlecases and should therefore take the same decision in bothcases, i.e., 0.

• Process #1 cannot differentiate between the right and middlecases and should therefore take the same decision in bothcases, i.e., 1.

• Thus, no common decision is possible for the middle case

• Conclusion: 1 round is not enough...11 / 29

Page 33: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that they send to each other their initial values:

• Process #3 cannot differentiate between the left and middlecases and should therefore take the same decision in bothcases, i.e., 0.

• Process #1 cannot differentiate between the right and middlecases and should therefore take the same decision in bothcases, i.e., 1.

• Thus, no common decision is possible for the middle case

• Conclusion: 1 round is not enough...11 / 29

Page 34: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that they send to each other their initial values:

• Process #3 cannot differentiate between the left and middlecases and should therefore take the same decision in bothcases, i.e., 0.

• Process #1 cannot differentiate between the right and middlecases and should therefore take the same decision in bothcases, i.e., 1.

• Thus, no common decision is possible for the middle case

• Conclusion: 1 round is not enough...11 / 29

Page 35: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that they send to each other their initial values:

• Process #3 cannot differentiate between the left and middlecases and should therefore take the same decision in bothcases, i.e., 0.

• Process #1 cannot differentiate between the right and middlecases and should therefore take the same decision in bothcases, i.e., 1.

• Thus, no common decision is possible for the middle case

• Conclusion: 1 round is not enough...11 / 29

Page 36: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that on the 2nd round the elves relay to each otherthe value received from the other process on the 1st round:

• Process #3 still cannot differentiate between the left andmiddle cases...

• Process #1 still cannot differentiate between the right andmiddle cases...

• Thus, no common decision is possible for the middle case

• Conclusion: 2 rounds are not enough... arguments cancontinue for any number of rounds... 12 / 29

Page 37: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that on the 2nd round the elves relay to each otherthe value received from the other process on the 1st round:

• Process #3 still cannot differentiate between the left andmiddle cases...

• Process #1 still cannot differentiate between the right andmiddle cases...

• Thus, no common decision is possible for the middle case

• Conclusion: 2 rounds are not enough... arguments cancontinue for any number of rounds... 12 / 29

Page 38: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that on the 2nd round the elves relay to each otherthe value received from the other process on the 1st round:

• Process #3 still cannot differentiate between the left andmiddle cases...

• Process #1 still cannot differentiate between the right andmiddle cases...

• Thus, no common decision is possible for the middle case

• Conclusion: 2 rounds are not enough... arguments cancontinue for any number of rounds... 12 / 29

Page 39: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that on the 2nd round the elves relay to each otherthe value received from the other process on the 1st round:

• Process #3 still cannot differentiate between the left andmiddle cases...

• Process #1 still cannot differentiate between the right andmiddle cases...

• Thus, no common decision is possible for the middle case

• Conclusion: 2 rounds are not enough... arguments cancontinue for any number of rounds... 12 / 29

Page 40: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Informal example

• Consider that on the 2nd round the elves relay to each otherthe value received from the other process on the 1st round:

• Process #3 still cannot differentiate between the left andmiddle cases...

• Process #1 still cannot differentiate between the right andmiddle cases...

• Thus, no common decision is possible for the middle case

• Conclusion: 2 rounds are not enough... arguments cancontinue for any number of rounds... 12 / 29

Page 41: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Outline

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

13 / 29

Page 42: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• EIG = Exponential Information Gathering

• Here, F = 1, N = 3F + 1 = 4, L = F + 1 = 2

• Description in Lynch’s monograph

14 / 29

Page 43: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• EIG = Exponential Information Gathering

• Here, F = 1, N = 3F + 1 = 4, L = F + 1 = 2

• Description in Lynch’s monograph

14 / 29

Page 44: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• EIG = Exponential Information Gathering

• Here, F = 1, N = 3F + 1 = 4, L = F + 1 = 2

• Description in Lynch’s monograph

14 / 29

Page 45: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 46: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 47: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 48: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 49: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 50: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 51: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 52: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG tree

• Each non-faulty process maintains its own copy of the EIG tree

• The top-down val (α) attributes: first, the levels are filledtop-down, according to received messages

• The bottom-up newval (β) attributes: next, the levels arerecomputed bottom-up, without messaging, according to alocal majority rule

• On each branch, there is at least one node with a label endingin the ID of a non-faulty node

• The first such nodes (top-down) are connected by a red cut

• The nodes on or above the red cut are common: they havethe same newval values, in all non-faulty processes

• Thus the final decision is common, for all non-faulty processes

• Full description in Lynch’s monograph – also our demo15 / 29

Page 53: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Outline

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

16 / 29

Page 54: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement example

• N = 4 Byzantine armies, physically separated• Generals start with their own initial decisions, 0 or 1• They can communicate via N(N − 1)/2 = 6 reliable channels• They must reach a common decision• Problem: among them there may be F Byzantine traitors• Deterministic agreement between loyal generals possible iffN ≥ 3F + 1 and communications are synchronous

Pease, Shostak, Lamport 1980; Lamport, Shostak, Pease 1982; Fischer, Lynch, Paterson 1985

17 / 29

Page 55: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement example

• N = 4 Byzantine armies, physically separated• Generals start with their own initial decisions, 0 or 1• They can communicate via N(N − 1)/2 = 6 reliable channels• They must reach a common decision• Problem: among them there may be F Byzantine traitors• Deterministic agreement between loyal generals possible iffN ≥ 3F + 1 and communications are synchronous

Pease, Shostak, Lamport 1980; Lamport, Shostak, Pease 1982; Fischer, Lynch, Paterson 1985

17 / 29

Page 56: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement example

• N = 4 Byzantine armies, physically separated• Generals start with their own initial decisions, 0 or 1• They can communicate via N(N − 1)/2 = 6 reliable channels• They must reach a common decision• Problem: among them there may be F Byzantine traitors• Deterministic agreement between loyal generals possible iffN ≥ 3F + 1 and communications are synchronous

Pease, Shostak, Lamport 1980; Lamport, Shostak, Pease 1982; Fischer, Lynch, Paterson 1985

17 / 29

Page 57: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement example

1

2

4

3

ι1 ι2 ι3 ι4

Faulty

Round 1messages

Round 2messages

... Finaldecision

Initialchoice

? 0 1 1

Yes No No No

(1, x) (2, 0) (3, 1) (4, 1)

0 0 0

(2.1, 0)(3.1, y)

(1.2, 0)

(3.2, 1)

(1.3, 0)

(4.3, 1)

(1.4, 1)

(3.4, 1)

?

Process

(2.3, 0) (2.4, 0)

(4.1, 1) (4.2, 1)

Faulty process ι1 sends out conflicting messages:• x = 0, y = 1 to process ι2• x = 0, y = 0 to process ι3• x = 1, y = 1 to process ι4

However, non-faulty processes are able to reach a common decision18 / 29

Page 58: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The Byzantine agreement example

1

2

4

3

ι1 ι2 ι3 ι4

Faulty

Round 1messages

Round 2messages

... Finaldecision

Initialchoice

? 0 1 1

Yes No No No

(1, x) (2, 0) (3, 1) (4, 1)

0 0 0

(2.1, 0)(3.1, y)

(1.2, 0)

(3.2, 1)

(1.3, 0)

(4.3, 1)

(1.4, 1)

(3.4, 1)

?

Process

(2.3, 0) (2.4, 0)

(4.1, 1) (4.2, 1)

Faulty process ι1 sends out conflicting messages:• x = 0, y = 1 to process ι2• x = 0, y = 0 to process ι3• x = 1, y = 1 to process ι4

However, non-faulty processes are able to reach a common decision18 / 29

Page 59: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG trees for non-faulty processes

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

0

01

3 3 2 2

λ

00

0 1 1

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

1

01

3 3 2 2

λ

11

0 1 1

(b) T 34,2

(c) T 44,2

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

0

00

3 3 2 2

λ

11

0 1 1

(a) T 24,2

ι1 ι2 ι3 ι4

Faulty

Round 1messages

Round 2messages

... Finaldecision

Initialchoice

? 0 1 1

Yes No No No

(1, x) (2, 0) (3, 1) (4, 1)

0 0 0

(2.1, 0)(3.1, y)

(1.2, 0)

(3.2, 1)

(1.3, 0)

(4.3, 1)

(1.4, 1)

(3.4, 1)

?

Process

(2.3, 0) (2.4, 0)

(4.1, 1) (4.2, 1)

• α by top-down messaging

• L1: (initial) ι3(3,1)→ ι2, ι3, ι4

• L2: (relay) ι3(4.3,1)→ ι2, ι3, ι4

• β by bottom-up local voting

• common final decision19 / 29

Page 60: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG trees for non-faulty processes

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

0

01

3 3 2 2

λ

00

0 1 1

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

1

01

3 3 2 2

λ

11

0 1 1

(b) T 34,2

(c) T 44,2

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

0

00

3 3 2 2

λ

11

0 1 1

(a) T 24,2

ι1 ι2 ι3 ι4

Faulty

Round 1messages

Round 2messages

... Finaldecision

Initialchoice

? 0 1 1

Yes No No No

(1, x) (2, 0) (3, 1) (4, 1)

0 0 0

(2.1, 0)(3.1, y)

(1.2, 0)

(3.2, 1)

(1.3, 0)

(4.3, 1)

(1.4, 1)

(3.4, 1)

?

Process

(2.3, 0) (2.4, 0)

(4.1, 1) (4.2, 1)

• α by top-down messaging

• L1: (initial) ι3(3,1)→ ι2, ι3, ι4

• L2: (relay) ι3(4.3,1)→ ι2, ι3, ι4

• β by bottom-up local voting

• common final decision19 / 29

Page 61: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

EIG trees for non-faulty processes

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

0

01

3 3 2 2

λ

00

0 1 1

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

1

01

3 3 2 2

λ

11

0 1 1

(b) T 34,2

(c) T 44,2

1 2 3 4

2 4 1 4 1 4 1 3

0 0 1 0 0 0 1 1 1 1 1

0 0 1 1

0 0 1 0 0 0 1 1 1 1 1

0

00

3 3 2 2

λ

11

0 1 1

(a) T 24,2

ι1 ι2 ι3 ι4

Faulty

Round 1messages

Round 2messages

... Finaldecision

Initialchoice

? 0 1 1

Yes No No No

(1, x) (2, 0) (3, 1) (4, 1)

0 0 0

(2.1, 0)(3.1, y)

(1.2, 0)

(3.2, 1)

(1.3, 0)

(4.3, 1)

(1.4, 1)

(3.4, 1)

?

Process

(2.3, 0) (2.4, 0)

(4.1, 1) (4.2, 1)

• α by top-down messaging

• L1: (initial) ι3(3,1)→ ι2, ι3, ι4

• L2: (relay) ι3(4.3,1)→ ι2, ι3, ι4

• β by bottom-up local voting

• common final decision19 / 29

Page 62: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Outline

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

20 / 29

Page 63: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The top-down val() attribute

How val() are filled (example):

• val(2...) is about what #2 said

• val(2) is what #2 directly said

• val(21) is what #1 said that #2 said

• If #1 is lying about #2 in val(21), then #3 & #4 will“mask” this by val(23) & val(24)

• invalid or missing messages are assumed to be v021 / 29

Page 64: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The top-down val() attribute

How val() are filled (example):

• val(2...) is about what #2 said

• val(2) is what #2 directly said

• val(21) is what #1 said that #2 said

• If #1 is lying about #2 in val(21), then #3 & #4 will“mask” this by val(23) & val(24)

• invalid or missing messages are assumed to be v021 / 29

Page 65: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The top-down val() attribute

How val() are filled (example):

• val(2...) is about what #2 said

• val(2) is what #2 directly said

• val(21) is what #1 said that #2 said

• If #1 is lying about #2 in val(21), then #3 & #4 will“mask” this by val(23) & val(24)

• invalid or missing messages are assumed to be v021 / 29

Page 66: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The top-down val() attribute

How val() are filled (example):

• val(2...) is about what #2 said

• val(2) is what #2 directly said

• val(21) is what #1 said that #2 said

• If #1 is lying about #2 in val(21), then #3 & #4 will“mask” this by val(23) & val(24)

• invalid or missing messages are assumed to be v021 / 29

Page 67: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The top-down val() attribute

How val() are filled (example):

• val(2...) is about what #2 said

• val(2) is what #2 directly said

• val(21) is what #1 said that #2 said

• If #1 is lying about #2 in val(21), then #3 & #4 will“mask” this by val(23) & val(24)

• invalid or missing messages are assumed to be v021 / 29

Page 68: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The top-down val() attribute

How val() are filled (example):

• val(2...) is about what #2 said

• val(2) is what #2 directly said

• val(21) is what #1 said that #2 said

• If #1 is lying about #2 in val(21), then #3 & #4 will“mask” this by val(23) & val(24)

• invalid or missing messages are assumed to be v021 / 29

Page 69: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The bottom-up newval() attribute

newval()

• computed new value

• no messaging anymore

• decision taken by a local majority voting procedure

• or, v0, if there is no majority

• this “masks” failures

• if any – within the accepted limits (n ≥ 3f + 1)

22 / 29

Page 70: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The bottom-up newval() attribute

newval()

• computed new value

• no messaging anymore

• decision taken by a local majority voting procedure

• or, v0, if there is no majority

• this “masks” failures

• if any – within the accepted limits (n ≥ 3f + 1)

22 / 29

Page 71: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The bottom-up newval() attribute

newval()

• computed new value

• no messaging anymore

• decision taken by a local majority voting procedure

• or, v0, if there is no majority

• this “masks” failures

• if any – within the accepted limits (n ≥ 3f + 1)

22 / 29

Page 72: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The bottom-up newval() attribute

newval()

• computed new value

• no messaging anymore

• decision taken by a local majority voting procedure

• or, v0, if there is no majority

• this “masks” failures

• if any – within the accepted limits (n ≥ 3f + 1)

22 / 29

Page 73: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The bottom-up newval() attribute

newval()

• computed new value

• no messaging anymore

• decision taken by a local majority voting procedure

• or, v0, if there is no majority

• this “masks” failures

• if any – within the accepted limits (n ≥ 3f + 1)

22 / 29

Page 74: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

The bottom-up newval() attribute

23 / 29

Page 75: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Outline

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

24 / 29

Page 76: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Byzantine quiz

25 / 29

Page 77: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Byzantine quiz: decision 0

26 / 29

Page 78: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Byzantine quiz: decision 1

27 / 29

Page 79: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Outline

1 The Byzantine agreement problem

2 Informal example

3 EIG tree

4 Example

5 Attributes

6 Quiz

7 Triple modular redundancy

28 / 29

Page 80: The Byzantine Agreement An Introduction · PDF file  The Ngenerals, basic story = 4 Completegraph K N (loopbacks possible), withsecurechannels

Byz Problem Informal EIG Example Attributes Quiz TMR

Byz vs Triple modular redundancy (TMR)

29 / 29