Weighted Byzantine Agreement Vijay K. Garg John Bridgman Parallel - - PowerPoint PPT Presentation

weighted byzantine agreement
SMART_READER_LITE
LIVE PREVIEW

Weighted Byzantine Agreement Vijay K. Garg John Bridgman Parallel - - PowerPoint PPT Presentation

Weighted Byzantine Agreement Vijay K. Garg John Bridgman Parallel and Distributed Systems Lab at The University of Texas at Austin IPDPS 2011 Introduction Byzantine Agreement Introduced by Lamport, Shostak and Pease 1980 Model: n


slide-1
SLIDE 1

Weighted Byzantine Agreement

Vijay K. Garg John Bridgman

Parallel and Distributed Systems Lab at The University of Texas at Austin

IPDPS 2011

slide-2
SLIDE 2

Introduction

Byzantine Agreement

◮ Introduced by Lamport, Shostak

and Pease 1980

◮ Model:

◮ n processes ◮ f byzantine faults ◮ Synchronous system John Bridgman (PDSL UT) WBA IPDPS 2011 2 / 33

slide-3
SLIDE 3

Introduction

Byzantine Agreement Requirements

◮ Agreement: Two correct processes cannot decide on different values.

John Bridgman (PDSL UT) WBA IPDPS 2011 3 / 33

slide-4
SLIDE 4

Introduction

Byzantine Agreement Requirements

◮ Agreement: Two correct processes cannot decide on different values.

P0 P1 P2 . . . Pn Input 1 . . . 1 Good Output 1 1 1 . . . 1 Bad Output 1 . . . 1

John Bridgman (PDSL UT) WBA IPDPS 2011 3 / 33

slide-5
SLIDE 5

Introduction

Byzantine Agreement Requirements

◮ Agreement: Two correct processes cannot decide on different values. ◮ Validity: The value decided must be proposed by some correct

process.

John Bridgman (PDSL UT) WBA IPDPS 2011 3 / 33

slide-6
SLIDE 6

Introduction

Byzantine Agreement Requirements

◮ Agreement: Two correct processes cannot decide on different values. ◮ Validity: The value decided must be proposed by some correct

process. P0 P1 P2 . . . Pn Input 1 1 1 . . . 1 Good Output 1 1 1 . . . 1 Bad Output . . .

John Bridgman (PDSL UT) WBA IPDPS 2011 3 / 33

slide-7
SLIDE 7

Introduction

Byzantine Agreement Requirements

◮ Agreement: Two correct processes cannot decide on different values. ◮ Validity: The value decided must be proposed by some correct

process.

◮ Termination: All correct processes decide in finite number of steps.

John Bridgman (PDSL UT) WBA IPDPS 2011 3 / 33

slide-8
SLIDE 8

Introduction

Byzantine Agreement Lower Bounds

◮ n ≥ 3f + 1 ◮ Given by Lamport, Shostak, Pease 1980

John Bridgman (PDSL UT) WBA IPDPS 2011 4 / 33

slide-9
SLIDE 9

Introduction

Byzantine Agreement Lower Bounds

◮ n ≥ 3f + 1 ◮ Given by Lamport, Shostak, Pease 1980 ◮ What if we have 30 processes where 15 of them can fail?

John Bridgman (PDSL UT) WBA IPDPS 2011 4 / 33

slide-10
SLIDE 10

Introduction

Byzantine Agreement Lower Bounds

◮ n ≥ 3f + 1 ◮ Given by Lamport, Shostak, Pease 1980 ◮ What if we have 30 processes where 15 of them can fail? ◮ f + 1 rounds worst case ◮ Given by Fischer and Lynch 1982

John Bridgman (PDSL UT) WBA IPDPS 2011 4 / 33

slide-11
SLIDE 11

Introduction

Byzantine Agreement Lower Bounds

◮ n ≥ 3f + 1 ◮ Given by Lamport, Shostak, Pease 1980 ◮ What if we have 30 processes where 15 of them can fail? ◮ f + 1 rounds worst case ◮ Given by Fischer and Lynch 1982 ◮ Can we design a protocol that under certain assumptions can beat

these?

John Bridgman (PDSL UT) WBA IPDPS 2011 4 / 33

slide-12
SLIDE 12

Introduction

Weight Motivation

  • 1. Abstract notion of trust
  • 2. Support multiple classes of

processes

  • 3. Beat bounds under certain

conditions

John Bridgman (PDSL UT) WBA IPDPS 2011 5 / 33

slide-13
SLIDE 13

Introduction

WBA Problem Specification

◮ Common weight vector, w ◮ Weight of failed no more than ρ ◮ Must satisfy:

◮ Agreement ◮ Validity ◮ Termination John Bridgman (PDSL UT) WBA IPDPS 2011 6 / 33

slide-14
SLIDE 14

Introduction

WBA Lower Bounds

Let αρ be the minimum number of processes whose weight exceeds ρ then

◮ αρ rounds ◮ ρ < 1/3

1 1 1 0.04 0.12 0.10 0.21 0.15 0.19 0.19

John Bridgman (PDSL UT) WBA IPDPS 2011 7 / 33

slide-15
SLIDE 15

Introduction

Outline

Introduction Algorithms Weighted-Queen Algorithm Weighted-King Algorithm Initial Weight Assignment Updating Weights Related Work Conclusions

John Bridgman (PDSL UT) WBA IPDPS 2011 8 / 33

slide-16
SLIDE 16

Algorithms

Weighted Byzantine Algorithm Examples

◮ Two algorithms: Weighted

Queen and Weighted King

◮ These have good properties

◮ ≤ f + 1 phases ◮ Any failure combination so

long as weight < ρ

John Bridgman (PDSL UT) WBA IPDPS 2011 9 / 33

slide-17
SLIDE 17

Algorithms Weighted-Queen Algorithm

The Weighted-Queen Algorithm

◮ Based on Phase Queen given by Berman and Garay 1989

Phase Queen (original) Weighted Queen (ours) Fault tolerance f < n/4 ρ < 1/4 Rounds 2(f + 1) 2αρ

John Bridgman (PDSL UT) WBA IPDPS 2011 10 / 33

slide-18
SLIDE 18

Algorithms Weighted-Queen Algorithm

The Weighted-Queen Algorithm

◮ Based on Phase Queen given by Berman and Garay 1989

Phase Queen (original) Weighted Queen (ours) Fault tolerance f < n/4 ρ < 1/4 Rounds 2(f + 1) 2αρ αρ ≤ f + 1

John Bridgman (PDSL UT) WBA IPDPS 2011 10 / 33

slide-19
SLIDE 19

Algorithms Weighted-Queen Algorithm

The Weighted-Queen Algorithm

For αρ phases iterating over the processes starting with highest weight to lowest do:

◮ First round

◮ Exchange own value, v, with everyone ◮ Set v to the value with the highest weight ◮ Set supp to the weight of v

◮ Second round

◮ Queen broadcasts its value ◮ If supp ≤ 3/4, set v to the queen’s value

Output own value

John Bridgman (PDSL UT) WBA IPDPS 2011 11 / 33

slide-20
SLIDE 20

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Example: 7 processes with weight assignment

[0.2, 0.2, 0.12, 0.12, 0.4, 0.12, 0.12]

◮ Standard algorithm: 1 fault only, Weighted: some 2 faults ◮ For example 0 and 4 together

John Bridgman (PDSL UT) WBA IPDPS 2011 12 / 33

slide-21
SLIDE 21

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 1, Round 1:

1 2 3 4 5 6 w[0]: 0.20 w[1]: 0.20 v: 1 w[2]: 0.12 v: 0 w[3]: 0.12 v: 1 w[4]: 0.04 w[5]: 0.12 v: 1 w[6]: 0.12 v: 0

John Bridgman (PDSL UT) WBA IPDPS 2011 13 / 33

slide-22
SLIDE 22

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 1, Round 1:

1 2 3 4 5 6 0: 0.12 1: 0.88 0: 0.52 1: 0.48 0: 0.52 1: 0.48 0: 0.52 1: 0.48 0: 0.12 1: 0.88

John Bridgman (PDSL UT) WBA IPDPS 2011 13 / 33

slide-23
SLIDE 23

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 1, Round 1:

1 2 3 4 5 6 v: 1 supp: 0.88 v: 0 supp: 0.52 v: 0 supp: 0.52 v: 1 supp: 0.88 v: 0 supp: 0.52

John Bridgman (PDSL UT) WBA IPDPS 2011 13 / 33

slide-24
SLIDE 24

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 1, Round 2:

1 2 3 4 5 6 v: 1 supp: 0.88 v: 0 supp: 0.52 v: 0 supp: 0.52 v: 1 supp: 0.88 v: 0 supp: 0.52 1

John Bridgman (PDSL UT) WBA IPDPS 2011 14 / 33

slide-25
SLIDE 25

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 1, Round 2:

1 2 3 4 5 6 v: 1 v: 0 v: 1 v: 1 v: 0

John Bridgman (PDSL UT) WBA IPDPS 2011 14 / 33

slide-26
SLIDE 26

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 2, Round 1:

1 2 3 4 5 6 v: 1 v: 0 v: 1 v: 1 v: 0

John Bridgman (PDSL UT) WBA IPDPS 2011 15 / 33

slide-27
SLIDE 27

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 2, Round 1:

1 2 3 4 5 6 v: 1 supp: 0.88 v: 0 supp: 0.52 v: 0 supp: 0.52 v: 1 supp: 0.88 v: 0 supp: 0.52

John Bridgman (PDSL UT) WBA IPDPS 2011 15 / 33

slide-28
SLIDE 28

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 2, Round 2:

1 2 3 4 5 6 1

John Bridgman (PDSL UT) WBA IPDPS 2011 16 / 33

slide-29
SLIDE 29

Algorithms Weighted-Queen Algorithm

Weighted-Queen Example

◮ Phase 2, Round 2:

1 2 3 4 5 6 v: 1 v: 1 v: 1 v: 1 v: 1

John Bridgman (PDSL UT) WBA IPDPS 2011 16 / 33

slide-30
SLIDE 30

Algorithms Weighted-Queen Algorithm

Persistence of Agreement

Lemma (Persistence of Agreement)

Assuming ρ < 1/4, if all correct processes prefer a value v at the beginning

  • f a round; then, they continue to do so at the end of the round.

John Bridgman (PDSL UT) WBA IPDPS 2011 17 / 33

slide-31
SLIDE 31

Algorithms Weighted-Queen Algorithm

At Least One Correct Queen

Lemma

There is at least one in the first αρ rounds in which the queen is correct.

John Bridgman (PDSL UT) WBA IPDPS 2011 18 / 33

slide-32
SLIDE 32

Algorithms Weighted-Queen Algorithm

Weighted-Queen Satisfies the WBA Problem

Theorem

The Weighted-Queen Algorithm solves the agreement problem for all ρ < 1/4. To prove this we have to prove that this algorithm satisfies the three properties listed previously: validity, termination, and agreement.

John Bridgman (PDSL UT) WBA IPDPS 2011 19 / 33

slide-33
SLIDE 33

Algorithms Weighted-King Algorithm

Weighted-King Algorithm

◮ Three round algorithm based on

algorithm given by Berman, Garay and Perry 1989 Phase King (orig.) Weighted King (ours) Fault tolerance f < n/3 ρ < 1/3 Rounds 3(f + 1) 3αρ

John Bridgman (PDSL UT) WBA IPDPS 2011 20 / 33

slide-34
SLIDE 34

Initial Weight Assignment

Initial Weight Assignment

◮ Weight assignment dramatically changes the nature of these

algorithms.

◮ Simple examples:

◮ [1/n, 1/n, . . . , 1/n] ◮ [1/7, 1/7, 1/7, 1/7, 1/7, 1/7, 1/7, 0, . . . , 0] ◮ [1, 0, 0, . . . , 0] John Bridgman (PDSL UT) WBA IPDPS 2011 21 / 33

slide-35
SLIDE 35

Initial Weight Assignment

Initial Weight Assignment

◮ Weight assignment dramatically changes the nature of these

algorithms.

◮ Simple examples:

◮ [1/n, 1/n, . . . , 1/n] ◮ [1/7, 1/7, 1/7, 1/7, 1/7, 1/7, 1/7, 0, . . . , 0] ◮ [1, 0, 0, . . . , 0]

◮ A more involved example with two sets of processes:

◮ Set A is a collection of six highly reliable processes with probability of

failure fa = 0.1.

◮ Set B is a collection of unreliable processes with probability of failure

fb = 0.3.

John Bridgman (PDSL UT) WBA IPDPS 2011 21 / 33

slide-36
SLIDE 36

Initial Weight Assignment

Initial Weight Assignment Policies

◮ Uniform (Same as regular Byzantine Agreement) ◮ All weight to set A ◮ w[i] ∝ 1 − Pr{Pi fails} ◮ w[i] ∝ 1 Pr{Pi fails}

John Bridgman (PDSL UT) WBA IPDPS 2011 22 / 33

slide-37
SLIDE 37

Weight Assignment Example Probabilities

50 100 150 200 250 300 350 400 Number of processes in set B 0.00 0.05 0.10 0.15 0.20 0.25 Probability of the weight of failed processes exceeding 1/3

Only A non-zero Uniform (standard BA) Proportional to the inverse probability of failure Proportional to the probability of not failing

slide-38
SLIDE 38

Updating Weights

Updating Weights

Can we update weights? Some issues with updating weights:

◮ Weight vector at each process

must be the same

◮ Each process may see different

views of what other have sent

John Bridgman (PDSL UT) WBA IPDPS 2011 24 / 33

slide-39
SLIDE 39

Updating Weights

Weight Update Algorithm

◮ A simple solution of agreeing on weights ◮ Process can detect a faulty process j if:

◮ j sends a no message or corrupted message ◮ j is queen, queen value is different from v and supp > 3/4

◮ After detect can reduce the weight of the process ◮ Have to be careful, faulty process can claim good process faulty

John Bridgman (PDSL UT) WBA IPDPS 2011 25 / 33

slide-40
SLIDE 40

Updating Weights

Weight Update Algorithm

◮ Round one

◮ Broadcast faultySet ◮ For each process j that is suspected by some process if the

weight of all processes that suspect is greater than ρ then add j to faultySet

◮ Round two

◮ Use WBA to agree upon faultySet ◮ Add to consensusFaulty each one agreed to be faulty

◮ Round three

◮ Set the weight of processes in consensusFaulty to 0 and

renormalise

John Bridgman (PDSL UT) WBA IPDPS 2011 26 / 33

slide-41
SLIDE 41

Related Work

Related work: Adversarial Structure

◮ Adversarial structure by Hirt and Maurer 1997 ◮ The adversarial structure is the set of all processes whose failure

should be tolerated

◮ Adversarial structure is exponential in n ◮ Many adversarial structures can be converted to a weight assignment

John Bridgman (PDSL UT) WBA IPDPS 2011 27 / 33

slide-42
SLIDE 42

Conclusions

Weighted Versus Unweighted

◮ Pros:

◮ Simple ◮ Can tolerate more than n/3 faults in certain circumstances ◮ Always ≤ f + 1 rounds

◮ Cons:

◮ Even with fewer than n/3 faulty processes the algorithm may not work

in some cases

John Bridgman (PDSL UT) WBA IPDPS 2011 28 / 33

slide-43
SLIDE 43

Conclusions

Future Work

◮ Better update methods ◮ Apply weights to other algorithms ◮ Approximately equal weight vectors

John Bridgman (PDSL UT) WBA IPDPS 2011 29 / 33

slide-44
SLIDE 44

Conclusions

Conclusion

◮ Weighted Byzantine Agreement ◮ Weighted Algorithms ◮ Initial Weight Assignment ◮ Update Method

John Bridgman (PDSL UT) WBA IPDPS 2011 30 / 33

slide-45
SLIDE 45

Backup

Adversarial Structure Example

Let P == {d, e, f , g, h, i} and ¯ A = {{d, e, f }, {d, g}, {e, h}, {e, i}, {f , g}} Then a weight assignment that satisfies this adversarial structure is: Process d e f g h i Weight 1/9 1/18 8/57 1/16 5/19 5/19

John Bridgman (PDSL UT) WBA IPDPS 2011 31 / 33

slide-46
SLIDE 46

Backup

Weighted-King Algorithm

For αρ rounds where the king iterates over the processes from highest weight to lowest weight:

◮ Phase one:

◮ Broadcast own value ◮ If 1 or 0 has weight over 2/3 then set own value to that value ◮ else set own value to undecided

◮ Phase two:

◮ Broadcast own value ◮ If the weight of some value received is above 1/3 (giving priority to 0,

then 1, then undecided) set own value to that value

◮ Phase three:

◮ King broadcasts its value ◮ if own value is undecided or the supporting weight from phase two of

  • wn value is under 2/3 then set value to kings value

◮ if own value is undecided set value to one John Bridgman (PDSL UT) WBA IPDPS 2011 32 / 33

slide-47
SLIDE 47

Backup

Artificial Neural Networks

◮ Artificial Neural Networks deal with weighted sums of inputs ◮ Are not used the say way as the way we are using weights.

John Bridgman (PDSL UT) WBA IPDPS 2011 33 / 33