38
© 2016 VMware Inc. All rights reserved. HotStuff: Three-step Rule! Dahlia Malkhi VMware Research

HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

© 2016 VMware Inc. All rights reserved.

HotStuff: Three-step Rule!

Dahlia MalkhiVMware Research

Page 2: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

2Confidential � ©2018 VMware, Inc.

HotStuff

Page 3: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

Blockchain: Decentralizing Trust

Create digital assets without backing liability ✘Book-keeping without backing liability

BFT Consensus

Contracts

Apps

Page 4: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

4Confidential � ©2018 VMware, Inc.

Permissioned BFT Consensusuntil now..Clement etal, 2009: "A single faulty client or server is capable of rendering PBFT, Q/U, HQ, and Zyzzyva virtually unusable”

Amir etal, 2011: “faulty processors can significantly degrade the performance of some protocols”

Cachin and Vukolic 2017: "Tendermint ... suffers from a livelock bug”

VMware team 2017: "a safety violation in Zyzzyva and a liveness violation in FaB. ... relatively simple scenarios, involving only four replicas, and one or two view changes."

IBM FaB, 2017: "version 1.0 was launched early in 2017 without an implementation of a BFT ordering service”

JPMC 2018: "Note: The QuorumChain consensus algorithm is not yet supported by this release”

Page 5: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for
Page 6: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

BFT Properties

Safety• against f out of (n=3f+1) bad players and against asynchrony• against f out of (n=2f+1) bad players• hybrid

Liveness• against asynchrony, via randmization or GST

Efficient• linear under most conditions• leader based

Page 7: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

7Confidential � ©2018 VMware, Inc.

Page 8: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

8Confidential � ©2018 VMware, Inc.

HotStuff

Page 9: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

9Confidential � ©2018 VMware, Inc.

Chain Quality: maintain linearity against frequent proposer replacement

Safety: Against f out of 3f+1 and against asynchrony

Responsiveness: Advance at the network speed after GST

HotStuff: Three-Step BFT Consensus RulesA simple framework for blockchain BFT protocols

8,000,000,000msgs

Page 10: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

10Confidential � ©2018 VMware, Inc.

Quorum certificate (QC): n-f votes

unique and live

Page 11: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

11Confidential � ©2018 VMware, Inc.

One-chain QCIterate thru views

As leader,

wait for n-f NEWVIEWs,broadcast proposal

wait for n-f votes, broadcast QC

As replica,

send NEWVIEW with locked QC

wait for leader pr until leader timeoutif no lock⌝pr, send vote, lock pr

If receive QC, decide

Page 12: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

12Confidential � ©2018 VMware, Inc.

One-chain QC:

Correct leader reaches decision, And f+1 correct are locked

Incorrect leader leaves locksIs it safe to unlock v? only if n-f have⌝ vNot less? No!If 2f say v and another 2f say v’ which one is safe?Is it live to wait ? No!

Page 13: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

HotStuff

Page 14: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

HotStuff

n-f votes

Page 15: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

HotStuff

Quorum Certificate (QC):(2f+1) of (3f+1) votes

(f+1) good f slow f bad

Page 16: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

HotStuff

Quorum Certificate (QC):(2f+1) of (3f+1) votes

(f+1) good f slow f bad

f votes

f votes

Page 17: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

17Confidential � ©2018 VMware, Inc.

One-chain QC:

Guarantees uniquenessIf you have it, you can prove uniquenessIf you don’t, you cannot convince a proposal is safe

Page 18: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

18Confidential � ©2018 VMware, Inc.

One-chain QC:

What about [DLS88]?

Only a leader decides per viewUnlock during (complex) view-change protocol

Page 19: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

19Confidential � ©2018 VMware, Inc.

Two-chain QC:

Correct leader reaches decision, And f+1 correct are locked holding a QC

Incorrect leader leaves locksIf f+1 don’t have it, safe to unlock

Is it live to wait for f+1 ? Yes!

Page 20: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

20Confidential � ©2018 VMware, Inc.

Two QCIterate through views

As leader,

Unlock-Phase

wait for n-f NEWVIEWsbroadcast proposal with f+1-proof

Phase-1

wait for n-f votes, broadcast QC

Phase-2

wait for n-f votes, broadcast QC[QC]

As replica,

send NEWVIEW with locked QC

wait for leader pr until leader timeoutif received pr, send ACK

wait for leader QC until leader timeoutif received QC, send ACK, lock QC

If receive QC[QC], decide

Page 21: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

21Confidential � ©2018 VMware, Inc.

Two-chain QC:

Guarantees uniquenessIf you have it, you know uniquenessAnd you can prove safety

Page 22: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

22Confidential � ©2018 VMware, Inc.

Two-chain QC:

All communication steps are linear*except unlock step

*with signature-combining, otherwise, quadratic

Page 23: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

23Confidential � ©2018 VMware, Inc.

Two-chain QC:

Tendermint: All communication steps are linearMust wait maximal network delay

Page 24: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

24Confidential � ©2018 VMware, Inc.

oneblock per

period

8,000,000,000msgs

Page 25: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

25Confidential � ©2018 VMware, Inc.

HotStuff

Page 26: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

26Confidential � ©2018 VMware, Inc.

Three-chain QC:

Correct leader reaches decision, And f+1 correct are locked

Correct locked if f+1 hold a QC

Incorrect leader leaves locksThen f+1 have QC, enough to unlock

Is it live to wait for f+1 ? Yes!

Page 27: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

27Confidential � ©2018 VMware, Inc.

Three QCIterate through views

As leader,

Unlock-phase

wait for n-f NEWVIEWsbroadcast proposal with highest lock

Phase-1

wait for n-f votes, broadcast QC

Phase-2

wait for n-f votes, broadcast QC[QC]

Phase-3

wait for n-f votes, broadcast QC[QC[QC]]

As replica,

send NEWVIEW with locked QC

wait for leader pr until leader timeoutif received pr, send vote

wait for leader QC until leader timeoutif received QC, send vote

wait for leader QC[QC] until leader timeoutif received QC[QC]], send vote, lock QC

If receive QC[QC[QC]], decide

Page 28: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

28Confidential � ©2018 VMware, Inc.

Three-chain QC:

All communication steps are linear*No exception!

*with signature-combining, otherwise, quadratic

Page 29: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

BFT solutions resilient against f of n=3f+1 , and against asynchrony

year protocol Chain-quality Responsive notes

1976 PLS Byz. Generals

(synchronous)

1988 DLS O(n3) no1999 PBFT O(n3) yes2007 Zyzzyva O(n3) yes fast track2016 Tendermint,

CasperO(n2) no

2017 ALGORAND O(nM) no sortition2018 SBFT O(n2) yes fast track +

echo

Page 30: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

30Confidential � ©2018 VMware, Inc.

HotStuff: Better and simpler!

Page 31: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

31Confidential � ©2018 VMware, Inc.

Pipelining Three QCIterate through views

As leader,

Unlock-phase

wait for n-f NEWVIEWsbroadcast proposal with highest lock

Phase-1

wait for n-f votes, broadcast QC

Phase-2

wait for n-f votes, broadcast QC[QC]

Phase-3

wait for n-f votes, broadcast QC[QC[QC]]

proposal

QC

QC[QC]

proposal

QC proposal

Page 32: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

32Confidential � ©2018 VMware, Inc.

HotStuff: Pipelined Three QCIterate through views

As leader,

Unlock-phase

wait for n-f NEWVIEWsbroadcast proposal with highest lock

Phase-1

wait for n-f votes, send next leader NEXTVIEW with QC

As replica,

send locked QC

wait for leader pr until leader timeoutif received pr, send vote

for highest QC[QC]], lock QC

for highest QC[QC[QC]], decide

As next leader

Wait for NEXTVIEW until leader timeout

Page 33: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

HotStuff

Page 34: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

one-chain2f+1 votes on a unique block

Page 35: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

two-chain

every 2f+1 nodes know there is a unique block2f+1 votes on a unique block

Page 36: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

three-chain

every 2f+1 nodes know there is a unique block2f+1 votes on a unique block

every one of 2f+1 nodes can convince it is unique

Page 37: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

37Confidential � ©2018 VMware, Inc.

DLS [Dwork Lynch Stockmeyer, 1988] PBFT [Castro and Liskov, 1999]

Δ Δ

Tendermint [Buchman 2016]

Δ Δ

Casper [Buterin and Griffin, 2017]

Page 38: HotStuff: Three-step Rule! · 2019-06-19 · Amir etal, 2011: “faulty processors can significantly degrade the ... Two QC Iterate through views As leader, Unlock-Phase wait for

HotStuff [Yin, Malkhi, Reiter, Gueta, Abraham 2018]

https://arxiv.org/abs/1803.05069Open-source code coming soon