SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Design of a secure "Token Passing" protocol
Design of a secure "Token Passing" protocolDesign of a secure "Token Passing" protocol
Design of a secure "Token Passing" protocolAugusto Ciuffoletti
 
MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103MOVED: The challenge of SVE in QEMU - SFO17-103
MOVED: The challenge of SVE in QEMU - SFO17-103Linaro
 
Practical rsa padding oracle attacks
Practical rsa padding oracle attacksPractical rsa padding oracle attacks
Practical rsa padding oracle attacksAlexandre Moneger
 
Использование KASan для автономного гипервизора
Использование KASan для автономного гипервизораИспользование KASan для автономного гипервизора
Использование KASan для автономного гипервизораPositive Hack Days
 
No locked doors, no windows barred: hacking OpenAM infrastructure
No locked doors, no windows barred: hacking OpenAM infrastructureNo locked doors, no windows barred: hacking OpenAM infrastructure
No locked doors, no windows barred: hacking OpenAM infrastructureAndrew Petukhov
 
NBTC#2 - Why instrumentation is cooler then ice
NBTC#2 - Why instrumentation is cooler then iceNBTC#2 - Why instrumentation is cooler then ice
NBTC#2 - Why instrumentation is cooler then iceAlexandre Moneger
 
AV Evasion with the Veil Framework
AV Evasion with the Veil FrameworkAV Evasion with the Veil Framework
AV Evasion with the Veil FrameworkVeilFramework
 

Tendances (11)

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

Similaire à Eth cc --eth2-tests-and-implementation

Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contractsGautam Anand
 
Scorex meetup-aug-2015
Scorex meetup-aug-2015Scorex meetup-aug-2015
Scorex meetup-aug-2015Alex Chepurnoy
 
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...Codemotion
 
Introduction to Ewasm - crosslink taipei 2019
Introduction to Ewasm - crosslink taipei 2019Introduction to Ewasm - crosslink taipei 2019
Introduction to Ewasm - crosslink taipei 2019hydai
 
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019OlgaCoinFund
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications malikmayank
 
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDFDEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDFGokul Alex
 
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract DeathsBlockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract DeathsPriyanka Aash
 
Automating linux network performance testing
Automating linux network performance testingAutomating linux network performance testing
Automating linux network performance testingAntonio Ojea Garcia
 
Blockchain Development
Blockchain DevelopmentBlockchain Development
Blockchain Developmentpreetikumara
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackKeitaSugiyama1
 
Layer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid ComputeLayer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid ComputeTinaBregovi
 
[CB20] -U25 Ethereum 2.0 Security by Naoya Okanami
[CB20] -U25  Ethereum 2.0 Security by Naoya Okanami[CB20] -U25  Ethereum 2.0 Security by Naoya Okanami
[CB20] -U25 Ethereum 2.0 Security by Naoya OkanamiCODE BLUE
 
StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721TinaBregovi
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with ErlangMaxim Kharchenko
 

Similaire à Eth cc --eth2-tests-and-implementation (20)

Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
 
Scorex meetup-aug-2015
Scorex meetup-aug-2015Scorex meetup-aug-2015
Scorex meetup-aug-2015
 
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
 
Introduction to Ewasm - crosslink taipei 2019
Introduction to Ewasm - crosslink taipei 2019Introduction to Ewasm - crosslink taipei 2019
Introduction to Ewasm - crosslink taipei 2019
 
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019
Preston Van Loon | Ethereum 2.0 at CoinFund Rabbithole Talks | February 28, 2019
 
Developing Blockchain Applications
Developing Blockchain Applications Developing Blockchain Applications
Developing Blockchain Applications
 
Operating System lab
Operating System labOperating System lab
Operating System lab
 
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDFDEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF
 
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract DeathsBlockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
Blockchain Autopsies - Analyzing Ethereum Smart Contract Deaths
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
 
Automating linux network performance testing
Automating linux network performance testingAutomating linux network performance testing
Automating linux network performance testing
 
Ethereum
EthereumEthereum
Ethereum
 
Blockchain Development
Blockchain DevelopmentBlockchain Development
Blockchain Development
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM Stack
 
ETC Summit 18
ETC Summit 18ETC Summit 18
ETC Summit 18
 
Layer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid ComputeLayer Hack: Boba Network: Understanding Hybrid Compute
Layer Hack: Boba Network: Understanding Hybrid Compute
 
[CB20] -U25 Ethereum 2.0 Security by Naoya Okanami
[CB20] -U25  Ethereum 2.0 Security by Naoya Okanami[CB20] -U25  Ethereum 2.0 Security by Naoya Okanami
[CB20] -U25 Ethereum 2.0 Security by Naoya Okanami
 
StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721StarkNet ERC20 + ERC721
StarkNet ERC20 + ERC721
 
Advances in Open Source Password Cracking
Advances in Open Source Password CrackingAdvances in Open Source Password Cracking
Advances in Open Source Password Cracking
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
 

Plus de Bruno Skvorc

Nft presentation-bruno
Nft presentation-brunoNft presentation-bruno
Nft presentation-brunoBruno Skvorc
 
Funding your web3 project
Funding your web3 projectFunding your web3 project
Funding your web3 projectBruno Skvorc
 
Defi - otvorene financije
Defi - otvorene financijeDefi - otvorene financije
Defi - otvorene financijeBruno Skvorc
 
Fear the walking dev
Fear the walking devFear the walking dev
Fear the walking devBruno Skvorc
 
Teaching Tuesday 1: The Tanganyika Laughter Epidemic
Teaching Tuesday 1: The Tanganyika Laughter EpidemicTeaching Tuesday 1: The Tanganyika Laughter Epidemic
Teaching Tuesday 1: The Tanganyika Laughter EpidemicBruno Skvorc
 
Teaching Tuesday 2: How Does the Atomic Clock Work?
Teaching Tuesday 2: How Does the Atomic Clock Work?Teaching Tuesday 2: How Does the Atomic Clock Work?
Teaching Tuesday 2: How Does the Atomic Clock Work?Bruno Skvorc
 
Teachin Tuesday 3: Dazzle painting ships to confuse submarines
Teachin Tuesday 3: Dazzle painting ships to confuse submarinesTeachin Tuesday 3: Dazzle painting ships to confuse submarines
Teachin Tuesday 3: Dazzle painting ships to confuse submarinesBruno Skvorc
 
Auditing smart contracts beyond code and into godmode backdoors
Auditing smart contracts   beyond code and into godmode backdoorsAuditing smart contracts   beyond code and into godmode backdoors
Auditing smart contracts beyond code and into godmode backdoorsBruno Skvorc
 
Blockchain origins, forks, crime, and anonimity vs privacy
Blockchain origins, forks, crime, and anonimity vs privacyBlockchain origins, forks, crime, and anonimity vs privacy
Blockchain origins, forks, crime, and anonimity vs privacyBruno Skvorc
 

Plus de Bruno Skvorc (9)

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

Dernier

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 

Dernier (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

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
  • 5. What’s next? https://github.com/ethereum/wiki/wiki/Sharding-roadmap Phase 3 ● Light clients Phase 4 ● Cross-shard transactions 5
  • 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