SlideShare a Scribd company logo
An Implementation of BFT
Consensus for Ethereum
--Adding BFT Consensus to Geth
Kung Chen, Tung-Wei Kuo
Yi-Chun Hsu, Ming-Chuan Lin
National Cheng-Chi University,
Taipei, TAIWAN
March 30, 2017
以太坊亞洲巡迴交流會:台灣
Ethereum Asia Tour: Taiwan
政大資科系區塊鏈團隊
Outline
• Project Background
• Project Status
• Our BFT Consensus Protocol
• Preliminary Performance Test Results
Project Background
• Launched in July 2016, the initial goal is to develop a
variant of geth with Byzantine Fault Tolerant (BFT)
consensus based on the approach of HydraChain (based
on pyethapp).
• A step towards developing a framework of pluggable
consensus protocols for Geth.
• Ended up with a PBFT-like consensus algorithm, as the
safety and liveness properties of HydraChain consensus
algorithm may not hold in the presence of Byzantine
faulty nodes.
Project Status
• Implementation: Keep the changes to geth as small as
possible.
• Add a BFTProtocolManager to geth.
Use cmd-line-arguments to turn on the BFT
consensus protocol.
• Geth –bft –num-validators 4 –node-num 1
• Disable gas limit check when BFT mode is turned on
• Alpha testing now, beta release under preparation.
• AMIS is now testing an earlier version of January.
From HydraChain
to Our Consensus Protocol
Commit block 𝐵𝐵
if a quorum for 𝐵𝐵
is intercepted
Quorum for block 𝐵𝐵:
+⅔ of all nodes vote
for block 𝐵𝐵
Proposer broadcasts
a proposal
HydraChain at a High Level
Propose
Intercept
Quorum
Commit
Every node broadcasts
its vote
Vote
Propose
1
3 4 5
Propose 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏
Propose 𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟
Proposer
Byzantine fault node
2 Byzantine fault node
6
7
Vote
1
3 4 5
Vote 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏
Vote 𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟
Proposer
Byzantine fault node
2 Byzantine fault node
6
7
Vote
1
2
4 5
6
7
Proposer
Byzantine fault node
Byzantine fault node
3
received before timeout
received after timeout
Vote
1
2
Proposer
Byzantine fault node
Byzantine fault node
3
received before timeout
received after timeout
54
6
7
Intercept Quorum
1
2
4 5
6
7
Proposer
Byzantine fault node
Byzantine fault node
5 > 7 × �2
3
Node 3 intercepts a quorum
and commits 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏
3
The Result
• Only node 3 commits block 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏
• Other nodes cannot commit a block
• Moreover, other nodes receive more votes for
𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟 than 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏
• In the future, other nodes might commit block
𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟, instead of block 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏
• Safety is threatened
Our Consensus Protocol
at a High Level
Propose
Intercept
Quorum
Commit
Vote
Precommit
If I commit a block,
then +⅓ non-faulty nodes
will back me up
(even if the next proposer conflicts with me)
Our Consensus Protocol
at a High Level
Propose
Intercept
Quorum
Commit
Vote
Precommit
Commit block 𝐵𝐵
if +⅔ nodes intercepts quorum for 𝐵𝐵
Our Consensus Protocol
at a High Level
Precommit
Other 4 steps are also updated
Propose*
Intercept
Quorum*
Commit*
Vote*
Consensus flow
New
height
Propose
Vote Nil
Vote
Block
Precommit
Nil
New
Round
Wait for
Precommit
+⅔
Wait
for
votes
from
+⅔
If +⅔ nodes intercepts
quorum for 𝐵𝐵
If a quorum for 𝐵𝐵
is intercepted Precommit
Block
Commit
Future Directions
1. Detecting certain types of Byzantine faults
2. Fine-tuning the parameters in consensus
algorithms
Preliminary Performance
Test Results
Test Environment
• Amazon EC2 instance of type t2.medium.
• 2 vCPU and 4 GB of RAM
• 20,000 payment transactions are preloaded to
txpool.
• Commit 20 blocks in total.
Throughput
*Revised on April 12, 2017
Latency of Committing
*Revised on April 12, 2017
Thanks for Listening

More Related Content

Similar to Ethereum Asia Tour-Taiwan 2017 taipei-0330-nccu v3

Bitcoin MOOC Lecture 2.pptx
Bitcoin MOOC Lecture 2.pptxBitcoin MOOC Lecture 2.pptx
Bitcoin MOOC Lecture 2.pptx
Oluseyi Akindeinde
 
Ethereum Mining How To
Ethereum Mining How ToEthereum Mining How To
Ethereum Mining How To
Nugroho Gito
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus Algorithms
MabelOza12
 
Segregated witness and bitcoin scaling debate
Segregated witness and bitcoin scaling debateSegregated witness and bitcoin scaling debate
Segregated witness and bitcoin scaling debate
dalcanto
 
Encode polkadot club event 3, technical deepdive
Encode polkadot club   event 3, technical deepdiveEncode polkadot club   event 3, technical deepdive
Encode polkadot club event 3, technical deepdive
Vanessa Lošić
 
Substrate: Advantages and Opportunities
Substrate: Advantages and OpportunitiesSubstrate: Advantages and Opportunities
Substrate: Advantages and Opportunities
Marianne Goldin
 
Ergo details
Ergo detailsErgo details
Ergo details
Dmitry Meshkov
 
Distributed Consensus: Making Impossible Possible [Revised]
Distributed Consensus: Making Impossible Possible [Revised]Distributed Consensus: Making Impossible Possible [Revised]
Distributed Consensus: Making Impossible Possible [Revised]
Heidi Howard
 
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Svetlin Nakov
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
Oded Noam
 
GovBlocks - an open, permissionless protocol written for decentralized govern...
GovBlocks - an open, permissionless protocol written for decentralized govern...GovBlocks - an open, permissionless protocol written for decentralized govern...
GovBlocks - an open, permissionless protocol written for decentralized govern...
Ish Goel
 
Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...
I MT
 
Hyperchains
HyperchainsHyperchains
Hyperchains
Grzegorz Uriasz
 
Algorand
AlgorandAlgorand
Algorand
Andrew Huang
 
Blockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency RegulationsBlockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency Regulations
Amir Rafati
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
GopalSB
 
Distributed Consensus: Making Impossible Possible
Distributed Consensus: Making Impossible PossibleDistributed Consensus: Making Impossible Possible
Distributed Consensus: Making Impossible Possible
Heidi Howard
 
Distributed Consensus: Making Impossible Possible by Heidi howard
Distributed Consensus: Making Impossible Possible by Heidi howardDistributed Consensus: Making Impossible Possible by Heidi howard
Distributed Consensus: Making Impossible Possible by Heidi howard
J On The Beach
 
Algorand Consensus Algorithm
Algorand Consensus AlgorithmAlgorand Consensus Algorithm
Algorand Consensus Algorithm
Vanessa Lošić
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Codemotion
 

Similar to Ethereum Asia Tour-Taiwan 2017 taipei-0330-nccu v3 (20)

Bitcoin MOOC Lecture 2.pptx
Bitcoin MOOC Lecture 2.pptxBitcoin MOOC Lecture 2.pptx
Bitcoin MOOC Lecture 2.pptx
 
Ethereum Mining How To
Ethereum Mining How ToEthereum Mining How To
Ethereum Mining How To
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus Algorithms
 
Segregated witness and bitcoin scaling debate
Segregated witness and bitcoin scaling debateSegregated witness and bitcoin scaling debate
Segregated witness and bitcoin scaling debate
 
Encode polkadot club event 3, technical deepdive
Encode polkadot club   event 3, technical deepdiveEncode polkadot club   event 3, technical deepdive
Encode polkadot club event 3, technical deepdive
 
Substrate: Advantages and Opportunities
Substrate: Advantages and OpportunitiesSubstrate: Advantages and Opportunities
Substrate: Advantages and Opportunities
 
Ergo details
Ergo detailsErgo details
Ergo details
 
Distributed Consensus: Making Impossible Possible [Revised]
Distributed Consensus: Making Impossible Possible [Revised]Distributed Consensus: Making Impossible Possible [Revised]
Distributed Consensus: Making Impossible Possible [Revised]
 
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
Consensus Algorithms - Nakov at CryptoBlockCon - Las Vegas (2018)
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 
GovBlocks - an open, permissionless protocol written for decentralized govern...
GovBlocks - an open, permissionless protocol written for decentralized govern...GovBlocks - an open, permissionless protocol written for decentralized govern...
GovBlocks - an open, permissionless protocol written for decentralized govern...
 
Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...Can we safely adapt the construction of permissionless blockchain to user dem...
Can we safely adapt the construction of permissionless blockchain to user dem...
 
Hyperchains
HyperchainsHyperchains
Hyperchains
 
Algorand
AlgorandAlgorand
Algorand
 
Blockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency RegulationsBlockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency Regulations
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Distributed Consensus: Making Impossible Possible
Distributed Consensus: Making Impossible PossibleDistributed Consensus: Making Impossible Possible
Distributed Consensus: Making Impossible Possible
 
Distributed Consensus: Making Impossible Possible by Heidi howard
Distributed Consensus: Making Impossible Possible by Heidi howardDistributed Consensus: Making Impossible Possible by Heidi howard
Distributed Consensus: Making Impossible Possible by Heidi howard
 
Algorand Consensus Algorithm
Algorand Consensus AlgorithmAlgorand Consensus Algorithm
Algorand Consensus Algorithm
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

Ethereum Asia Tour-Taiwan 2017 taipei-0330-nccu v3

  • 1. An Implementation of BFT Consensus for Ethereum --Adding BFT Consensus to Geth Kung Chen, Tung-Wei Kuo Yi-Chun Hsu, Ming-Chuan Lin National Cheng-Chi University, Taipei, TAIWAN March 30, 2017 以太坊亞洲巡迴交流會:台灣 Ethereum Asia Tour: Taiwan 政大資科系區塊鏈團隊
  • 2.
  • 3. Outline • Project Background • Project Status • Our BFT Consensus Protocol • Preliminary Performance Test Results
  • 4. Project Background • Launched in July 2016, the initial goal is to develop a variant of geth with Byzantine Fault Tolerant (BFT) consensus based on the approach of HydraChain (based on pyethapp). • A step towards developing a framework of pluggable consensus protocols for Geth. • Ended up with a PBFT-like consensus algorithm, as the safety and liveness properties of HydraChain consensus algorithm may not hold in the presence of Byzantine faulty nodes.
  • 5. Project Status • Implementation: Keep the changes to geth as small as possible. • Add a BFTProtocolManager to geth. Use cmd-line-arguments to turn on the BFT consensus protocol. • Geth –bft –num-validators 4 –node-num 1 • Disable gas limit check when BFT mode is turned on • Alpha testing now, beta release under preparation. • AMIS is now testing an earlier version of January.
  • 6. From HydraChain to Our Consensus Protocol
  • 7. Commit block 𝐵𝐵 if a quorum for 𝐵𝐵 is intercepted Quorum for block 𝐵𝐵: +⅔ of all nodes vote for block 𝐵𝐵 Proposer broadcasts a proposal HydraChain at a High Level Propose Intercept Quorum Commit Every node broadcasts its vote Vote
  • 8. Propose 1 3 4 5 Propose 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏 Propose 𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟 Proposer Byzantine fault node 2 Byzantine fault node 6 7
  • 9. Vote 1 3 4 5 Vote 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏 Vote 𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟 Proposer Byzantine fault node 2 Byzantine fault node 6 7
  • 10. Vote 1 2 4 5 6 7 Proposer Byzantine fault node Byzantine fault node 3 received before timeout received after timeout
  • 11. Vote 1 2 Proposer Byzantine fault node Byzantine fault node 3 received before timeout received after timeout 54 6 7
  • 12. Intercept Quorum 1 2 4 5 6 7 Proposer Byzantine fault node Byzantine fault node 5 > 7 × �2 3 Node 3 intercepts a quorum and commits 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏 3
  • 13. The Result • Only node 3 commits block 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏 • Other nodes cannot commit a block • Moreover, other nodes receive more votes for 𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟 than 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏 • In the future, other nodes might commit block 𝐵𝐵𝑟𝑟𝑟𝑟𝑟𝑟, instead of block 𝐵𝐵𝑏𝑏𝑏𝑏 𝑏𝑏𝑏𝑏𝑏𝑏 • Safety is threatened
  • 14. Our Consensus Protocol at a High Level Propose Intercept Quorum Commit Vote Precommit If I commit a block, then +⅓ non-faulty nodes will back me up (even if the next proposer conflicts with me)
  • 15. Our Consensus Protocol at a High Level Propose Intercept Quorum Commit Vote Precommit Commit block 𝐵𝐵 if +⅔ nodes intercepts quorum for 𝐵𝐵
  • 16. Our Consensus Protocol at a High Level Precommit Other 4 steps are also updated Propose* Intercept Quorum* Commit* Vote*
  • 17. Consensus flow New height Propose Vote Nil Vote Block Precommit Nil New Round Wait for Precommit +⅔ Wait for votes from +⅔ If +⅔ nodes intercepts quorum for 𝐵𝐵 If a quorum for 𝐵𝐵 is intercepted Precommit Block Commit
  • 18. Future Directions 1. Detecting certain types of Byzantine faults 2. Fine-tuning the parameters in consensus algorithms
  • 20. Test Environment • Amazon EC2 instance of type t2.medium. • 2 vCPU and 4 GB of RAM • 20,000 payment transactions are preloaded to txpool. • Commit 20 blocks in total.
  • 22. Latency of Committing *Revised on April 12, 2017