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

MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C
MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C
MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C MongoDB
 
Building an Activity Feed with Cassandra
Building an Activity Feed with CassandraBuilding an Activity Feed with Cassandra
Building an Activity Feed with CassandraMark Dunphy
 
Algorand Consensus Algorithm
Algorand Consensus AlgorithmAlgorand Consensus Algorithm
Algorand Consensus AlgorithmVanessa Lošić
 
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
 
Domain Driven Design và Event Driven Architecture
Domain Driven Design và Event Driven Architecture Domain Driven Design và Event Driven Architecture
Domain Driven Design và Event Driven Architecture IT Expert Club
 
Blockchain Consensus Protocols
Blockchain Consensus ProtocolsBlockchain Consensus Protocols
Blockchain Consensus ProtocolsMelanie Swan
 
Blockchain Digital Transformation Presentation
Blockchain Digital Transformation PresentationBlockchain Digital Transformation Presentation
Blockchain Digital Transformation Presentation101 Blockchains
 
Building Bizweb Microservices with Docker
Building Bizweb Microservices with DockerBuilding Bizweb Microservices with Docker
Building Bizweb Microservices with DockerKhôi Nguyễn Minh
 
비트코인으로 이해하는 블록체인 기술
비트코인으로 이해하는 블록체인 기술비트코인으로 이해하는 블록체인 기술
비트코인으로 이해하는 블록체인 기술Seong-Bok Lee
 
SOLID & Design Patterns
SOLID & Design PatternsSOLID & Design Patterns
SOLID & Design PatternsGrokking VN
 
End-to-end Streaming Between gRPC Services Via Kafka with John Fallows
End-to-end Streaming Between gRPC Services Via Kafka with John FallowsEnd-to-end Streaming Between gRPC Services Via Kafka with John Fallows
End-to-end Streaming Between gRPC Services Via Kafka with John FallowsHostedbyConfluent
 
Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab
Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On LabHyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab
Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On LabHyperledger Korea User Group
 
MongoDB- Crud Operation
MongoDB- Crud OperationMongoDB- Crud Operation
MongoDB- Crud OperationEdureka!
 
Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)Dan Kaminsky
 
High Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databaseHigh Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databasePeter Lawrey
 
[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경
[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경
[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경NAVER Engineering
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and ThenSATOSHI TAGOMORI
 

La actualidad más candente (20)

MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C
MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C
MongoDB World 2019: Benchmarking Transactions: MongoDB Meets TPC-C
 
Building an Activity Feed with Cassandra
Building an Activity Feed with CassandraBuilding an Activity Feed with Cassandra
Building an Activity Feed with Cassandra
 
Algorand Consensus Algorithm
Algorand Consensus AlgorithmAlgorand Consensus Algorithm
Algorand Consensus Algorithm
 
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
 
Domain Driven Design và Event Driven Architecture
Domain Driven Design và Event Driven Architecture Domain Driven Design và Event Driven Architecture
Domain Driven Design và Event Driven Architecture
 
Blockchain Consensus Protocols
Blockchain Consensus ProtocolsBlockchain Consensus Protocols
Blockchain Consensus Protocols
 
Blockchain Digital Transformation Presentation
Blockchain Digital Transformation PresentationBlockchain Digital Transformation Presentation
Blockchain Digital Transformation Presentation
 
Building Bizweb Microservices with Docker
Building Bizweb Microservices with DockerBuilding Bizweb Microservices with Docker
Building Bizweb Microservices with Docker
 
비트코인으로 이해하는 블록체인 기술
비트코인으로 이해하는 블록체인 기술비트코인으로 이해하는 블록체인 기술
비트코인으로 이해하는 블록체인 기술
 
SOLID & Design Patterns
SOLID & Design PatternsSOLID & Design Patterns
SOLID & Design Patterns
 
End-to-end Streaming Between gRPC Services Via Kafka with John Fallows
End-to-end Streaming Between gRPC Services Via Kafka with John FallowsEnd-to-end Streaming Between gRPC Services Via Kafka with John Fallows
End-to-end Streaming Between gRPC Services Via Kafka with John Fallows
 
Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab
Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On LabHyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab
Hyperledger Fabric v2.0 Alpha - FabToken Overview, Hands-On Lab
 
MongoDB- Crud Operation
MongoDB- Crud OperationMongoDB- Crud Operation
MongoDB- Crud Operation
 
Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)Yet Another Dan Kaminsky Talk (Black Ops 2014)
Yet Another Dan Kaminsky Talk (Black Ops 2014)
 
High Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databaseHigh Frequency Trading and NoSQL database
High Frequency Trading and NoSQL database
 
[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경
[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경
[네이버오픈소스세미나] Contribution, 전쟁의 서막 : Apache OpenWhisk 성능 개선 - 김동경
 
Stream Processing made simple with Kafka
Stream Processing made simple with KafkaStream Processing made simple with Kafka
Stream Processing made simple with Kafka
 
JOSE Can You See...
JOSE Can You See...JOSE Can You See...
JOSE Can You See...
 
Core Banking System on Apache Kafka
Core Banking System on Apache KafkaCore Banking System on Apache Kafka
Core Banking System on Apache Kafka
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and Then
 

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

Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 
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
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESkarthi keyan
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmDeepika Walanjkar
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Sumanth A
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 

Último (20)

Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 
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
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithmComputer Graphics Introduction, Open GL, Line and Circle drawing algorithm
Computer Graphics Introduction, Open GL, Line and Circle drawing algorithm
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
Robotics-Asimov's Laws, Mechanical Subsystems, Robot Kinematics, Robot Dynami...
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 

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.