SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

스프링5 웹플럭스와 테스트 전략
스프링5 웹플럭스와 테스트 전략스프링5 웹플럭스와 테스트 전략
스프링5 웹플럭스와 테스트 전략if kakao
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & AsteriskEvan McGee
 
Performance consulting
Performance consultingPerformance consulting
Performance consultingIMQA
 
목적에 맞게 Angular, React, Vue
목적에 맞게 Angular, React, Vue목적에 맞게 Angular, React, Vue
목적에 맞게 Angular, React, VueGunhee Lee
 
아파치 카프카 입문과 활용 강의자료
아파치 카프카 입문과 활용 강의자료아파치 카프카 입문과 활용 강의자료
아파치 카프카 입문과 활용 강의자료원영 최
 
[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기NAVER D2
 
Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례
Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례
Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례Jemin Huh
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistentconfluent
 
Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기iFunFactory Inc.
 
KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!Guido Schmutz
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDKPhil Wilkins
 
TLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspectiveTLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspectiveTorao Takami
 
Heap exploitation
Heap exploitationHeap exploitation
Heap exploitationAngel Boy
 
Handle Large Messages In Apache Kafka
Handle Large Messages In Apache KafkaHandle Large Messages In Apache Kafka
Handle Large Messages In Apache KafkaJiangjie Qin
 
주니어의 쿠버네티스 생태계에서 살아남기
주니어의 쿠버네티스 생태계에서 살아남기주니어의 쿠버네티스 생태계에서 살아남기
주니어의 쿠버네티스 생태계에서 살아남기InfraEngineer
 
카프카, 산전수전 노하우
카프카, 산전수전 노하우카프카, 산전수전 노하우
카프카, 산전수전 노하우if kakao
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesMarius FAILLOT DEVARRE
 

Tendances (20)

스프링5 웹플럭스와 테스트 전략
스프링5 웹플럭스와 테스트 전략스프링5 웹플럭스와 테스트 전략
스프링5 웹플럭스와 테스트 전략
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & Asterisk
 
1909 Hyperledger Besu(a.k.a pantheon) Overview
1909 Hyperledger Besu(a.k.a pantheon) Overview1909 Hyperledger Besu(a.k.a pantheon) Overview
1909 Hyperledger Besu(a.k.a pantheon) Overview
 
XMPP
XMPPXMPP
XMPP
 
Performance consulting
Performance consultingPerformance consulting
Performance consulting
 
Netflow slides
Netflow slidesNetflow slides
Netflow slides
 
목적에 맞게 Angular, React, Vue
목적에 맞게 Angular, React, Vue목적에 맞게 Angular, React, Vue
목적에 맞게 Angular, React, Vue
 
아파치 카프카 입문과 활용 강의자료
아파치 카프카 입문과 활용 강의자료아파치 카프카 입문과 활용 강의자료
아파치 카프카 입문과 활용 강의자료
 
[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기[234]멀티테넌트 하둡 클러스터 운영 경험기
[234]멀티테넌트 하둡 클러스터 운영 경험기
 
Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례
Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례
Spring boot 를 적용한 전사모니터링 시스템 backend 개발 사례
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
 
Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기Docker 로 Linux 없이 Linux 환경에서 개발하기
Docker 로 Linux 없이 Linux 환경에서 개발하기
 
KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!KSQL - Stream Processing simplified!
KSQL - Stream Processing simplified!
 
Oracle OCI APIs and SDK
Oracle OCI APIs and SDKOracle OCI APIs and SDK
Oracle OCI APIs and SDK
 
TLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspectiveTLA+ and PlusCal / An engineer's perspective
TLA+ and PlusCal / An engineer's perspective
 
Heap exploitation
Heap exploitationHeap exploitation
Heap exploitation
 
Handle Large Messages In Apache Kafka
Handle Large Messages In Apache KafkaHandle Large Messages In Apache Kafka
Handle Large Messages In Apache Kafka
 
주니어의 쿠버네티스 생태계에서 살아남기
주니어의 쿠버네티스 생태계에서 살아남기주니어의 쿠버네티스 생태계에서 살아남기
주니어의 쿠버네티스 생태계에서 살아남기
 
카프카, 산전수전 노하우
카프카, 산전수전 노하우카프카, 산전수전 노하우
카프카, 산전수전 노하우
 
SIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study NotesSIP (Session Initiation Protocol) - Study Notes
SIP (Session Initiation Protocol) - Study Notes
 

Similaire à 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
 

Similaire à 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
 

Dernier

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
 
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
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
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
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 

Dernier (20)

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
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.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
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
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
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 

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.