SlideShare a Scribd company logo
Eth 2.0
Testing and Simulation
1
Hello!I am Mamy Ratsimbazafy
Part of the Nimbus Eth1 and Eth2
implementer team at Status
“Adolescent Full Mustang”
@mratsim
@m_ratsim
2
Where are we?
https://github.com/ethereum/eth2.0-specs
Phase 0
● The beacon chain
● Status:
○ testnets incoming
Responsibilities
● Coordination layer
● Sharding
● Block processing
○ Proof-of-Stake
○ Managing validators,
shards, committees and
attestations.
● Additional features
○ Finality
○ RNG
○ Cross-shard
communication
○ Eth1 transition
3
What’s next?
https://github.com/ethereum/eth2.0-specs
Phase 1
● The shard data chains
● Status:
○ Spec written, no
implementation started.
● Responsibilities
○ Consensus over the data
(e.g. account balance)
Phase 2
● The VM / execution layer
● Status:
○ In discussion (eWASM?)
● Responsibilities
○ Executing transactions
(from simple transfers to
smart-contracts)
4
What’s next?
https://github.com/ethereum/wiki/wiki/Sharding-roadmap
Phase 3
● Light clients
Phase 4
● Cross-shard transactions
5
What’s next?
https://github.com/ethereum/wiki/wiki/Sharding-roadmap
Phase 5
● Ethereum 2.0 endgame
6
What’s next?
https://github.com/ethereum/wiki/wiki/Sharding-roadmap
Phase 6
● Super quadratic sharding
7
Diving into the beacon chain
Credits: Hsiao Wei Wang, Ethereum Foundation
8
Beacon Chain
provides random
numbers
Shard Chain
provides data
Shard 100
B1 B2 B3 B4 B5
VM
provides state
execution result
Shard 1
Main Chain
provides staking
B1
state
root
B2
state
root
B3
state
root
B4
state
root
B5
state
root
Diving into the beacon chain
https://observablehq.com/@cdetrio/shasper-viz-0-4
Credits: Casey Detrio, Ethereum Foundation
9
Diving into the beacon chain
Credits: Diederik Loerakker, @protolamba
10
Blast from the past
https://web.archive.org/web/20131219030753/http://vitalik.ca/ethereum.html
11
Basic Building Blocks
Network: Ethereum will run on its own network with a memory-hard proof of
work (not yet released) and a 60-second block time using single-level
GHOST (see http://www.cs.huji.ac.il/~avivz/pubs/13/btc_scalability_full.pdf)
to improve security and fairness with fast confirmation times. The restriction
to single-level is done for simplicity and because a very fast block time is
undesirable for other reasons - namely, blocks will potentially take a very
long time to evaluate, so high levels of waste are computationally
undesirable, and block validation time will be potentially very high variance.
Currency: [...]
Issuance model: [...]
Transactions: transactions in Ethereum will be simple, with one sender,
one recipient, a value, a fee and a message consisting of zero or more data
items that are integers in [ 0 ... 2^256 - 1] (ie. 32 byte values). All
transactions are valid; transactions where the recipient has insufficient funds
simply do nothing. Transactions sent to the zero address (ie. whose
hexadecimal representation is all zeroes) are a special type of transaction,
creating a "contract".
Beacon chain spec - initial commit
https://ethresear.ch/t/convenience-link-to-casper-sharding-chain-v2-1-spec/2332
12
Life of a beacon chain implementer
June-Sept 2018 - The HackMD + ethresear.ch period
13
Life of a beacon chain implementer
Sept 2018-Feb 2019 - Living commit by commit
14
Life of a beacon chain implementer
Feb 2019-Present - Spec releases!
15
What could go wrong?
16
What could go wrong?
17
Specs
● “Trivial” bugs
(off-by-one)
● Edge cases (genesis,
forced exits)
● Vulnerabilities (DOS
attacks)
● Underspecification &
interoperability (crypto &
serialization)
● Slowness (shuffling)
● Incentives / Game Theory
Implementation
● Overflow/underflow
● Slowness (using naive
spec algorithm)
● Spec miscomprehension
● Vulnerabilities
● Implementation “details”
What could go wrong?
Focus on implementation “details”
18
Cryptography P2P Networking
Signature
aggregation
Serialization
Consensus
Sync
State
transition
What could go wrong?
Practical case - shuffling
19
What could go wrong?
Practical case - shuffling
20
- Understanding the shuffling algorithms
- Determinism issues
- Attack vector concerns
- Performance concerns (light clients)
- Out-of-bounds bugs (in the specs not even in
implementations)
And we have 9 teams, each implementing their own clients.
Why so many clients at launch?
Unlike Eth 1.0
21
Client implementations
Prysm (Prysmatic Labs, Go)
● https://github.com/prysmaticlabs/prysm
Shasper (Parity Technologies, Rust)
● https://github.com/paritytech/shasper
Trinity (Ethereum Foundation, Python)
● https://github.com/ethereum/trinity
Yeeth (ZK Labs, Swift)
● https://github.com/yeeth/BeaconChain.swift
Artemis (ConsenSys, Java)
● https://github.com/PegaSysEng/artemis
Harmony (Harmony, Java)
● https://github.com/harmony-dev/beacon-chain-java
Lodestar (ChainSafe System, Typescript / Javascript)
● https://github.com/ethereum/trinity
Lighthouse (Sigma Prime, Rust)
● https://github.com/sigp/lighthouse
Nimbus (Status, Nim)
● https://github.com/status-im/nim-beacon-chain
22
What do we do?
Common testing repositories
- https://github.com/ethereum/eth2.0-tests/
- Handcrafted and generated test vectors
- https://github.com/ethereum/eth2.0-test-generators
- Generate test vectors using Trinity reference implementation
Status: test vectors for “relatively” stable and self-contained part of the spec
- Crypto: BLS signatures
- Shuffling
- Serialization
23
What did we learn from Eth 1.0?
24
- A test repo that can be submoduled is good
- Having no comment (json) in test files is bad
- Having an insane amount of lines of code to review is worse
What did we learn from Eth 1.0?
25
What did we learn from Eth 1.0?
26
What did we learn from Eth 1.0?
27
Coming soon
More unit tests
- Merkle tree hashing
- Fork choice (proof-of-stake)
- Beacon state “god object”
Client-specific testnets
28
TODO - cross-client testnet
Pending - wire protocol:
https://github.com/ethereum/eth2.0-specs/issues/593
Libp2p interop framework:
https://github.com/libp2p/interop#interoperability-tests-for-libp2p
Sharding P2P POC:
https://github.com/ethresearch/sharding-p2p-poc/tree/master/docs
29
Simulations
Kinds of simulations for Eth 2.0
- High-level overview
- Full simulation with a real client (coming soon™)
- Sharding simulations
- Consensus simulations
Some are in color ;)
30
Simulation - High-Level Overview
https://observablehq.com/@cdetrio/shasper-viz-0-4
Credits: Casey Detrio, Ethereum Foundation
31
Simulation - Consensus
https://github.com/leobago/shardSim
Credits: Leo Bautista Gomez - Barcelona Supercomputing Center
32
Available research simulators
● Jannik Luhn - https://github.com/jannikluhn/sharding-netsim (sharding)
● Leo Bautista Gomez - https://github.com/leobago/shardSim (consensus)
● EF + libp2p + Whiteblock - https://github.com/ethresearch/sharding-p2p-poc (sharding)
● Consensys - https://github.com/ConsenSys/wittgenstein (consensus)
● Protolambda - https://github.com/protolambda/lmd-ghost (consensus)
● Vitalik
○ https://github.com/ethereum/research/tree/master/clock_disparity
○ https://github.com/ethereum/research/tree/master/ghost
● Whiteblock - https://github.com/zscole/nonce (whole blockchain, needs client)
And all client teams coming soon™
33
Looking for a place to start?
34
Thank you!
35

More Related Content

PDF
Deja vu JavaZone 2013
PPTX
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
PPTX
A tale of two(many) proxies
PPTX
Pentesting custom TLS stacks
PPTX
Mutual Exclusion
PPTX
Scapy TLS: A scriptable TLS 1.3 stack
ODP
Fscons scalable appplication transfers
PPTX
Cutting edge android stack. One year later
Deja vu JavaZone 2013
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
A tale of two(many) proxies
Pentesting custom TLS stacks
Mutual Exclusion
Scapy TLS: A scriptable TLS 1.3 stack
Fscons scalable appplication transfers
Cutting edge android stack. One year later

What's hot (11)

PDF
Skydive 5/07/2016
PDF
Design of a secure "Token Passing" protocol
PDF
MOVED: The challenge of SVE in QEMU - SFO17-103
ZIP
Workshop@naha val3
PDF
Ia+ threading
PPTX
Practical rsa padding oracle attacks
PDF
Использование KASan для автономного гипервизора
KEY
No locked doors, no windows barred: hacking OpenAM infrastructure
PPTX
NBTC#2 - Why instrumentation is cooler then ice
PDF
AV Evasion with the Veil Framework
ODP
Snaps on open suse
Skydive 5/07/2016
Design of a secure "Token Passing" protocol
MOVED: The challenge of SVE in QEMU - SFO17-103
Workshop@naha val3
Ia+ threading
Practical rsa padding oracle attacks
Использование KASan для автономного гипервизора
No locked doors, no windows barred: hacking OpenAM infrastructure
NBTC#2 - Why instrumentation is cooler then ice
AV Evasion with the Veil Framework
Snaps on open suse
Ad

Similar to Eth cc --eth2-tests-and-implementation (20)

PDF
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019
PPTX
Ethereum 2.0
PDF
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
PPTX
CCS339 Unit IV is explained in detail for easy understanding
PDF
Ethereum Roadmap Explained In Laymans Terms
PDF
[CB20] -U25 Ethereum 2.0 Security by Naoya Okanami
PDF
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
PDF
Ethereum vs fabric vs corda
PDF
Ethereumの最新動向2018年8月
PDF
Ethereum: From there to here, and ownards yonder
PPTX
What is Ethereum 2.0
PPTX
EthereumBlockchainMarch3 (1).pptx
PDF
Blockchains - Technical foundations
PDF
Wwc developing hyperledger applications v4
PDF
Smart contracts in Solidity
PDF
Ethereum A to Z
PPTX
Ethereum.pptx
PPTX
Ethereum Block Chain
PDF
Hyperledger Besu for Private & Public Enterprise introduction slides
PPTX
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019
Ethereum 2.0
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
CCS339 Unit IV is explained in detail for easy understanding
Ethereum Roadmap Explained In Laymans Terms
[CB20] -U25 Ethereum 2.0 Security by Naoya Okanami
Architecture of the Hyperledger Blockchain Fabric - Christian Cachin - IBM Re...
Ethereum vs fabric vs corda
Ethereumの最新動向2018年8月
Ethereum: From there to here, and ownards yonder
What is Ethereum 2.0
EthereumBlockchainMarch3 (1).pptx
Blockchains - Technical foundations
Wwc developing hyperledger applications v4
Smart contracts in Solidity
Ethereum A to Z
Ethereum.pptx
Ethereum Block Chain
Hyperledger Besu for Private & Public Enterprise introduction slides
Dappsmedia smartcontract _write_smartcontracts_on_console_ethereum
Ad

More from Bruno Skvorc (9)

PDF
Nft presentation-bruno
PDF
Funding your web3 project
PDF
Defi - otvorene financije
PDF
Fear the walking dev
PDF
Teaching Tuesday 1: The Tanganyika Laughter Epidemic
PDF
Teaching Tuesday 2: How Does the Atomic Clock Work?
PDF
Teachin Tuesday 3: Dazzle painting ships to confuse submarines
PDF
Auditing smart contracts beyond code and into godmode backdoors
PDF
Blockchain origins, forks, crime, and anonimity vs privacy
Nft presentation-bruno
Funding your web3 project
Defi - otvorene financije
Fear the walking dev
Teaching Tuesday 1: The Tanganyika Laughter Epidemic
Teaching Tuesday 2: How Does the Atomic Clock Work?
Teachin Tuesday 3: Dazzle painting ships to confuse submarines
Auditing smart contracts beyond code and into godmode backdoors
Blockchain origins, forks, crime, and anonimity vs privacy

Recently uploaded (20)

PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PDF
cuic standard and advanced reporting.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Machine Learning_overview_presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Electronic commerce courselecture one. Pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Getting Started with Data Integration: FME Form 101
PPTX
Tartificialntelligence_presentation.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Machine learning based COVID-19 study performance prediction
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
cuic standard and advanced reporting.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Machine Learning_overview_presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
A comparative analysis of optical character recognition models for extracting...
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars
Electronic commerce courselecture one. Pdf
1. Introduction to Computer Programming.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
Getting Started with Data Integration: FME Form 101
Tartificialntelligence_presentation.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Machine learning based COVID-19 study performance prediction

Eth cc --eth2-tests-and-implementation

  • 1. Eth 2.0 Testing and Simulation 1
  • 2. Hello!I am Mamy Ratsimbazafy Part of the Nimbus Eth1 and Eth2 implementer team at Status “Adolescent Full Mustang” @mratsim @m_ratsim 2
  • 3. Where are we? https://github.com/ethereum/eth2.0-specs Phase 0 ● The beacon chain ● Status: ○ testnets incoming Responsibilities ● Coordination layer ● Sharding ● Block processing ○ Proof-of-Stake ○ Managing validators, shards, committees and attestations. ● Additional features ○ Finality ○ RNG ○ Cross-shard communication ○ Eth1 transition 3
  • 4. What’s next? https://github.com/ethereum/eth2.0-specs Phase 1 ● The shard data chains ● Status: ○ Spec written, no implementation started. ● Responsibilities ○ Consensus over the data (e.g. account balance) Phase 2 ● The VM / execution layer ● Status: ○ In discussion (eWASM?) ● Responsibilities ○ Executing transactions (from simple transfers to smart-contracts) 4
  • 8. Diving into the beacon chain Credits: Hsiao Wei Wang, Ethereum Foundation 8 Beacon Chain provides random numbers Shard Chain provides data Shard 100 B1 B2 B3 B4 B5 VM provides state execution result Shard 1 Main Chain provides staking B1 state root B2 state root B3 state root B4 state root B5 state root
  • 9. Diving into the beacon chain https://observablehq.com/@cdetrio/shasper-viz-0-4 Credits: Casey Detrio, Ethereum Foundation 9
  • 10. Diving into the beacon chain Credits: Diederik Loerakker, @protolamba 10
  • 11. Blast from the past https://web.archive.org/web/20131219030753/http://vitalik.ca/ethereum.html 11 Basic Building Blocks Network: Ethereum will run on its own network with a memory-hard proof of work (not yet released) and a 60-second block time using single-level GHOST (see http://www.cs.huji.ac.il/~avivz/pubs/13/btc_scalability_full.pdf) to improve security and fairness with fast confirmation times. The restriction to single-level is done for simplicity and because a very fast block time is undesirable for other reasons - namely, blocks will potentially take a very long time to evaluate, so high levels of waste are computationally undesirable, and block validation time will be potentially very high variance. Currency: [...] Issuance model: [...] Transactions: transactions in Ethereum will be simple, with one sender, one recipient, a value, a fee and a message consisting of zero or more data items that are integers in [ 0 ... 2^256 - 1] (ie. 32 byte values). All transactions are valid; transactions where the recipient has insufficient funds simply do nothing. Transactions sent to the zero address (ie. whose hexadecimal representation is all zeroes) are a special type of transaction, creating a "contract".
  • 12. Beacon chain spec - initial commit https://ethresear.ch/t/convenience-link-to-casper-sharding-chain-v2-1-spec/2332 12
  • 13. Life of a beacon chain implementer June-Sept 2018 - The HackMD + ethresear.ch period 13
  • 14. Life of a beacon chain implementer Sept 2018-Feb 2019 - Living commit by commit 14
  • 15. Life of a beacon chain implementer Feb 2019-Present - Spec releases! 15
  • 16. What could go wrong? 16
  • 17. What could go wrong? 17 Specs ● “Trivial” bugs (off-by-one) ● Edge cases (genesis, forced exits) ● Vulnerabilities (DOS attacks) ● Underspecification & interoperability (crypto & serialization) ● Slowness (shuffling) ● Incentives / Game Theory Implementation ● Overflow/underflow ● Slowness (using naive spec algorithm) ● Spec miscomprehension ● Vulnerabilities ● Implementation “details”
  • 18. What could go wrong? Focus on implementation “details” 18 Cryptography P2P Networking Signature aggregation Serialization Consensus Sync State transition
  • 19. What could go wrong? Practical case - shuffling 19
  • 20. What could go wrong? Practical case - shuffling 20 - Understanding the shuffling algorithms - Determinism issues - Attack vector concerns - Performance concerns (light clients) - Out-of-bounds bugs (in the specs not even in implementations) And we have 9 teams, each implementing their own clients.
  • 21. Why so many clients at launch? Unlike Eth 1.0 21
  • 22. Client implementations Prysm (Prysmatic Labs, Go) ● https://github.com/prysmaticlabs/prysm Shasper (Parity Technologies, Rust) ● https://github.com/paritytech/shasper Trinity (Ethereum Foundation, Python) ● https://github.com/ethereum/trinity Yeeth (ZK Labs, Swift) ● https://github.com/yeeth/BeaconChain.swift Artemis (ConsenSys, Java) ● https://github.com/PegaSysEng/artemis Harmony (Harmony, Java) ● https://github.com/harmony-dev/beacon-chain-java Lodestar (ChainSafe System, Typescript / Javascript) ● https://github.com/ethereum/trinity Lighthouse (Sigma Prime, Rust) ● https://github.com/sigp/lighthouse Nimbus (Status, Nim) ● https://github.com/status-im/nim-beacon-chain 22
  • 23. What do we do? Common testing repositories - https://github.com/ethereum/eth2.0-tests/ - Handcrafted and generated test vectors - https://github.com/ethereum/eth2.0-test-generators - Generate test vectors using Trinity reference implementation Status: test vectors for “relatively” stable and self-contained part of the spec - Crypto: BLS signatures - Shuffling - Serialization 23
  • 24. What did we learn from Eth 1.0? 24 - A test repo that can be submoduled is good - Having no comment (json) in test files is bad - Having an insane amount of lines of code to review is worse
  • 25. What did we learn from Eth 1.0? 25
  • 26. What did we learn from Eth 1.0? 26
  • 27. What did we learn from Eth 1.0? 27
  • 28. Coming soon More unit tests - Merkle tree hashing - Fork choice (proof-of-stake) - Beacon state “god object” Client-specific testnets 28
  • 29. TODO - cross-client testnet Pending - wire protocol: https://github.com/ethereum/eth2.0-specs/issues/593 Libp2p interop framework: https://github.com/libp2p/interop#interoperability-tests-for-libp2p Sharding P2P POC: https://github.com/ethresearch/sharding-p2p-poc/tree/master/docs 29
  • 30. Simulations Kinds of simulations for Eth 2.0 - High-level overview - Full simulation with a real client (coming soon™) - Sharding simulations - Consensus simulations Some are in color ;) 30
  • 31. Simulation - High-Level Overview https://observablehq.com/@cdetrio/shasper-viz-0-4 Credits: Casey Detrio, Ethereum Foundation 31
  • 32. Simulation - Consensus https://github.com/leobago/shardSim Credits: Leo Bautista Gomez - Barcelona Supercomputing Center 32
  • 33. Available research simulators ● Jannik Luhn - https://github.com/jannikluhn/sharding-netsim (sharding) ● Leo Bautista Gomez - https://github.com/leobago/shardSim (consensus) ● EF + libp2p + Whiteblock - https://github.com/ethresearch/sharding-p2p-poc (sharding) ● Consensys - https://github.com/ConsenSys/wittgenstein (consensus) ● Protolambda - https://github.com/protolambda/lmd-ghost (consensus) ● Vitalik ○ https://github.com/ethereum/research/tree/master/clock_disparity ○ https://github.com/ethereum/research/tree/master/ghost ● Whiteblock - https://github.com/zscole/nonce (whole blockchain, needs client) And all client teams coming soon™ 33
  • 34. Looking for a place to start? 34