SlideShare a Scribd company logo
1 of 33
Download to read offline
Testing distributed decentralized systems
by Antoine Toulme, CTO @ Whiteblock
New requirements of distributed, decentralized systems
• Pure peer-to-peer networks
• Consensus among all nodes is critical
• Eventual, asynchronous finality
• The chain can reorganize!
• Proof of work
• Proof of stake
• Applications deployed on those systems expose their own performance bottlenecks
• Oracles
• Bridges
• New attack vectors…
New metrics to capture
• Transaction size
• Sender address
• Receiving address
• Sent and received timestamps
• Block information: number, hash, size
• Transaction mempool size
• Block time
• Block size
• Block mempool size
• Block transmission time (Difference of send and receive time)
• Block header validation time
• Block processing time
• Total delay
• Uncle Rate
Collecting metrics
• Logs
• Block data
• Prometheus
• Use data science tools like Jupyter, Grafana, the ELK stack to process.
• Each run and client implementation is different
Test suites
• Control group
• Network testing
• Data testing
• Compatibility testing
• Security testing
• Load testing
• Consensus testing
• More!
Network testing
Control group
• The control test will involve a test case where latency, packet loss, and bandwidth
will be configured to 0ms, 0%, and 1000 MB*, respectively. The test will run 50
transactions per second to the network in order to determine the transactional
throughput of the network. Upon completion of these tests, Whiteblock will export
the raw block data of all nodes. The results will be used as a reference point for
future tests.
• Optimal, peak performance
• “Works on my machine feel”
Latency testing
• The latency test will involve 3 test cases where latency will be configured and varied
from 0ms, 50ms, and 100ms. The test will run 50 transactions per second to the
network in order to determine the transactional throughput of the network. Upon
completion of these tests, Whiteblock will export the raw block data of all nodes.
• We usually see some performance degradation.
• Good benchmark as a warm up.
• Note nodes peer randomly throughout the network - this means a node in New York
may peer with a node in Tokyo.
Bandwidth testing
• The bandwidth test will involve 3 test cases where the bandwidth between nodes
will be configured and varied from 10 MB, 50 MB, and 100 MB. The test will run 50
transactions per second to the network in order to determine the transactional
throughput of the network. Upon completion of these tests, Whiteblock will export
the raw block data.
• We notice some blockchains are bandwidth heavy and are quite affected by this
testing.
Packet loss testing
• The packet loss test will involve 3 test cases where the packet loss between nodes
will be configured and varied from 0.01%, 0.1%, and 1%. The test will run 50
transactions per second to the network in order to determine the transactional
throughput of the network. Upon completion of these tests, Whiteblock will export
the raw block data of all nodes.
• This exercises the capability of the blockchain to sustain and recover incomplete
messages. This causes important issues, having to replay and request data again.
• In some scenarios, this may create situations where nodes drop peers.
Network stress testing
• The stress test will involve 3 test cases where latency, packet loss, and bandwidth
between nodes will be configured to 150ms, 0.01%, and 10MB respectively. The
test will run 50 transactions per second to the network in order to determine the
transactional throughput of the network. Upon completion of these tests, Whiteblock
will export the raw block data of all nodes of all nodes.
• Goal is to create something that looks like the real Internet.
Network topology testing
• The network topology test will involve 3 test cases where the network topologies for
all nodes will be configured in a custom manner. The cases will be a linear peering
topology, static peering to X number of nodes, and a full mesh peering
topology. The test will run 50 transactions per second to the network in order to
determine the transactional throughput of the network. Upon completion of these
tests, Whiteblock will export the raw block data.
• The block propagation time is the metric to watch here.
Discovery topology testing
• The network topology test will involve 3 test cases where the network topologies for
all nodes will be configured using a discovery mechanism, against a boot node. The
cases will involve 10, 20 and 30 nodes. In each case, the network should be
configured to allow a maximum number of peers of 5, 10 and 20. The test will run
50 transactions per second to the network in order to determine the transactional
throughput of the network. Upon completion of these tests, Whiteblock will export
the raw block data.
• Can the network self-organize in an optimized manner?
Data testing
Sync testing
• Whiteblock will set up a regular testnet, and identify a node which it will cut from the
rest of the network for a given duration. Whiteblock will monitor usage and functional
resources of the node while it is cut from the network. Upon reestablishing
connections, Whiteblock will check the node is able to reconnect and synchronize
with the rest of the network.
• How fast is sync?
Title
Smart contract testing
• Whiteblock will set up a regular testnet, and deploy the smart contract to it.
• An external dedicated helper will then exercise the contract by calling its endpoints
and ensuring the results of the interactions matches the expected behavior.
• Whiteblock will output the result of the testing as the state of the application after the
script has executed.
• Exercises the smart contract.
• Possibly exercises the infrastructure using the smart contract.
Compatibility testing
• Whiteblock will set up nodes of different implementations implementing the same
protocol.
• Whiteblock will deploy smart contracts and inject the same transactions across all
nodes.
• It will then compare the output of the result and ensure they all reach the same
output. It will also benchmark the time to process the transactions to check the
performance of the implementations.
Compatibility testing
Security testing
Eclipse attack testing
• The eclipse attack test will be the overtaking of a node’s peerlist with bad acting
nodes. This will be done using a static peers list to simulate the connecting to
dishonest nodes. The bad acting nodes will be on a fork of the network and will
propagate blocks that are false (different than those of the canonical chain). Upon
completion of these tests, Whiteblock will export the raw block data.
• How do you counter eclipse attacks?
Double spend testing
• Whiteblock will set up a regular testnet, and create two competing transactions so
that only one transaction may be successful at a time. Whiteblock will then inject
both transactions at the same time to two different nodes of the network, and check
the target account is only being credited by one transaction. One of the two
transactions should be rejected.
• The double spend attack is a classic. PoW is meant to ensure these attacks are
defeated.
• … but not all blockchains use proof of work :)
51% attack testing
• Whiteblock will set up a testnet made of normal nodes and modified nodes that have
been instructed to always follow the chain built on top of a block with a specific
transaction hash.
• The network is exercised with 50 transactions per second, until the attacking
transaction is injected. Ideally, the consensus algorithm is able to withstand this
attack and reject the transaction.
• Ethereum and Bitcoin are vulnerable to 51% attacks.
Load testing
Local load testing
• Whiteblock will set up a regular testnet, and select a node to be the recipient of the
load.
• Whiteblock will inject continuously over a thousand transactions per second to the
node for a configurable period of times, in minutes. During the test, Whiteblock will
monitor resources usage on the node and check the transaction success rate over
the network.
• What will make a node fall over?
Distributed load testing
• Whiteblock will set up a regular testnet.
• Whiteblock will inject continuously over a thousand transactions per second to all
nodes for a configurable period of time, in minutes. During the test, Whiteblock will
monitor resources usage on nodes and check the transaction success rate over the
network.
• Good measure of stress of the network under heavy load
Consensus testing
Block time testing
• In blockchains, block times may vary depending on implementation. The block time
can affect the way a network behaves and a shorter block time will usually lead to a
higher orphan (uncle) rate in a proof-of-work network. This is important as a higher
orphan (uncle) rate equates to a lower level of security in the network until those
orphans (uncles) are pruned and the nodes are synced up to the latest canonical
block. This test will focus on measuring block times in the network and upon
completion of this test, Whiteblock will export the raw block data.
State transition testing
• Whiteblock will initiate one node with an existing, static state.
• It will create pre-determined conditions by which the state of the application will
mutate, such as a state transition or a new block.
• Whiteblock will output the state in a machine-readable format and compare it to an
expected output.
• Great to debug and check compatibility between clients of a new chain.
Finality testing
• Some blockchains support eventual finality. New blockchains based on proof of
stake support strong, deterministic finality. Whiteblock will set up a regular testnet
and observe block finalization. It will compare the times at which blocks are finalized
between clients. When applicable, Whiteblock will create situations where
finalization is difficult based on the network topology or the transaction load, and
check finalization still operates uniformly across clients.
MOAR testing
• Custom testing cases, such as:
• Comparisons between blockchains
• Network bad actors
• Rendez-vous nodes
• TCP hole punching tests
• UDP-based traffic
• Tor and VPN traffic
• …
Thank you!

More Related Content

What's hot

Scaling Ethereum using Zero-Knowledge Proofs
Scaling Ethereum using Zero-Knowledge ProofsScaling Ethereum using Zero-Knowledge Proofs
Scaling Ethereum using Zero-Knowledge ProofsHyojun Kim
 
DIY Java Profiler
DIY Java ProfilerDIY Java Profiler
DIY Java Profileraragozin
 
Strict-Data-Consistency-in-Distrbuted-Systems-With-Failures
Strict-Data-Consistency-in-Distrbuted-Systems-With-FailuresStrict-Data-Consistency-in-Distrbuted-Systems-With-Failures
Strict-Data-Consistency-in-Distrbuted-Systems-With-FailuresSlava Imeshev
 
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic AnalyticsSAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic AnalyticsQin Liu
 
Winter is coming? Not if ZooKeeper is there!
Winter is coming? Not if ZooKeeper is there!Winter is coming? Not if ZooKeeper is there!
Winter is coming? Not if ZooKeeper is there!Joydeep Banik Roy
 
BlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat Security Conference
 
Netty from the trenches
Netty from the trenchesNetty from the trenches
Netty from the trenchesJordi Gerona
 

What's hot (10)

Scaling Ethereum using Zero-Knowledge Proofs
Scaling Ethereum using Zero-Knowledge ProofsScaling Ethereum using Zero-Knowledge Proofs
Scaling Ethereum using Zero-Knowledge Proofs
 
Lock free programming- pro tips
Lock free programming- pro tipsLock free programming- pro tips
Lock free programming- pro tips
 
BlueHat v17 || Disrupting the Mirai Botnet
BlueHat v17 || Disrupting the Mirai Botnet BlueHat v17 || Disrupting the Mirai Botnet
BlueHat v17 || Disrupting the Mirai Botnet
 
DIY Java Profiler
DIY Java ProfilerDIY Java Profiler
DIY Java Profiler
 
Strict-Data-Consistency-in-Distrbuted-Systems-With-Failures
Strict-Data-Consistency-in-Distrbuted-Systems-With-FailuresStrict-Data-Consistency-in-Distrbuted-Systems-With-Failures
Strict-Data-Consistency-in-Distrbuted-Systems-With-Failures
 
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic AnalyticsSAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
SAND: A Fault-Tolerant Streaming Architecture for Network Traffic Analytics
 
Codefest2015
Codefest2015Codefest2015
Codefest2015
 
Winter is coming? Not if ZooKeeper is there!
Winter is coming? Not if ZooKeeper is there!Winter is coming? Not if ZooKeeper is there!
Winter is coming? Not if ZooKeeper is there!
 
BlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and wellBlueHat v18 || Memory resident implants - code injection is alive and well
BlueHat v18 || Memory resident implants - code injection is alive and well
 
Netty from the trenches
Netty from the trenchesNetty from the trenches
Netty from the trenches
 

Similar to PAC 2019 virtual Antoine Toulme

different consensus protocols in blockchian.pptx
different consensus protocols in blockchian.pptxdifferent consensus protocols in blockchian.pptx
different consensus protocols in blockchian.pptxmeena466141
 
Blockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency RegulationsBlockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency RegulationsAmir Rafati
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisZak Cole
 
Blockchain testing strategy
Blockchain testing strategyBlockchain testing strategy
Blockchain testing strategyrajni singh
 
Architecture and operations.pptx
Architecture and operations.pptxArchitecture and operations.pptx
Architecture and operations.pptxharshitmittal737363
 
Real-Time Inverted Search NYC ASLUG Oct 2014
Real-Time Inverted Search NYC ASLUG Oct 2014Real-Time Inverted Search NYC ASLUG Oct 2014
Real-Time Inverted Search NYC ASLUG Oct 2014Bryan Bende
 
Mock javameetup v1
Mock javameetup v1Mock javameetup v1
Mock javameetup v1Akshit Jain
 
Quantum Secured Blockchain
Quantum Secured BlockchainQuantum Secured Blockchain
Quantum Secured Blockchainravi sahal
 
Real-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and StormReal-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and Stormlucenerevolution
 
Overview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsOverview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsJohannes Ahlmann
 
Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...
Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...
Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...Zeeve
 
Blockchain Scalability - Architectures and Algorithms
Blockchain Scalability - Architectures and AlgorithmsBlockchain Scalability - Architectures and Algorithms
Blockchain Scalability - Architectures and AlgorithmsGokul Alex
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsGokul Alex
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to BlockchainAalok Singh
 
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...Continuent
 

Similar to PAC 2019 virtual Antoine Toulme (20)

different consensus protocols in blockchian.pptx
different consensus protocols in blockchian.pptxdifferent consensus protocols in blockchian.pptx
different consensus protocols in blockchian.pptx
 
Blockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency RegulationsBlockchain Ecosystem and Cryptocurrency Regulations
Blockchain Ecosystem and Cryptocurrency Regulations
 
Consensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & AnalysisConsensus Algorithms: An Introduction & Analysis
Consensus Algorithms: An Introduction & Analysis
 
Blockchain testing strategy
Blockchain testing strategyBlockchain testing strategy
Blockchain testing strategy
 
Avalanche-4-pub.pptx
Avalanche-4-pub.pptxAvalanche-4-pub.pptx
Avalanche-4-pub.pptx
 
Architecture and operations.pptx
Architecture and operations.pptxArchitecture and operations.pptx
Architecture and operations.pptx
 
Real-Time Inverted Search NYC ASLUG Oct 2014
Real-Time Inverted Search NYC ASLUG Oct 2014Real-Time Inverted Search NYC ASLUG Oct 2014
Real-Time Inverted Search NYC ASLUG Oct 2014
 
Mock javameetup v1
Mock javameetup v1Mock javameetup v1
Mock javameetup v1
 
Quantum Secured Blockchain
Quantum Secured BlockchainQuantum Secured Blockchain
Quantum Secured Blockchain
 
Real-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and StormReal-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and Storm
 
Introduction to Blockchain
Introduction to Blockchain Introduction to Blockchain
Introduction to Blockchain
 
Overview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus MechanismsOverview of Blockchain Consensus Mechanisms
Overview of Blockchain Consensus Mechanisms
 
Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...
Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...
Journey to Blockchain Scalability: A Close Look at Complete Scaling Solutions...
 
Multiprocessor
MultiprocessorMultiprocessor
Multiprocessor
 
Blockchain Scalability - Architectures and Algorithms
Blockchain Scalability - Architectures and AlgorithmsBlockchain Scalability - Architectures and Algorithms
Blockchain Scalability - Architectures and Algorithms
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance Models
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Blockchain (1).pptx
Blockchain (1).pptxBlockchain (1).pptx
Blockchain (1).pptx
 
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
 
01 what is blockchain
01 what is blockchain01 what is blockchain
01 what is blockchain
 

More from Neotys

PAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo GibiliscoPAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo GibiliscoNeotys
 
PAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn SchepersPAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn SchepersNeotys
 
PAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo VaraniPAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo VaraniNeotys
 
PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner Neotys
 
PAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis ChatzinasiosPAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis ChatzinasiosNeotys
 
PAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan YadavPAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan YadavNeotys
 
PAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan RamachandranPAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan RamachandranNeotys
 
PAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van GaalenPAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van GaalenNeotys
 
PAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur JainPAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur JainNeotys
 
PAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen TownshendPAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen TownshendNeotys
 
PAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro MelendezPAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro MelendezNeotys
 
PAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen TownshendPAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen TownshendNeotys
 
PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo   PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo Neotys
 
PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez Neotys
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 
PAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli AparnaPAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli AparnaNeotys
 
PAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan GeorgePAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan GeorgeNeotys
 
PAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenPAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenNeotys
 
PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan  PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan Neotys
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux Neotys
 

More from Neotys (20)

PAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo GibiliscoPAC 2020 Santorin - Giovanni Paolo Gibilisco
PAC 2020 Santorin - Giovanni Paolo Gibilisco
 
PAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn SchepersPAC 2020 Santorin - Stijn Schepers
PAC 2020 Santorin - Stijn Schepers
 
PAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo VaraniPAC 2020 Santorin - Edoardo Varani
PAC 2020 Santorin - Edoardo Varani
 
PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner PAC 2020 Santorin - Andreas Grabner
PAC 2020 Santorin - Andreas Grabner
 
PAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis ChatzinasiosPAC 2020 Santorin - Vasilis Chatzinasios
PAC 2020 Santorin - Vasilis Chatzinasios
 
PAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan YadavPAC 2020 Santorin - Gopalkrishnan Yadav
PAC 2020 Santorin - Gopalkrishnan Yadav
 
PAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan RamachandranPAC 2020 Santorin - Hari Krishnan Ramachandran
PAC 2020 Santorin - Hari Krishnan Ramachandran
 
PAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van GaalenPAC 2020 Santorin - Joerek Van Gaalen
PAC 2020 Santorin - Joerek Van Gaalen
 
PAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur JainPAC 2020 Santorin - Ankur Jain
PAC 2020 Santorin - Ankur Jain
 
PAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen TownshendPAC 2020 Santorin - Stephen Townshend
PAC 2020 Santorin - Stephen Townshend
 
PAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro MelendezPAC 2020 Santorin - Leandro Melendez
PAC 2020 Santorin - Leandro Melendez
 
PAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen TownshendPAC 2019 virtual Stephen Townshend
PAC 2019 virtual Stephen Townshend
 
PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo   PAC 2019 virtual Federico Toledo
PAC 2019 virtual Federico Toledo
 
PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez PAC 2019 virtual Leandro Melendez
PAC 2019 virtual Leandro Melendez
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
PAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli AparnaPAC 2019 virtual Srivalli Aparna
PAC 2019 virtual Srivalli Aparna
 
PAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan GeorgePAC 2019 virtual Reuben Rajan George
PAC 2019 virtual Reuben Rajan George
 
PAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van GaalenPAC 2019 virtual Joerek Van Gaalen
PAC 2019 virtual Joerek Van Gaalen
 
PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan  PAC 2019 virtual Hemalatha Murugesan
PAC 2019 virtual Hemalatha Murugesan
 
PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux PAC 2019 virtual Bruno Audoux
PAC 2019 virtual Bruno Audoux
 

Recently uploaded

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 

Recently uploaded (20)

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 

PAC 2019 virtual Antoine Toulme

  • 1. Testing distributed decentralized systems by Antoine Toulme, CTO @ Whiteblock
  • 2.
  • 3. New requirements of distributed, decentralized systems • Pure peer-to-peer networks • Consensus among all nodes is critical • Eventual, asynchronous finality • The chain can reorganize! • Proof of work • Proof of stake • Applications deployed on those systems expose their own performance bottlenecks • Oracles • Bridges • New attack vectors…
  • 4. New metrics to capture • Transaction size • Sender address • Receiving address • Sent and received timestamps • Block information: number, hash, size • Transaction mempool size • Block time • Block size • Block mempool size • Block transmission time (Difference of send and receive time) • Block header validation time • Block processing time • Total delay • Uncle Rate
  • 5. Collecting metrics • Logs • Block data • Prometheus • Use data science tools like Jupyter, Grafana, the ELK stack to process. • Each run and client implementation is different
  • 6. Test suites • Control group • Network testing • Data testing • Compatibility testing • Security testing • Load testing • Consensus testing • More!
  • 8. Control group • The control test will involve a test case where latency, packet loss, and bandwidth will be configured to 0ms, 0%, and 1000 MB*, respectively. The test will run 50 transactions per second to the network in order to determine the transactional throughput of the network. Upon completion of these tests, Whiteblock will export the raw block data of all nodes. The results will be used as a reference point for future tests. • Optimal, peak performance • “Works on my machine feel”
  • 9. Latency testing • The latency test will involve 3 test cases where latency will be configured and varied from 0ms, 50ms, and 100ms. The test will run 50 transactions per second to the network in order to determine the transactional throughput of the network. Upon completion of these tests, Whiteblock will export the raw block data of all nodes. • We usually see some performance degradation. • Good benchmark as a warm up. • Note nodes peer randomly throughout the network - this means a node in New York may peer with a node in Tokyo.
  • 10. Bandwidth testing • The bandwidth test will involve 3 test cases where the bandwidth between nodes will be configured and varied from 10 MB, 50 MB, and 100 MB. The test will run 50 transactions per second to the network in order to determine the transactional throughput of the network. Upon completion of these tests, Whiteblock will export the raw block data. • We notice some blockchains are bandwidth heavy and are quite affected by this testing.
  • 11. Packet loss testing • The packet loss test will involve 3 test cases where the packet loss between nodes will be configured and varied from 0.01%, 0.1%, and 1%. The test will run 50 transactions per second to the network in order to determine the transactional throughput of the network. Upon completion of these tests, Whiteblock will export the raw block data of all nodes. • This exercises the capability of the blockchain to sustain and recover incomplete messages. This causes important issues, having to replay and request data again. • In some scenarios, this may create situations where nodes drop peers.
  • 12. Network stress testing • The stress test will involve 3 test cases where latency, packet loss, and bandwidth between nodes will be configured to 150ms, 0.01%, and 10MB respectively. The test will run 50 transactions per second to the network in order to determine the transactional throughput of the network. Upon completion of these tests, Whiteblock will export the raw block data of all nodes of all nodes. • Goal is to create something that looks like the real Internet.
  • 13. Network topology testing • The network topology test will involve 3 test cases where the network topologies for all nodes will be configured in a custom manner. The cases will be a linear peering topology, static peering to X number of nodes, and a full mesh peering topology. The test will run 50 transactions per second to the network in order to determine the transactional throughput of the network. Upon completion of these tests, Whiteblock will export the raw block data. • The block propagation time is the metric to watch here.
  • 14. Discovery topology testing • The network topology test will involve 3 test cases where the network topologies for all nodes will be configured using a discovery mechanism, against a boot node. The cases will involve 10, 20 and 30 nodes. In each case, the network should be configured to allow a maximum number of peers of 5, 10 and 20. The test will run 50 transactions per second to the network in order to determine the transactional throughput of the network. Upon completion of these tests, Whiteblock will export the raw block data. • Can the network self-organize in an optimized manner?
  • 16. Sync testing • Whiteblock will set up a regular testnet, and identify a node which it will cut from the rest of the network for a given duration. Whiteblock will monitor usage and functional resources of the node while it is cut from the network. Upon reestablishing connections, Whiteblock will check the node is able to reconnect and synchronize with the rest of the network. • How fast is sync?
  • 17. Title
  • 18. Smart contract testing • Whiteblock will set up a regular testnet, and deploy the smart contract to it. • An external dedicated helper will then exercise the contract by calling its endpoints and ensuring the results of the interactions matches the expected behavior. • Whiteblock will output the result of the testing as the state of the application after the script has executed. • Exercises the smart contract. • Possibly exercises the infrastructure using the smart contract.
  • 19. Compatibility testing • Whiteblock will set up nodes of different implementations implementing the same protocol. • Whiteblock will deploy smart contracts and inject the same transactions across all nodes. • It will then compare the output of the result and ensure they all reach the same output. It will also benchmark the time to process the transactions to check the performance of the implementations.
  • 22. Eclipse attack testing • The eclipse attack test will be the overtaking of a node’s peerlist with bad acting nodes. This will be done using a static peers list to simulate the connecting to dishonest nodes. The bad acting nodes will be on a fork of the network and will propagate blocks that are false (different than those of the canonical chain). Upon completion of these tests, Whiteblock will export the raw block data. • How do you counter eclipse attacks?
  • 23. Double spend testing • Whiteblock will set up a regular testnet, and create two competing transactions so that only one transaction may be successful at a time. Whiteblock will then inject both transactions at the same time to two different nodes of the network, and check the target account is only being credited by one transaction. One of the two transactions should be rejected. • The double spend attack is a classic. PoW is meant to ensure these attacks are defeated. • … but not all blockchains use proof of work :)
  • 24. 51% attack testing • Whiteblock will set up a testnet made of normal nodes and modified nodes that have been instructed to always follow the chain built on top of a block with a specific transaction hash. • The network is exercised with 50 transactions per second, until the attacking transaction is injected. Ideally, the consensus algorithm is able to withstand this attack and reject the transaction. • Ethereum and Bitcoin are vulnerable to 51% attacks.
  • 26. Local load testing • Whiteblock will set up a regular testnet, and select a node to be the recipient of the load. • Whiteblock will inject continuously over a thousand transactions per second to the node for a configurable period of times, in minutes. During the test, Whiteblock will monitor resources usage on the node and check the transaction success rate over the network. • What will make a node fall over?
  • 27. Distributed load testing • Whiteblock will set up a regular testnet. • Whiteblock will inject continuously over a thousand transactions per second to all nodes for a configurable period of time, in minutes. During the test, Whiteblock will monitor resources usage on nodes and check the transaction success rate over the network. • Good measure of stress of the network under heavy load
  • 29. Block time testing • In blockchains, block times may vary depending on implementation. The block time can affect the way a network behaves and a shorter block time will usually lead to a higher orphan (uncle) rate in a proof-of-work network. This is important as a higher orphan (uncle) rate equates to a lower level of security in the network until those orphans (uncles) are pruned and the nodes are synced up to the latest canonical block. This test will focus on measuring block times in the network and upon completion of this test, Whiteblock will export the raw block data.
  • 30. State transition testing • Whiteblock will initiate one node with an existing, static state. • It will create pre-determined conditions by which the state of the application will mutate, such as a state transition or a new block. • Whiteblock will output the state in a machine-readable format and compare it to an expected output. • Great to debug and check compatibility between clients of a new chain.
  • 31. Finality testing • Some blockchains support eventual finality. New blockchains based on proof of stake support strong, deterministic finality. Whiteblock will set up a regular testnet and observe block finalization. It will compare the times at which blocks are finalized between clients. When applicable, Whiteblock will create situations where finalization is difficult based on the network topology or the transaction load, and check finalization still operates uniformly across clients.
  • 32. MOAR testing • Custom testing cases, such as: • Comparisons between blockchains • Network bad actors • Rendez-vous nodes • TCP hole punching tests • UDP-based traffic • Tor and VPN traffic • …