ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu
Consensus Protocols of
Hyperledger Besu
2020. 02. 13.
Jeongwhan Choi
1Jeongwhan Choi
IBFT2.0 & Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 2
Hyperledger Besu Architecture
? Hyperledger Besu:
? ??? consensus algorithm? ??
Jeongwhan Choi
The high-level architecture
of Hyperledger Besu is:
https://besu.hyperledger.org/en/stable/Concepts/ArchitectureOverview/
consortium network
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 3
Contents
? PBFT
? IBFT
? Clique
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 4
Problem - PoW
? Non-finality:
? Confirmations are required.
? Fork is possible.
? Low throughput:
? Long block time Low transaction per second (TPS)
? Ethash (Ghost) can only support 3~15 seconds per block.
? Lack of governance:
? Too open: every node can be miner.
? Extra effort are required for blockchain management.
? High power consumption.
? Miners are competing on block generation.
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 5
Consortium Chain + PBFT
? Pros:
? Instant finality: No confirmation required.
? High throughput: No extra waiting time is necessary (v.s. ethash).
? Low power consumption.
? Node scalability. (should be the same as ethash)
? Governance: Manageable validator set.
? Academic proof.
? Cons:
? Validator scalability: 20 ~ 30 nodes. (generally not an issue in
consortium chain)
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu
PBFT
(Practical Byzantine Fault Tolerance)
6Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 7
PBFT
? Byzantine General Problem? ???? ??
? ??? ???? ???? Safety? Liveness? ?? ???
???? ?? ????? ???? ?? ???
? Blockchain: ??? ????
? ¨¤ ??? ?????? ??? ?? ????? ???? ??
Jeongwhan Choi
¡°???? ?? ???? ???? ?? ???
??? ???? ??? ?? ??? ¡°
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 8
PBFT
? PBFT(Practical Byzantine Fault Tolerance)
? Safety? ???? Liveness? ?? ??
? ??? ??????? ??? ?? ? ?? ????
? ??? ?????? Byzantine node? f ? ?? ?,
? ? ?? ??? 3f+1? ??
¨¤ ?? ?????? ????? ??? ??? ? ??? ??
????? ??? ????
? e.g. 4?? ????? 1?? Byzantine node?? ????? ??
? ????? ?? ??? ??? ?? ?? ??? ??? ??? ???
?? ??? ?? ??
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 9
PBFT ¨C ?? ??
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 10
PBFT - ?? ??
Jeongwhan Choi
? Client? ????? ?? Request ??? Primary ??? ??
? ??? ? ????(Primary) ?? Byzantine? ? ? ??
? Byzantine? ?, ??? ????? ???? ?
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 11
PBFT - ?? ??
Jeongwhan Choi
? Primary ??? ?? ?? ????? Pre-Prepare ???? ??
? ? ????? ????? ?? ????, ?? ???? ?? ? ? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 12
PBFT - ?? ??
Jeongwhan Choi
? ??? ?? ?? ????? ???? Prepare ???? ?? ????? ??
? ??? ?? ???? Prepare ??? 2f? ?? ???, Prepared ??
? ?? ?? ???? 3??? 2?? ???? ??? ?
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 13Jeongwhan Choi
? Prepare ??? 2f? ???, Commit ???? ??
? ?? ???? ?? Commit ???? ??? ???? 2f+1?? ??? ???
PBFT - ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 14Jeongwhan Choi
? Commit ??? ??? ???? Client?? Reply? ??
? f+1? ??? ??? ??? ??? Client ? ?? ???? ?????
?????? ??? ??? ??? ?? ??
PBFT - ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 15Jeongwhan Choi
[1] ?????? ?? ??? ???? request ???? Primary Node? ??
[2] Primary? request ??? ??? ?? pre-prepare?? ??? ??
[3] ???? ? ??? Backup ?? i? pre-prepare ???? ?? ??
?? ??? ?: prepare ???? ??? ????? ??? ?? ???? ??
?? ??? ??: pre-prepare ???? ???? ??
PBFT - ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 16Jeongwhan Choi
[4] ??? ??? pre-prepare ???? prepare ???? ??
pre-prepare ???: 2f+1? ??
prepare ???: 2f? ??
[5] "prepared certificate" ??? ??? ??: ?? ???? commit ??? ??
[6] ??? ??? commit ???? ??
commit ???: 2f+1? ¨¤ ?? ??? "commit certificate"??
PBFT - ?? ??
"prepared certificate"
?? ??: "prepared the request" ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 17Jeongwhan Choi
PBFT - ?? ??
¡°prepared certificate¡±
?? ??: ¡±committed certificate¡±
¡°commit certificate¡±
Client? ??? request? ??? ???? ?? ??
?? ?? Safety ??
Liveness ?? ??request ???? ?? ???
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu
IBFT
(Istanbul BFT)
Jeongwhan Choi 18
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 19
IBFT
? Istanbul Byzantine Fault Tolerance
? BFT ?? ??
? PBFT? ??? ???? ??? ??? ????? ??? ??
? Immediate Finality ??
? Transaction? ??? block? ???? ?? blockchain? ???? ??
? Fork ?? Chain ???? ??
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 20
IBFT
Jeongwhan Choi
? ?? ???
? ??? ??? ??? ???? ?? ¡±client¡±? ?? (?? validator? client? ??)
? ? round?? ????? proposer? ??
? ?? ???? ??? ??? ?? ?? ?? (Public key ??)
? ? ?? ??? ?? file system? ?? read/write op? ??? ?? ??? ???
block? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 21
IBFT
? 3??? ?? ??
? Pre-Prepare: Proposer proposes a block
? Prepare: Validators agree on block
? Commit: Validators agree on commit
? ???? ? ???? 3F+1???? ??? ? ??
? N = 3F +1 ( N= node, F = faulty node)
? Validator: ??? ????? ??
? Validator?? ??? ?????(? round ?)? proposer? ??
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 22
IBFT ¨C ?? ??
Jeongwhan Choi
1. ? ?? ?? Proposer? ????, Proposer? ?????? ??? block? ??
2. block ? ?? ???(validator)?? ??
3. block ? ?? ????, ?? block ? ???? ??
? ?? ???? ??? ????? ??
4. ???? block ? ??
? ????? ?? ???? ?? ????, ?? 2/3??? ?????, ?
??? ???? ???? ????, ??? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 23Jeongwhan Choi
Propose ??
proposer ? ??? ??? ???? ??
Proposer proposes a block
IBFT ¨C ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 24Jeongwhan Choi
Pre-prepare ??
??? block? pre-prepare ???? ?? ??
Pre-prepare message
IBFT ¨C ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 25Jeongwhan Choi
Prepare ??
Validator?? proposer??? pre-prepare ???? ??? pre-prepare ???
???? prepare ???? ???.
? ??? ?? Validator ?? ?? Round, ?? ??? ??? ???? ??
Prepare message
IBFT ¨C ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 26Jeongwhan Choi
Prepare ??
2F+1 ? prepare ???? ??? ????? prepare ??? ??
Prepared when i receives 2f
prepares that match pre-prepares.
IBFT ¨C ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 27Jeongwhan Choi
Commit ??
prepare ??? ???? commit ???? ??
Commit message
IBFT ¨C ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 28Jeongwhan Choi
Committed ??
? ??? ??? block? ???????? peer??? ??? ??
??? block? ??? ??
2F+1 ? commit ???? ??? commit ??? ??
??? ??? ??
Committed
If prepare(i) and received 2f+1 commits
IBFT ¨C ?? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 29
State Machine
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 30
State Machine ¨C Round Change
Jeongwhan Choi
??? ??? ?? Round change? ??? ?? round ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 31
State Machine ¨C Round Change
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 32
IBFT 1.0 to 2.0
Jeongwhan Choi
? Blockchain? ??? height?? commit? ?? block? ?? ? ??
? e.g. IBFT 1.0?? 5 validators? ??? ?? block ? Blockchain? ???? ?? 3
?? node? ???? ?
IBFT 1.0?? proposer? Byzantine ? ??:
¨¤ ? ??? validator? ???? ?? ??? ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 33
IBFT 1.0 to 2.0
Jeongwhan Choi
? super-majority modification: ??? ???? ? ??? node ?? ??
? e.g. 5 validators? ???? IBFT 2.0??? block? blockchain? ????
?? block ? ?? ??? ????? 4 validator? ??
? round change modification: IBFT 1.0? liveness ??? ??
? IBFT 1.0: round change? ?? ??? block propose? ??
? IBFT 2.0: validator? round?? commit?? ?? ?? round?? propose?
block? commit ? block? ????? ?
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu
Clique
Jeongwhan Choi 34
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 35
Clique
? Clique? Geth?? ??? PoA(Proof of Authority)
? Rinkeby testnet?? ??
? Fault Tolerance: Validator? ?? ??
? Transaction ? block? ??? ??(signer)? ?? ??
? signer? ???? ?? ??? ??
? ?? signers ? signer? ????? ???? ?? ???? ??
? Immediate Finality ???? ?? (Fork ??)
Jeongwhan Choi
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 36
Clique
Jeongwhan Choi
? ? ? ?? ??? ? block? ??? ? ?? Round? ?? (Block Proposal)
? Clique? ??? ??? Aura? ?? ??? (Block Acceptance)? ??
? Clique? ? ???? leader? block? ?? authorities?? ?? chain? commit
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 37
Clique
Jeongwhan Choi
? ? ? ?? ??? ? block? ??? ? ?? Round? ?? (Block Proposal)
? Clique? ??? ??? IBFT? ???? ?? ?? (Pre-Prepare¡­)
? Clique? ? ???? leader? block? ?? authorities?? ?? chain? commit
IBFT
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 38
Clique
Jeongwhan Choi
? ????? ?? ??? commit? block ???? ?? ???? epoch?
??
? ??? epoch? ???? ??? transition block? ??
? authority set? ???? ??????? ??? authority? ?? ??
?? ??? ?? ??? ??? ? ??
? Block? propose ? ? ?? authorities: ?? N-(N / 2 + 1)
? N-(N/2+1)=3 authorities?? ?
step?? block ?? ??
? ? ? ??? leader ??
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 39
Clique
Jeongwhan Choi
? ? ???? ? ?? authorities? ??? ??? ? ???? Fork ???
? ??
? Fork ?? ? GHOST ???? ??
? Block Scoring ??
? Leaders¡¯ block? ? ?? score? ???? Fork ??
A fork occurring in Clique.
a4? a3? ? ?? block ?? ??? ??? ????? ??, a5? a2? ??? ??? ??? ??
??, a4? a3? ??? ??? a2? ??? ???? (a2? score? ? ???)
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 40
IBFT2.0 vs. Clique
Jeongwhan Choi
IBFT 2.0
(Istanbul
BFT)
Clique
?? IBFT 2.0 Clique
Immediate finality O X(Fork ??)
min No. validators 4 validators Single
Speed Slow
(Node ? ?? ? ?? ?)
Fast
(Node ? ?? Fork ?? ??)
A group of nodes Validators Signers
1.Introduction 2.PBFT 3.IBFT 4.Clique
JEONBUK
NATIONAL UNIVERSITY
Consensus Protocols of Hyperledger Besu 41Jeongwhan Choi
Thank you

More Related Content

Consensus Protocols of Hyperledger Besu: IBFT2.0 & Clique

  • 1. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu Consensus Protocols of Hyperledger Besu 2020. 02. 13. Jeongwhan Choi 1Jeongwhan Choi IBFT2.0 & Clique
  • 2. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 2 Hyperledger Besu Architecture ? Hyperledger Besu: ? ??? consensus algorithm? ?? Jeongwhan Choi The high-level architecture of Hyperledger Besu is: https://besu.hyperledger.org/en/stable/Concepts/ArchitectureOverview/ consortium network 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 3. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 3 Contents ? PBFT ? IBFT ? Clique Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 4. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 4 Problem - PoW ? Non-finality: ? Confirmations are required. ? Fork is possible. ? Low throughput: ? Long block time Low transaction per second (TPS) ? Ethash (Ghost) can only support 3~15 seconds per block. ? Lack of governance: ? Too open: every node can be miner. ? Extra effort are required for blockchain management. ? High power consumption. ? Miners are competing on block generation. Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 5. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 5 Consortium Chain + PBFT ? Pros: ? Instant finality: No confirmation required. ? High throughput: No extra waiting time is necessary (v.s. ethash). ? Low power consumption. ? Node scalability. (should be the same as ethash) ? Governance: Manageable validator set. ? Academic proof. ? Cons: ? Validator scalability: 20 ~ 30 nodes. (generally not an issue in consortium chain) Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 6. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu PBFT (Practical Byzantine Fault Tolerance) 6Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 7. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 7 PBFT ? Byzantine General Problem? ???? ?? ? ??? ???? ???? Safety? Liveness? ?? ??? ???? ?? ????? ???? ?? ??? ? Blockchain: ??? ???? ? ¨¤ ??? ?????? ??? ?? ????? ???? ?? Jeongwhan Choi ¡°???? ?? ???? ???? ?? ??? ??? ???? ??? ?? ??? ¡° 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 8. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 8 PBFT ? PBFT(Practical Byzantine Fault Tolerance) ? Safety? ???? Liveness? ?? ?? ? ??? ??????? ??? ?? ? ?? ???? ? ??? ?????? Byzantine node? f ? ?? ?, ? ? ?? ??? 3f+1? ?? ¨¤ ?? ?????? ????? ??? ??? ? ??? ?? ????? ??? ???? ? e.g. 4?? ????? 1?? Byzantine node?? ????? ?? ? ????? ?? ??? ??? ?? ?? ??? ??? ??? ??? ?? ??? ?? ?? Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 9. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 9 PBFT ¨C ?? ?? Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 10. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 10 PBFT - ?? ?? Jeongwhan Choi ? Client? ????? ?? Request ??? Primary ??? ?? ? ??? ? ????(Primary) ?? Byzantine? ? ? ?? ? Byzantine? ?, ??? ????? ???? ? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 11. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 11 PBFT - ?? ?? Jeongwhan Choi ? Primary ??? ?? ?? ????? Pre-Prepare ???? ?? ? ? ????? ????? ?? ????, ?? ???? ?? ? ? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 12. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 12 PBFT - ?? ?? Jeongwhan Choi ? ??? ?? ?? ????? ???? Prepare ???? ?? ????? ?? ? ??? ?? ???? Prepare ??? 2f? ?? ???, Prepared ?? ? ?? ?? ???? 3??? 2?? ???? ??? ? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 13. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 13Jeongwhan Choi ? Prepare ??? 2f? ???, Commit ???? ?? ? ?? ???? ?? Commit ???? ??? ???? 2f+1?? ??? ??? PBFT - ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 14. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 14Jeongwhan Choi ? Commit ??? ??? ???? Client?? Reply? ?? ? f+1? ??? ??? ??? ??? Client ? ?? ???? ????? ?????? ??? ??? ??? ?? ?? PBFT - ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 15. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 15Jeongwhan Choi [1] ?????? ?? ??? ???? request ???? Primary Node? ?? [2] Primary? request ??? ??? ?? pre-prepare?? ??? ?? [3] ???? ? ??? Backup ?? i? pre-prepare ???? ?? ?? ?? ??? ?: prepare ???? ??? ????? ??? ?? ???? ?? ?? ??? ??: pre-prepare ???? ???? ?? PBFT - ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 16. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 16Jeongwhan Choi [4] ??? ??? pre-prepare ???? prepare ???? ?? pre-prepare ???: 2f+1? ?? prepare ???: 2f? ?? [5] "prepared certificate" ??? ??? ??: ?? ???? commit ??? ?? [6] ??? ??? commit ???? ?? commit ???: 2f+1? ¨¤ ?? ??? "commit certificate"?? PBFT - ?? ?? "prepared certificate" ?? ??: "prepared the request" ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 17. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 17Jeongwhan Choi PBFT - ?? ?? ¡°prepared certificate¡± ?? ??: ¡±committed certificate¡± ¡°commit certificate¡± Client? ??? request? ??? ???? ?? ?? ?? ?? Safety ?? Liveness ?? ??request ???? ?? ??? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 18. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu IBFT (Istanbul BFT) Jeongwhan Choi 18 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 19. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 19 IBFT ? Istanbul Byzantine Fault Tolerance ? BFT ?? ?? ? PBFT? ??? ???? ??? ??? ????? ??? ?? ? Immediate Finality ?? ? Transaction? ??? block? ???? ?? blockchain? ???? ?? ? Fork ?? Chain ???? ?? Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 20. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 20 IBFT Jeongwhan Choi ? ?? ??? ? ??? ??? ??? ???? ?? ¡±client¡±? ?? (?? validator? client? ??) ? ? round?? ????? proposer? ?? ? ?? ???? ??? ??? ?? ?? ?? (Public key ??) ? ? ?? ??? ?? file system? ?? read/write op? ??? ?? ??? ??? block? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 21. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 21 IBFT ? 3??? ?? ?? ? Pre-Prepare: Proposer proposes a block ? Prepare: Validators agree on block ? Commit: Validators agree on commit ? ???? ? ???? 3F+1???? ??? ? ?? ? N = 3F +1 ( N= node, F = faulty node) ? Validator: ??? ????? ?? ? Validator?? ??? ?????(? round ?)? proposer? ?? Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 22. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 22 IBFT ¨C ?? ?? Jeongwhan Choi 1. ? ?? ?? Proposer? ????, Proposer? ?????? ??? block? ?? 2. block ? ?? ???(validator)?? ?? 3. block ? ?? ????, ?? block ? ???? ?? ? ?? ???? ??? ????? ?? 4. ???? block ? ?? ? ????? ?? ???? ?? ????, ?? 2/3??? ?????, ? ??? ???? ???? ????, ??? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 23. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 23Jeongwhan Choi Propose ?? proposer ? ??? ??? ???? ?? Proposer proposes a block IBFT ¨C ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 24. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 24Jeongwhan Choi Pre-prepare ?? ??? block? pre-prepare ???? ?? ?? Pre-prepare message IBFT ¨C ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 25. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 25Jeongwhan Choi Prepare ?? Validator?? proposer??? pre-prepare ???? ??? pre-prepare ??? ???? prepare ???? ???. ? ??? ?? Validator ?? ?? Round, ?? ??? ??? ???? ?? Prepare message IBFT ¨C ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 26. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 26Jeongwhan Choi Prepare ?? 2F+1 ? prepare ???? ??? ????? prepare ??? ?? Prepared when i receives 2f prepares that match pre-prepares. IBFT ¨C ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 27. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 27Jeongwhan Choi Commit ?? prepare ??? ???? commit ???? ?? Commit message IBFT ¨C ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 28. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 28Jeongwhan Choi Committed ?? ? ??? ??? block? ???????? peer??? ??? ?? ??? block? ??? ?? 2F+1 ? commit ???? ??? commit ??? ?? ??? ??? ?? Committed If prepare(i) and received 2f+1 commits IBFT ¨C ?? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 29. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 29 State Machine Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 30. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 30 State Machine ¨C Round Change Jeongwhan Choi ??? ??? ?? Round change? ??? ?? round ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 31. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 31 State Machine ¨C Round Change Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 32. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 32 IBFT 1.0 to 2.0 Jeongwhan Choi ? Blockchain? ??? height?? commit? ?? block? ?? ? ?? ? e.g. IBFT 1.0?? 5 validators? ??? ?? block ? Blockchain? ???? ?? 3 ?? node? ???? ? IBFT 1.0?? proposer? Byzantine ? ??: ¨¤ ? ??? validator? ???? ?? ??? ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 33. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 33 IBFT 1.0 to 2.0 Jeongwhan Choi ? super-majority modification: ??? ???? ? ??? node ?? ?? ? e.g. 5 validators? ???? IBFT 2.0??? block? blockchain? ???? ?? block ? ?? ??? ????? 4 validator? ?? ? round change modification: IBFT 1.0? liveness ??? ?? ? IBFT 1.0: round change? ?? ??? block propose? ?? ? IBFT 2.0: validator? round?? commit?? ?? ?? round?? propose? block? commit ? block? ????? ? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 34. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu Clique Jeongwhan Choi 34 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 35. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 35 Clique ? Clique? Geth?? ??? PoA(Proof of Authority) ? Rinkeby testnet?? ?? ? Fault Tolerance: Validator? ?? ?? ? Transaction ? block? ??? ??(signer)? ?? ?? ? signer? ???? ?? ??? ?? ? ?? signers ? signer? ????? ???? ?? ???? ?? ? Immediate Finality ???? ?? (Fork ??) Jeongwhan Choi 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 36. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 36 Clique Jeongwhan Choi ? ? ? ?? ??? ? block? ??? ? ?? Round? ?? (Block Proposal) ? Clique? ??? ??? Aura? ?? ??? (Block Acceptance)? ?? ? Clique? ? ???? leader? block? ?? authorities?? ?? chain? commit 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 37. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 37 Clique Jeongwhan Choi ? ? ? ?? ??? ? block? ??? ? ?? Round? ?? (Block Proposal) ? Clique? ??? ??? IBFT? ???? ?? ?? (Pre-Prepare¡­) ? Clique? ? ???? leader? block? ?? authorities?? ?? chain? commit IBFT 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 38. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 38 Clique Jeongwhan Choi ? ????? ?? ??? commit? block ???? ?? ???? epoch? ?? ? ??? epoch? ???? ??? transition block? ?? ? authority set? ???? ??????? ??? authority? ?? ?? ?? ??? ?? ??? ??? ? ?? ? Block? propose ? ? ?? authorities: ?? N-(N / 2 + 1) ? N-(N/2+1)=3 authorities?? ? step?? block ?? ?? ? ? ? ??? leader ?? 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 39. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 39 Clique Jeongwhan Choi ? ? ???? ? ?? authorities? ??? ??? ? ???? Fork ??? ? ?? ? Fork ?? ? GHOST ???? ?? ? Block Scoring ?? ? Leaders¡¯ block? ? ?? score? ???? Fork ?? A fork occurring in Clique. a4? a3? ? ?? block ?? ??? ??? ????? ??, a5? a2? ??? ??? ??? ?? ??, a4? a3? ??? ??? a2? ??? ???? (a2? score? ? ???) 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 40. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 40 IBFT2.0 vs. Clique Jeongwhan Choi IBFT 2.0 (Istanbul BFT) Clique ?? IBFT 2.0 Clique Immediate finality O X(Fork ??) min No. validators 4 validators Single Speed Slow (Node ? ?? ? ?? ?) Fast (Node ? ?? Fork ?? ??) A group of nodes Validators Signers 1.Introduction 2.PBFT 3.IBFT 4.Clique
  • 41. JEONBUK NATIONAL UNIVERSITY Consensus Protocols of Hyperledger Besu 41Jeongwhan Choi Thank you