SlideShare una empresa de Scribd logo
1 de 39
Istanbul BFT
Yu-Te Lin
The Problems
• 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.
The Solution
• Practical Byzantine Fault Tolerance (PBFT)
• Miguel Castro and Barbara Liskov 1999.*
• Targeting at a Byzantine-fault-tolerant NFS service in an asynchronous system like internet.
• A state machine replication algorithm.
• Go-ethereum integration:
• NCCU BFT: Academic PBFT-like geth implementation pioneer.
• Ethermint: Ethereum on top of Tendermint.
*http://pmg.csail.mit.edu/papers/osdi99.pdf
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)
Istanbul BFT
Algorithm Overview
• The proposer multicasts the block proposal to the validators.
• Validators agree on the block and broadcast their decision to others.
• Each validator waits for 2F+1 commits from different validators with the same
result before inserting the block into blockchain.
*Reference: https://www.slideshare.net/mansu/practical-byzantine-fault-tolerance
From Blockchain’s Perspective
• A consensus protocol.
• Maintains the order of transactions.
• A network of N validators can withstand F of Byzantine nodes.
• N = 3F + 1
• Data consistency and integrity guaranteed.
Protocol
• Three-phase protocol:
• Pre-prepare: Proposer proposes a block.
• Prepare: Validators agree on block.
• Commit: Validators agree on commit.
Protocol – Propose
Proposer proposes
a block
Protocol – Pre-prepare
Pre-prepare
message
Protocol – Prepare
Prepare
message
Protocol – Prepare
Prepared when i receives 2f
prepares that match pre-prepares.
Protocol – Commit
Commit
message
Protocol – Committed
Committed
If prepare(i) and received 2f+1 commits
State Machine
State Machine – New Round
State Machine – Pre-prepare
State Machine – Pre-prepared
State Machine – Pre-prepared
State Machine – Prepared
State Machine – Commit
State Machine – Committed
State Machine – Insert Block
State Machine – Final Committed
State Machine – New Round
State Machine – Round Change
State Machine – Round Change
Consensus Proof
• Upon entering committed state (received 2f+1 of commit messages), each
validator stores those 2f + 1 of committed seals in block header before inserting
the block into blockchain.
• Consensus proof: Committed seals that prove the associated block has gone
through the consensus process.
Manageable Validator Set
• Proposer can cast one vote to propose a change to the validators list.
• Validator proposals reaching majority consensus come into effect immediately.
• Vote authorization:
istanbul.propose("0xdc421209441a754f79c4a4ecd2b49c935aad0312", true)
• Vote deauthorization:
istanbul.propose("0xdc421209441a754f79c4a4ecd2b49c935aad0312", false)
Ottoman Testnet
• 4 pre-set validators
• Command:
geth --ottoman
Experimental Faulty Node
• Branch: https://github.com/getamis/go-ethereum/pull/99/
• Command:
geth -istanbul.faultymode <MODE>
• Modes:
• 0: Disable faulty behaviors.
• 1: Randomly run any faulty behaviors.
• 2: NotBroadcast: Don’t broadcast any message.
• 3: SendWrongMsg: Send out message with wrong message code.
• 4: ModifySig: Forge message signatures.
• 5: AlwaysPropose: Disguise as proposer and send pre-prepare messages.
• 6: AlwaysRoundChange: Broadcast round change every time.
Preliminary Result
• Expectation: Get a sense on transaction per second (TPS).
• Environment: Azure VM. Standard D2 V2 instance.
• CPU: 2 cores
• Memory: 7 Gib
• Validators: 4
Preliminary Result – Consensus
• Consensus time: 10ms ~ 100ms.
• Process 0 tx ~ 1000+ tx.
Preliminary Result – TPS
• Max block size: 2000 tx
• Max txpool size: 10240 tx
• Test scenario :
• 25 accounts/validator (100 in total)
• Total test time: 10 mins
• Send 100 tx/round per account
• Round timeout: 15~35sec
Istanbul: Preliminary Result – TPS
• TPS per 10 sec: (Fig. Left)
• Peak: 1207
• Average: 831
• Bottom: 408
• TPS per 1min: (Fig. Right)
• Peak: 389
Preliminary Result – Conclusion
• Generally can reach 1000+ TPS.
• Need to eliminate Geth factors:
• Tx generation overhead.
• Geth seems to have issues on processing large blocks.
• Processing time is not linearly related to block size.
• Txpool management issues. Txpool size or txpool locking?
• Slow state processor (EVM)?
• Optimization and bug fixing:
• Event mux limitation.
• …and more.
• Comprehensive benchmarking and stress testing is still in progress.
Project Status
• EIP: https://github.com/ethereum/EIPs/issues/650
• Pull Request: https://github.com/ethereum/go-ethereum/pull/14674
Future Work
• Gossip network
• Testnet: 22 nodes (7 faulty and 15 normal)
• Weighted round robin
• Fast block generation mode.
• Benchmarking and stress testing.
• Faulty proposer detection.
• Formal proofs on safety and liveness.
• Locking mechanism.
Istanbul BFT

Más contenido relacionado

La actualidad más candente

Présentation de Apache Zookeeper
Présentation de Apache ZookeeperPrésentation de Apache Zookeeper
Présentation de Apache ZookeeperMichaël Morello
 
Thousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OThousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OGeorge Cao
 
ITLC HN 14 - Bizweb Microservices Architecture
ITLC HN 14  - Bizweb Microservices ArchitectureITLC HN 14  - Bizweb Microservices Architecture
ITLC HN 14 - Bizweb Microservices ArchitectureIT Expert Club
 
Apache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsApache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsFlorent Ramiere
 
CAP Theorem and Split Brain Syndrome
CAP Theorem and Split Brain SyndromeCAP Theorem and Split Brain Syndrome
CAP Theorem and Split Brain SyndromeDilum Bandara
 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceZeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceDatabricks
 
Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...
Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...
Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...HostedbyConfluent
 
Créer une organisation produit par dessus les silos
Créer une organisation produit par dessus les silosCréer une organisation produit par dessus les silos
Créer une organisation produit par dessus les silosSébastien Sacard
 
Grokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineersGrokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineers9diov
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 
Write Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on EthereumWrite Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on Ethereum劉 維仁
 
Kinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vnKinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vnDotnet Open Group
 
Distributing Transactions using MassTransit
Distributing Transactions using MassTransitDistributing Transactions using MassTransit
Distributing Transactions using MassTransitChris Patterson
 
Le test dans un cycle agile. Comment faire ?
Le test dans un cycle agile. Comment faire ?Le test dans un cycle agile. Comment faire ?
Le test dans un cycle agile. Comment faire ?Gilles Brieux
 
Ethereum Blockchain explained
Ethereum Blockchain explainedEthereum Blockchain explained
Ethereum Blockchain explainedEthWorks
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure DataTaro L. Saito
 

La actualidad más candente (20)

Présentation de Apache Zookeeper
Présentation de Apache ZookeeperPrésentation de Apache Zookeeper
Présentation de Apache Zookeeper
 
Thousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/OThousands of Threads and Blocking I/O
Thousands of Threads and Blocking I/O
 
Accelerated SDN in Azure
Accelerated SDN in AzureAccelerated SDN in Azure
Accelerated SDN in Azure
 
kafka
kafkakafka
kafka
 
ITLC HN 14 - Bizweb Microservices Architecture
ITLC HN 14  - Bizweb Microservices ArchitectureITLC HN 14  - Bizweb Microservices Architecture
ITLC HN 14 - Bizweb Microservices Architecture
 
Apache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsApache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patterns
 
CAP Theorem and Split Brain Syndrome
CAP Theorem and Split Brain SyndromeCAP Theorem and Split Brain Syndrome
CAP Theorem and Split Brain Syndrome
 
The Spectre of Meltdowns
The Spectre of MeltdownsThe Spectre of Meltdowns
The Spectre of Meltdowns
 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a ServiceZeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
 
Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...
Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...
Apache Pinot Case Study: Building Distributed Analytics Systems Using Apache ...
 
Créer une organisation produit par dessus les silos
Créer une organisation produit par dessus les silosCréer une organisation produit par dessus les silos
Créer une organisation produit par dessus les silos
 
Grokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineersGrokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineers
 
Introduction au "Lean IT"
Introduction au "Lean IT"Introduction au "Lean IT"
Introduction au "Lean IT"
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
Write Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on EthereumWrite Smart Contract with Solidity on Ethereum
Write Smart Contract with Solidity on Ethereum
 
Kinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vnKinh nghiệm triển khai Microservices tại Sapo.vn
Kinh nghiệm triển khai Microservices tại Sapo.vn
 
Distributing Transactions using MassTransit
Distributing Transactions using MassTransitDistributing Transactions using MassTransit
Distributing Transactions using MassTransit
 
Le test dans un cycle agile. Comment faire ?
Le test dans un cycle agile. Comment faire ?Le test dans un cycle agile. Comment faire ?
Le test dans un cycle agile. Comment faire ?
 
Ethereum Blockchain explained
Ethereum Blockchain explainedEthereum Blockchain explained
Ethereum Blockchain explained
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 

Similar a Istanbul BFT

CN Module 5 part 2 2022.pdf
CN Module 5 part 2 2022.pdfCN Module 5 part 2 2022.pdf
CN Module 5 part 2 2022.pdfMayankRaj687571
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to EthereumArnold Pham
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisZak Cole
 
Network emulator
Network emulatorNetwork emulator
Network emulatorjeromy fu
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CachePer Buer
 
On Space-Scarce Economy In Blockchain Systems
On Space-Scarce Economy In Blockchain SystemsOn Space-Scarce Economy In Blockchain Systems
On Space-Scarce Economy In Blockchain SystemsDmitry Meshkov
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesAlex Akselrod
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsMabelOza12
 
A DRAM-friendly priority queue Internet packet scheduler implementation and i...
A DRAM-friendly priority queue Internet packet scheduler implementation and i...A DRAM-friendly priority queue Internet packet scheduler implementation and i...
A DRAM-friendly priority queue Internet packet scheduler implementation and i...Katsushi Kobayashi
 
Synchronization
SynchronizationSynchronization
SynchronizationSara shall
 

Similar a Istanbul BFT (20)

basil.pptx
basil.pptxbasil.pptx
basil.pptx
 
01 what is blockchain
01 what is blockchain01 what is blockchain
01 what is blockchain
 
TCP-IP PROTOCOL
TCP-IP PROTOCOLTCP-IP PROTOCOL
TCP-IP PROTOCOL
 
CN Module 5 part 2 2022.pdf
CN Module 5 part 2 2022.pdfCN Module 5 part 2 2022.pdf
CN Module 5 part 2 2022.pdf
 
Cheapbft
Cheapbft Cheapbft
Cheapbft
 
Introduction to Ethereum
Introduction to EthereumIntroduction to Ethereum
Introduction to Ethereum
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & Analysis
 
Network emulator
Network emulatorNetwork emulator
Network emulator
 
Tuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish CacheTuning the Kernel for Varnish Cache
Tuning the Kernel for Varnish Cache
 
On Space-Scarce Economy In Blockchain Systems
On Space-Scarce Economy In Blockchain SystemsOn Space-Scarce Economy In Blockchain Systems
On Space-Scarce Economy In Blockchain Systems
 
Advanced networking - scheduling and QoS part 1
Advanced networking - scheduling and QoS part 1Advanced networking - scheduling and QoS part 1
Advanced networking - scheduling and QoS part 1
 
qos-f05 (2).ppt
qos-f05 (2).pptqos-f05 (2).ppt
qos-f05 (2).ppt
 
qos-f05 (3).ppt
qos-f05 (3).pptqos-f05 (3).ppt
qos-f05 (3).ppt
 
qos-f05.pdf
qos-f05.pdfqos-f05.pdf
qos-f05.pdf
 
qos-f05.ppt
qos-f05.pptqos-f05.ppt
qos-f05.ppt
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slides
 
Hyperledger Consensus Algorithms
Hyperledger Consensus AlgorithmsHyperledger Consensus Algorithms
Hyperledger Consensus Algorithms
 
A DRAM-friendly priority queue Internet packet scheduler implementation and i...
A DRAM-friendly priority queue Internet packet scheduler implementation and i...A DRAM-friendly priority queue Internet packet scheduler implementation and i...
A DRAM-friendly priority queue Internet packet scheduler implementation and i...
 
Synchronization
SynchronizationSynchronization
Synchronization
 
QoSintro.PPT
QoSintro.PPTQoSintro.PPT
QoSintro.PPT
 

Último

THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESNarmatha D
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsDILIPKUMARMONDAL6
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 

Último (20)

THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIES
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teams
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 

Istanbul BFT

  • 2. The Problems • 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.
  • 3. The Solution • Practical Byzantine Fault Tolerance (PBFT) • Miguel Castro and Barbara Liskov 1999.* • Targeting at a Byzantine-fault-tolerant NFS service in an asynchronous system like internet. • A state machine replication algorithm. • Go-ethereum integration: • NCCU BFT: Academic PBFT-like geth implementation pioneer. • Ethermint: Ethereum on top of Tendermint. *http://pmg.csail.mit.edu/papers/osdi99.pdf
  • 4. 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)
  • 6. Algorithm Overview • The proposer multicasts the block proposal to the validators. • Validators agree on the block and broadcast their decision to others. • Each validator waits for 2F+1 commits from different validators with the same result before inserting the block into blockchain. *Reference: https://www.slideshare.net/mansu/practical-byzantine-fault-tolerance
  • 7. From Blockchain’s Perspective • A consensus protocol. • Maintains the order of transactions. • A network of N validators can withstand F of Byzantine nodes. • N = 3F + 1 • Data consistency and integrity guaranteed.
  • 8. Protocol • Three-phase protocol: • Pre-prepare: Proposer proposes a block. • Prepare: Validators agree on block. • Commit: Validators agree on commit.
  • 9. Protocol – Propose Proposer proposes a block
  • 12. Protocol – Prepare Prepared when i receives 2f prepares that match pre-prepares.
  • 14. Protocol – Committed Committed If prepare(i) and received 2f+1 commits
  • 16. State Machine – New Round
  • 17. State Machine – Pre-prepare
  • 18. State Machine – Pre-prepared
  • 19. State Machine – Pre-prepared
  • 20. State Machine – Prepared
  • 22. State Machine – Committed
  • 23. State Machine – Insert Block
  • 24. State Machine – Final Committed
  • 25. State Machine – New Round
  • 26. State Machine – Round Change
  • 27. State Machine – Round Change
  • 28. Consensus Proof • Upon entering committed state (received 2f+1 of commit messages), each validator stores those 2f + 1 of committed seals in block header before inserting the block into blockchain. • Consensus proof: Committed seals that prove the associated block has gone through the consensus process.
  • 29. Manageable Validator Set • Proposer can cast one vote to propose a change to the validators list. • Validator proposals reaching majority consensus come into effect immediately. • Vote authorization: istanbul.propose("0xdc421209441a754f79c4a4ecd2b49c935aad0312", true) • Vote deauthorization: istanbul.propose("0xdc421209441a754f79c4a4ecd2b49c935aad0312", false)
  • 30. Ottoman Testnet • 4 pre-set validators • Command: geth --ottoman
  • 31. Experimental Faulty Node • Branch: https://github.com/getamis/go-ethereum/pull/99/ • Command: geth -istanbul.faultymode <MODE> • Modes: • 0: Disable faulty behaviors. • 1: Randomly run any faulty behaviors. • 2: NotBroadcast: Don’t broadcast any message. • 3: SendWrongMsg: Send out message with wrong message code. • 4: ModifySig: Forge message signatures. • 5: AlwaysPropose: Disguise as proposer and send pre-prepare messages. • 6: AlwaysRoundChange: Broadcast round change every time.
  • 32. Preliminary Result • Expectation: Get a sense on transaction per second (TPS). • Environment: Azure VM. Standard D2 V2 instance. • CPU: 2 cores • Memory: 7 Gib • Validators: 4
  • 33. Preliminary Result – Consensus • Consensus time: 10ms ~ 100ms. • Process 0 tx ~ 1000+ tx.
  • 34. Preliminary Result – TPS • Max block size: 2000 tx • Max txpool size: 10240 tx • Test scenario : • 25 accounts/validator (100 in total) • Total test time: 10 mins • Send 100 tx/round per account • Round timeout: 15~35sec
  • 35. Istanbul: Preliminary Result – TPS • TPS per 10 sec: (Fig. Left) • Peak: 1207 • Average: 831 • Bottom: 408 • TPS per 1min: (Fig. Right) • Peak: 389
  • 36. Preliminary Result – Conclusion • Generally can reach 1000+ TPS. • Need to eliminate Geth factors: • Tx generation overhead. • Geth seems to have issues on processing large blocks. • Processing time is not linearly related to block size. • Txpool management issues. Txpool size or txpool locking? • Slow state processor (EVM)? • Optimization and bug fixing: • Event mux limitation. • …and more. • Comprehensive benchmarking and stress testing is still in progress.
  • 37. Project Status • EIP: https://github.com/ethereum/EIPs/issues/650 • Pull Request: https://github.com/ethereum/go-ethereum/pull/14674
  • 38. Future Work • Gossip network • Testnet: 22 nodes (7 faulty and 15 normal) • Weighted round robin • Fast block generation mode. • Benchmarking and stress testing. • Faulty proposer detection. • Formal proofs on safety and liveness. • Locking mechanism.