Hybrid Consensus: Incorporating BFT into Longest-Chain Protocols

 
Longest-chain Protocol Meets BFT
Finality gadgets, CAP Theorem and More!
 
ECE 598 PV: Principles of Blockchains
Prof. Pramod Viswanath
Lecture 16: March 23, 2021
Suryanarayana Sankagiri
 
The Story So Far
 
Two families
 
Blockchain Protocols
 
Safety: 
all parties have the same ledger
 
Liveness: 
the ledger keeps growing
 
Longest-chain (Bitcoin):
 
BFT-style (HotStuff):
 
permissionless
 
permissioned
 
unsafe in asynchrony
 
safe under asynchrony
 
TRADEOFFS!
TRADEOFFS!
 
Best of Both
Worlds?
 
Tradeoffs!
 
Today’s Lecture
 
Incorporating BFT into Longest-Chain Protocols
 
New Protocols
 
Impossibility Results
 
Broader Perspective of Distributed Systems
 
Hybrid Consensus
 
Finality Gadgets
 
CAP Theorem
 
Hybrid Consensus
 
Longest-chain protocol is slow to confirm txns
 
Can we have fast confirmation in a PoW permissionless system?
 
Idea: 
Bring HotStuff to PoW for fast confirmation!
 
Need decentralized, fair committee election
 
Hybrid Consensus
 
Longest-chain protocol can serve as committee election mechanism
A fool-proof, fair, decentralized method!
pk
1
pk
2
pk
3
pk
5
pk
6
pk
7
pk
9
pk
10
pk
8
pk
4
 
committee
public
key
 
Hybrid Consensus
 
Can’t stop mining!
Adversary can upend longest chain if honest miners stop
Committee overturned 
 insecure protocol
Chain quality matters!
1/3 mining adversary 
 ½ adversary in committee. Cannot tolerate!
Need Fruitchains instead of Nakamoto consensus for ideal chain quality
Susceptible to adaptive corruption
Committee is all-powerful; block proposers are no longer unpredictable!
Committee rotation protects against slow adaptive corruption
 
Some finer details
 
Hybrid Consensus
 
What it achieves
 
Where it fails
 
asynchrony
 
offline users
 
It achieves low confirmation latency in a PoW (permissionless) setting
 
Needed for
responsiveness
Finality gadgets overcome
these drawbacks
 
loses safety
 
stalls
 
Towards Finality Gadgets
 
A protocol that remains live and safe, despite variable participation
PoW longest chain has this property
longest chain should work, even if BFT component is turned on/off arbitrarily
 
A protocol that remains safe, despite asynchrony
BFT protocol has this property
longest chain should work
 
What we desire
 
Finality Gadget
 
Two-layer design
 
 
Longest chain protocol produces and confirms blocks
Works with variable participation
k
-deep rule remains viable
 
BFT protocol independently confirms blocks
Confirms the same set of blocks as produced by PoW!
Switches on or off based on participation level
 
Layer-one: Proof-of-Work Longest Chain
 
Layer-two: Committee-based BFT protocol
 
Finality Gadget – Checkpoints
 
fixed committee executes layer-two BFT protocol
call them 
checkpointers
 
blocks produced by
PoW mining
treat a checkpointed block as final
 
block 
checkpointed
 by
votes from BFT protocol
 
Rules of Checkpointing
 
Checkpoint blocks on the same chain
 
 
Checkpoint blocks on the longest chain
 
 
Checkpoint blocks close to the tip
 
If not, safety violation!
 
If not, liveness violation!
 
If not, checkpointing not of
much use
 
More about Checkpointing
 
Input values
In theory: 
entire chain leading up to prospective checkpoint block
In practice: 
hash of prospective checkpoint block
 
Validity conditions
Classical: 
if all honest users have same input, that input is finalized
For gadgets: 
if all honest users have chains with a 
k-
common prefix, then
finalized block is on common prefix
 
Checkpointing protocol is a 
consensus engine
 
Two-layer design does not work!
 
Players must follow 
longest
checkpointed chain 
rule
 
Extend the longest chain
below the latest
checkpoint block
 
resume
synchrony
 
period of
asynchrony
 
side-chain of
blocks mined
by adversary
 
all miners
mine here
 
Finality Gadget
 
What it achieves
 
Safety under asynchrony
 
Faster confirmation? Requires confirming blocks 
at tip
. [
GRANDPA]
 
Safety and liveness under variable participation? Requires confirming 
k-deep
blocks
. [
Checkpointed Longest Chain,  Ebb-and-Flow]
 
 
Open problem: achieve all three properties
 
Finality Gadget – Two Confirmation Rules
 
Adaptive rule 
(
k
-deep rule)
Remains live and safe under variable participation
Requires synchrony for liveness and safety
 
Finality-preserving rule 
(checkpoint-based rule)
Remains safe under all conditions
Is live only under synchrony and fixed participation
 
Each rule generates its own ledger!
 
One ledger offering adaptivity and finality?
 
The Blockchain CAP Theorem
 
No blockchain protocol can be adaptive and offer finality. [LR, 2020]
 
A decentralized protocol cannot distinguish between offline users and network partition
 
network partition
 
protocol should stall
 
offline users
 
online users should continue
 
CAP Theorem in Blockchains
 
Availability-favoring
 
Consistency-
favoring
 
Network partition
 
Dynamic participation
 
The CAP Theorem
 
Theorem: 
A distributed system cannot be both 
C
onsistent and 
A
vailable
during network 
P
artitions (
Brewer 2000, Gilbert & Lynch 2002
)
 
Choose liveness or safety during network partition!
 
Going around the CAP Theorem
 
Best-effort availability
files in a data center
 
Typically uses a consensus protocol in the back-end
 
Best-effort consistency
Web content
 
No guarantee that the content retrieved is the latest
 
Going around the CAP Theorem
 
Consistency-critical applications may also need to have availability!
 
Design principle: 
explicit partition mode, correct for consistency after
partition heals
 
Going around the CAP Theorem
 
Data/Query partitioning
e-commerce example
 
Geographic/User Partitioning
Craigslist example
 
Blockchains
Dual-ledger design
 
Other Implications of CAP theorem
 
Lower bounds on
 
fault tolerance
 
latency
 
Slide Note
Embed
Share

Today's lecture discussed the integration of BFT into longest-chain protocols, introducing new hybrid consensus models and finality gadgets. By combining HotStuff with PoW, the system aims to achieve fast transaction confirmation while maintaining decentralization and fairness in the committee election process.

  • Hybrid Consensus
  • BFT
  • Longest-Chain Protocols
  • Finality Gadgets
  • Distributed Systems

Uploaded on Oct 01, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Longest-chain Protocol Meets BFT Finality gadgets, CAP Theorem and More! ECE 598 PV: Principles of Blockchains Prof. Pramod Viswanath Lecture 16: March 23, 2021 Suryanarayana Sankagiri

  2. The Story So Far Safety: all parties have the same ledger Blockchain Protocols Liveness: the ledger keeps growing Longest-chain (Bitcoin): permissionless unsafe in asynchrony Two families BFT-style (HotStuff): permissioned safe under asynchrony TRADEOFFS!

  3. Tradeoffs! Best of Both Worlds?

  4. Todays Lecture Incorporating BFT into Longest-Chain Protocols New Protocols Hybrid Consensus Finality Gadgets Impossibility Results CAP Theorem Broader Perspective of Distributed Systems

  5. Hybrid Consensus Longest-chain protocol is slow to confirm txns Can we have fast confirmation in a PoW permissionless system? Idea: Bring HotStuff to PoW for fast confirmation! Need decentralized, fair committee election

  6. Hybrid Consensus public key pk8 pk1 pk2 pk3 pk5 pk6 pk7 pk9 pk10 pk4 committee Longest-chain protocol can serve as committee election mechanism A fool-proof, fair, decentralized method!

  7. Hybrid Consensus Some finer details Can t stop mining! Adversary can upend longest chain if honest miners stop Committee overturned insecure protocol Chain quality matters! 1/3 mining adversary adversary in committee. Cannot tolerate! Need Fruitchains instead of Nakamoto consensus for ideal chain quality Susceptible to adaptive corruption Committee is all-powerful; block proposers are no longer unpredictable! Committee rotation protects against slow adaptive corruption

  8. Hybrid Consensus What it achieves It achieves low confirmation latency in a PoW (permissionless) setting Where it fails asynchrony offline users ? > 1/3 loses safety stalls Needed for responsiveness Finality gadgets overcome these drawbacks

  9. Towards Finality Gadgets What we desire A protocol that remains live and safe, despite variable participation PoW longest chain has this property longest chain should work, even if BFT component is turned on/off arbitrarily A protocol that remains safe, despite asynchrony BFT protocol has this property longest chain should work

  10. Finality Gadget Layer-one: Proof-of-Work Longest Chain Two-layer design Layer-two: Committee-based BFT protocol Longest chain protocol produces and confirms blocks Works with variable participation k-deep rule remains viable BFT protocol independently confirms blocks Confirms the same set of blocks as produced by PoW! Switches on or off based on participation level

  11. Finality Gadget Checkpoints block checkpointed by votes from BFT protocol blocks produced by PoW mining treat a checkpointed block as final fixed committee executes layer-two BFT protocol call them checkpointers

  12. Rules of Checkpointing Checkpoint blocks on the same chain If not, safety violation! Checkpoint blocks on the longest chain If not, liveness violation! Checkpoint blocks close to the tip If not, checkpointing not of much use

  13. More about Checkpointing Checkpointing protocol is a consensus engine Input values In theory: entire chain leading up to prospective checkpoint block In practice: hash of prospective checkpoint block Validity conditions Classical: if all honest users have same input, that input is finalized For gadgets: if all honest users have chains with a k-common prefix, then finalized block is on common prefix

  14. Two-layer design does not work! Players must follow longest checkpointed chain rule period of asynchrony resume synchrony Extend the longest chain below the latest checkpoint block side-chain of blocks mined by adversary all miners mine here

  15. Finality Gadget What it achieves Safety under asynchrony Faster confirmation? Requires confirming blocks at tip. [GRANDPA] Safety and liveness under variable participation? Requires confirming k-deep blocks. [Checkpointed Longest Chain, Ebb-and-Flow] Open problem: achieve all three properties

  16. Finality Gadget Two Confirmation Rules Adaptive rule (k-deep rule) Remains live and safe under variable participation Requires synchrony for liveness and safety Finality-preserving rule (checkpoint-based rule) Remains safe under all conditions Is live only under synchrony and fixed participation Each rule generates its own ledger!

  17. One ledger offering adaptivity and finality?

  18. The Blockchain CAP Theorem No blockchain protocol can be adaptive and offer finality. [LR, 2020] C C C A A A offline users B B B D D D network partition protocol should stall online users should continue A decentralized protocol cannot distinguish between offline users and network partition

  19. CAP Theorem in Blockchains Availability-favoring Consistency- favoring available during synchrony inconsistent Network partition INDISTINGUISHABLE TRADE-OFF available during full participation Dynamic participation consistent

  20. The CAP Theorem Theorem: A distributed system cannot be both Consistent and Available during network Partitions (Brewer 2000, Gilbert & Lynch 2002) peer 2 peer 1 peer 2 peer 1 y x x x write y read write y x done client client Choose liveness or safety during network partition!

  21. Going around the CAP Theorem Best-effort availability files in a data center Typically uses a consensus protocol in the back-end Best-effort consistency Web content No guarantee that the content retrieved is the latest

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#