ROBUST & SPECULATIVE BYZANTINE RANDOMIZED CONSENSUS WITH - - PowerPoint PPT Presentation

robust speculative byzantine randomized consensus
SMART_READER_LITE
LIVE PREVIEW

ROBUST & SPECULATIVE BYZANTINE RANDOMIZED CONSENSUS WITH - - PowerPoint PPT Presentation

ROBUST & SPECULATIVE BYZANTINE RANDOMIZED CONSENSUS WITH CONSTANT TIME COMPLEXITY IN NORMAL CONDITIONS Nuno Neves Bruno Vavala University of Lisbon, Portugal University of Lisbon, Portugal Carnegie Mellon


slide-1
SLIDE 1

IEEE Symposium on Reliable and Distributed Systems 2012

ROBUST & SPECULATIVE BYZANTINE RANDOMIZED CONSENSUS

WITH CONSTANT TIME COMPLEXITY IN NORMAL CONDITIONS

Bruno Vavala


University of Lisbon, Portugal
 Carnegie Mellon University, U.S.

Nuno Neves


University of Lisbon, Portugal


slide-2
SLIDE 2

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

CONSENSUS

  • Fundamental problem in distributed computing
  • Examples: SM Replication, Leader Election,

Coordination, Group Membership, etc.

2

  • Termination achievable with:
  • weaker models (ev. synchrony assumption)
  • randomization (almost-surely)
  • Impossible to attain deterministically 


with crash-faults (partial correctness)

slide-3
SLIDE 3

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

RANDOMIZED CONSENSUS

  • Properties
  • Validity: if all correct processes propose v, then v is the only

possible decision

  • Agreement: no two correct processes decide differently
  • Probabilistic Termination: all correct processes eventually decide

with probability 1

  • Assumptions
  • Reliable channels
  • Source-authenticated channels

3

slide-4
SLIDE 4

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

BRACHA’S ALGORITHM

(PODC 1984)

  • Seminal algorithm
  • Asynchronous
  • Byzantine resistant
  • Resilient-optimal (3f+1)
  • Correct under the 


Strong Adversary model

4

slide-5
SLIDE 5

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

5

1)RBcast value 2)Set majority value

1st phase

(set majority)

BRACHA’S ALGORITHM

(PODC 1984)

  • Seminal algorithm
  • Asynchronous
  • Byzantine resistant
  • Resilient-optimal (3f+1)
  • Correct under the 


Strong Adversary model

slide-6
SLIDE 6

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

6

1)RBcast value 2)Set majority value 4)RBcast value 5)Set quorum value
 (if any, or default v)

1st phase

(set majority)

2nd phase

(try-lock)

BRACHA’S ALGORITHM

(PODC 1984)

  • Seminal algorithm
  • Asynchronous
  • Byzantine resistant
  • Resilient-optimal (3f+1)
  • Correct under the 


Strong Adversary model

slide-7
SLIDE 7

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

7

1)RBcast value 2)Set majority value 4)RBcast value 5)Set quorum value
 (if any, or default v) 7)RBcast value 8)Set decision value
 (if any, or majority)
 (if any, or flip coin) 10)start new round

1st phase

(set majority)

2nd phase

(try-lock)

3rd phase

(try-decide)

BRACHA’S ALGORITHM

(PODC 1984)

  • Seminal algorithm
  • Asynchronous
  • Byzantine resistant
  • Resilient-optimal (3f+1)
  • Correct under the 


Strong Adversary model

slide-8
SLIDE 8

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

IN THEORY

8 Rounds 1 1000 1000000 1000000000 1000000000000 1000000000000000 1000000000000000000 1000000000000000000000 1000000000000000000000000 1000000000000000000000000000 1000000000000000000000000000000 Processes 4 28 52 76 100

Potential problem: expected exponential time execution 
 under adverse conditions

slide-9
SLIDE 9

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

IN PRACTICE

9 Rounds 2 6 10 Processes 4 28 52 76 100

In reality: it terminates in a constant number of rounds
 under normal conditions

slide-10
SLIDE 10

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

RELIABILITY VS. PERFORMANCE

WHAT’S THE MODEL?

slide-11
SLIDE 11

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

WHAT IS NORMAL?

  • Asynchrony?
  • Crash failures?
  • Byzantine failures?
  • Content-independent message scheduler?
  • Full information adversary?
  • Adversary message scheduler?

11

slide-12
SLIDE 12

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

AN EXPERIMENT

slide-13
SLIDE 13

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

FIRST ROUND

13

first phase > < second phase third phase > toss a coin

slide-14
SLIDE 14

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

SECOND ROUND

14

first phase > < second phase third phase > toss a coin

slide-15
SLIDE 15

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

THIRD ROUND

15

first phase > < second phase third phase > decision

slide-16
SLIDE 16

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

PROBABILISTIC ANALYSIS

slide-17
SLIDE 17

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

INGREDIENTS

  • Hypergeometric distribution

  • Binomial distribution

  • Normal distribution

  • Some approximations

17

H B

H(n, k, n−f) P (B(n, p) ≤ i) ≈ Φ ✓

i−np

np(1−p)

◆ B(n, p) N(np, np(1 − p))

slide-18
SLIDE 18

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

k > 1/4 k < 1/4

KEY

18 0! 0.25! 0.5! 0.75! 1! 1! 4! 7! 10! 13! 16! 19! Proability! Processes! All procs set v ( k>1/4 )! A proc sets default ( k<1/4 )!

  • Threshold of half plus 1/4 of procs 


proposing v at the end of 2nd phase


slide-19
SLIDE 19

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

message exchange


1st Phase

GOING BACKWARDS

19

  • Linear bias of (just) positive constant beyond the average


message exchange


3rd Phase

  • decision on v


message exchange


2nd Phase

  • Linear bias of constant 1/4 of procs proposing v

  • Procs have constant probability of setting v

  • Square root bias beyond the average of procs proposing v

  • Back to coin tossing, this is a . . .

Basic property of the Normal Distribution: p=2/5 (or 2.5 rounds )

slide-20
SLIDE 20

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

EVALUATION

slide-21
SLIDE 21

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

PERFORMANCE

  • Cluster of 6 nodes
  • Up to 100 processes

21

0! 0.5! 1! 1.5! 2! 2.5! 3! 3.5! 4! 16! 28! 40! 52! 64! 76! 88! 100! Rounds! Processes!

2.5 rounds

?

  • n = 3f + 1
  • Divergent initial configuration
slide-22
SLIDE 22

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

PERFORMANCE

  • Analysis says 2.5 rounds after coin flipping
  • Baseline at 1 round
  • Theoretically satisfactory, but practically not precise, constant complexity

22

0! 0.5! 1! 1.5! 2! 2.5! 3! 3.5! 4! 16! 28! 40! 52! 64! 76! 88! 100! Rounds! Processes!

2.5 rounds baseline

slide-23
SLIDE 23

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

  • Approximations are theoretically good
  • Loss of precision when computing constant values


LOOK AT THE CONSTANTS

23

P(H(n, k, n−f) ≤ i)

Feller

≈ Φ ⇣

i − µH σH

⌘ P(H(n, k, n−f) ≤ i)

  • urs

≤ Φ ⇣

i − µB σB

⌘ Φ ⇣

i − µH σH

⌘ = Φ ⇣

i − µB σB

√ 3 ⌘

  • A better approximation is available


  • A multiplicative constant impacts noticeably just on constants

slide-24
SLIDE 24

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

PERFORMANCE

  • Analysis says 1.59 rounds after coin flipping
  • Baseline at 1 round
  • Theoretically satisfactory and practically rather precise constant complexity

24

1.59 rounds baseline

0! 0.5! 1! 1.5! 2! 2.5! 3! 3.5! 4! 16! 28! 40! 52! 64! 76! 88! 100! Rounds! Processes!

slide-25
SLIDE 25

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

HIGH LEVEL VIEW

25

Model Complexity SA

O(2n)

WA

O(1)

SMO

1 round

slide-26
SLIDE 26

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

Model Complexity SA

O(2n)

WA

O(1)

SMO

1 round

HIGH LEVEL VIEW

26

strong adversary

slide-27
SLIDE 27

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

HIGH LEVEL VIEW

27

strong adversary s y n c h r

  • n
  • u

s m s g

  • r

d e r

Model Complexity SA

O(2n)

WA

O(1)

SMO

1 round

slide-28
SLIDE 28

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

HIGH LEVEL VIEW

28

strong adversary

  • b

l i v i

  • u

s a d v e r s a r y s y n c h r

  • n
  • u

s m s g

  • r

d e r

Model Complexity SA

O(2n)

OA

O(1)

SMO

1 round

Complexity values are all relative to the Bracha’s algorithm

slide-29
SLIDE 29

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

LET’S GO BEYOND

slide-30
SLIDE 30

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

3-6 phases (bad) 1-2 rounds (good)

OVERVIEW

  • (oblivious) crash-failures may happen
  • Decision in 1 phase possible in a weaker model
  • Focus on the set of ( n-f ) received messages

30

Termination in Objective: can we improve phase complexity in
 normal conditions while maintaining reliability?

slide-31
SLIDE 31

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

SPECULATION

31

1st Phase 2nd Phase 3rd Phase

broadcast and

try lock value

broadcast and

try decide v

quorum reached no decision

speculate v is locked

broadcast (3s)

try decide v

broadcast and

set majority

decision

slide-32
SLIDE 32

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

PERFORMANCE

32

0! 2! 4! 6! 8! 10! 0! 20! 40! 60! 80! 100! Procs with proposal v! Phases! Rounds!

slide-33
SLIDE 33

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

PERFORMANCE

33

0! 2! 4! 6! 8! 10! 0! 20! 40! 60! 80! 100! Procs with proposal v! Phases! Rounds!

  • 2-phase termination more frequent with more msgs
slide-34
SLIDE 34

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

BENEFITS AND DRAWBACKS

34

PROs CONs

2 phases/round in the best case
 Algorithm complexity increased due to speculation 3 phases/round if speculation fails
 Fragile for near divergent proposals Does not compromise original algorithm’s properties

slide-35
SLIDE 35

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

SUMMARIZING

  • Bracha’s algorithm (PODC 1984) terminates in constant time 


(1.59 expected rounds) in normal conditions

  • First cross-model (non-trivial) analysis
  • Enhanced detection of anomalous/malicious behavior
  • (Almost) matching upper-bound with respect to 


Attiya-Censor’s lower bound (PODC 2008)

  • Improved algorithm through inexpensive Speculation

35

slide-36
SLIDE 36

Bruno Vavala, CMU-FCUL, Oct 2012 IEEE Symposium on Reliable and Distributed Systems 2012

THANK YOU!