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

the byzantine generals problem
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

The Byzantine Generals Problem

Zixin Chi Julian Angeles

slide-2
SLIDE 2

Motivation

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

slide-3
SLIDE 3

What is the problem?

  • First proposed by Lamport, et al in 1982
  • Loyal generals vs Traitors.
  • Attack? Retreat?
  • Reach consensus among “loyal

generals”given f “traitors”

2 9 1 3 4 7 5 8 6

slide-4
SLIDE 4

Requirements of the Algorithm

  • All loyal generals decide upon the

same plan.

  • Small number of traitors cannot cause

loyal generals to adopt bad plan.

2 9 1 3 4 7 5 8 6

slide-5
SLIDE 5

Reach an Agreement

Restate the conditions

1) Every loyal general must obtain same v(1)..v(n) 1’) Any two loyal generals use same value of v(i) 2) If ith general is loyal, then the value he sends must be used by every other general as v(i)

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 2 9 1 3 4 7 5 8 6

v(i) represents the message the i th general sends

slide-6
SLIDE 6

Impossibility results

For oral message communication, traitors must be less than ⅓.

Commander Lieutenant A Lieutenant B Commander Lieutenant A Lieutenant B Attack Attack Attack Retreat He said retreat He said retreat

ATTACK! Attack!?

slide-7
SLIDE 7

Impossibility results

For oral message communication, traitors must be less than ⅓.

Commander Lieutenant A Lieutenant B Commander Lieutenant A Lieutenant B Retreat Retreat Attack Retreat He said attack He said attack

Retreat! Retreat!?

slide-8
SLIDE 8

Impossibility results

For oral message communication, traitors must be less than ⅓.

Commander Lieutenant A Lieutenant B Attack Retreat He said attack

Retreat! ATTACK!

slide-9
SLIDE 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.
slide-10
SLIDE 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

slide-11
SLIDE 11

Lieutenant is a Traitor

One traitor, four total(m = 1, N = 4) OM(1)

A A A R OM(0) L1 L2 L3 L1 = m (A, A, R); L2 = m (A, A, R); Both attack!

slide-12
SLIDE 12

Commander is a Traitor

One traitor, four total(m = 1, N = 4) OM(1) OM(0) L1=m(A, R, A); L2=m(A, R, A); L3=m(A,R,A); Attack! C1 L1 L3 L2 A R A L2 L1 L3

slide-13
SLIDE 13

Both are Traitors (bigger army)

Two traitors, seven total(m= 2, N = 7) All loyal lieutenants cannot reach agreement

slide-14
SLIDE 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!

slide-15
SLIDE 15

Good Enough?

Traitor’s ability to Lie Why so difficult?

slide-16
SLIDE 16

No More Lying!

Include OM assumptions A4

  • A loyal general's signature cannot be forged, and any alteration
  • f the contents of his signed messages can be detected.
  • Anyone can verify the authenticity of a general's signature.
slide-17
SLIDE 17

Signed Messages Algorithm - SM(m)

Commander Lieutenant A Lieutenant B Attack : C Attack : C Attack : C : A Each Lieutenant has a set of orders V

  • Generals send signed order
  • Lieutenant receives an order
  • If m < distinct signatures, sign

message

  • Verifies authenticity & puts in V
  • Sends to Lieutenants that haven’t seen
  • When no new messages, use choice(V)

to decide action Attack : C : B V = { } V = { } Attack Attack

slide-18
SLIDE 18

SM(1) - Traitor Lieutenant

Satisfies IC1 & IC2!! Commander Lieutenant A Lieutenant B Retreat : C Retreat : C Attack: C : A Retreat : C : B Lieutenant B ignores the traitor’s message V = { } Retreat

slide-19
SLIDE 19

SM(1) - Traitor General

Satisfies IC1!! Commander Lieutenant A Lieutenant B Attack: C Retreat : C Attack : C : A Retreat : C : B Both Loyal Lieutenants get same set V of orders V = { } Attack , Retreat V = { } Attack, Retreat

slide-20
SLIDE 20

Can We Do Better?

Commander Lieutenant A Lieutenant B Lieutenant C

slide-21
SLIDE 21

What if...

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

slide-22
SLIDE 22

A p-regular graph?

Every node has the same amount of neighbors 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

A B C D 2-regular graph

slide-23
SLIDE 23

p-graph Examples

slide-24
SLIDE 24

Extending Oral Messages for Missing Paths

Commander sends message to neighbors only Lieutenants send messages to each

  • ther via paths that don’t include the

Commander Solves for p >= 3m

slide-25
SLIDE 25

Solved But There’s a Catch?

C A B D C A B D FULLY CONNECTED! BOTTLENECK

slide-26
SLIDE 26

Signed Messages for Missing Paths

Solves if subgraph of loyal generals is connected

C A B D WORKS FOR NON P-GRAPHS TOO!

slide-27
SLIDE 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).

slide-28
SLIDE 28

Computing Systems - Assumption 1

Every message sent by a non-faulty processor is delivered correctly

slide-29
SLIDE 29

Computing Systems - Assumption 2

Any processor can determine the

  • riginator of any message that it

received.

slide-30
SLIDE 30

Computing Systems - Assumption 3

Absence of a message can be detected

slide-31
SLIDE 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.

slide-32
SLIDE 32

Conclusion

  • Consensus w/o trust is hard
  • Reasonable solutions (Expensive & Complex)
  • Practical Application - Reliability vs Performance
slide-33
SLIDE 33

Q&A