Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

[CB20] -U25 Ethereum 2.0 Security by Naoya Okanami

Ethereum 2.0 is a major upgrade to improve the performance of Ethereum. It will increase transaction processing capacity and alleviate the problem of fees, which have been rising to the point where millions of dollars are spent every day.

In this talk, I explain how Ethereum 2.0 can be secured as the next generation of decentralized application platforms and present the research we are working on as part of that effort. First, I talk about technologies to improve security, including client diversity, fuzzing using multiple clients, and the fee market protocol EIP-1559. Second, I introduce Shargri-La, a protocol development support software we are developing (*), a simulator that helps researchers and developers quickly test protocol hypotheses to improve the performance and security of Ethereum 2.0. It simulates state transitions at the transaction level of granularity in "sharding," a technique that divides the blockchain into multiple pieces. Finally, I present the results of multi-agent simulations under EIP-1559 by modeling users' selfish behaviors and show possible future problems and mitigation solutions.

  • Be the first to comment

  • Be the first to like this

[CB20] -U25 Ethereum 2.0 Security by Naoya Okanami

  1. 1. Ethereum 2.0 Security Naoya Okanami
  2. 2. Who Am I? ● Naoya Okanami, also known as minaminao. ● LayerX Labs Researcher, 2019-. ● Master's Program, University of Tsukuba, 2020-. ● IPA MITOU Program 2020 ● CTF Team: ./Vespiary
  3. 3. Agenda ● Ethereum 2.0 Overview ● Ethereum 2.0 Security ● Shargri-La Overview ● Analysis of EIP-1559 and ETH Transfers ● Future Work of Shargri-La
  4. 4. Ethereum 2.0 Overview
  5. 5. ● Factor: Decentralized Finance (DeFi) ● Limits the applications ● Bad for UX and security ● Increasing throughput is required. Today’s Fee
  6. 6. What is Ethereum 2.0? A major upgrade to the Ethereum network, improving scalablity and security ● Phase 0: Staking ○ Scheduled to launch in November! ● Phase 1: Sharding (saving data only) ● Phase 1.5: Move the Eth1 chain into an Eth2 shard chain ● Phase 2: Sharding (state execution)
  7. 7. Sharding Split into multiple blockchains for improving its performance Shard 1 Shard 2 Shard 3
  8. 8. Beacon Chain provides random numbers Shard Chain provides data Shard 64 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. 9. Ethereum 2.0 Security
  10. 10. Client Diversity Ethereum 2.0 Clients ● Prysm (Go) ● Lighthouse (Rust) ● Nimbus (Nim) ● Lodestar (TypeScript) ● Teku (Java) If one client is down, the others survive.
  11. 11. Client Diversity https://medium.com/prysmatic-labs/eth2-medalla-testnet-incident-f7fbc3cc934a
  12. 12. beacon-fuzz: A differential fuzzer for Ethereum 2.0 https://github.com/sigp/beacon-fuzz
  13. 13. EIP-1559: Fee market change ● An improved scheme for the first price auction currently used by Ethereum (same for Bitcoin) ● EIP-1559 introduces a dynamic minimum gas prce, “basefee”. ● The basefee is adjusted to transaction demand. ● Highly likely to be introduced in Ethereum 2.0
  14. 14. EIP-1559: Fee market change Strategic issues in 1559
  15. 15. EIP-1559: Fee market change Strategic issues in 1559
  16. 16. Shargri-La A Transaction-level Sharded Blockchain Simulator
  17. 17. What is Shargri-La? A Transaction-level Sharded Blockchain Simulator Shard 1 Shard 2 Shard 3
  18. 18. Simulation Targets Transaction-level P2P Consensus User Behaviour Smart Contracts Virtual Machine
  19. 19. ● Is the protocol working as it's supposed to? ● Isn't the protocol working because of the user's behavior? ● Isn't there some kind of attack method? ● Which algorithm is more suitable? ● What are the optimal parameters? ● ... ● Doesn't cross-shard TX make the UX worse? ● How many shards should a user watch? ● What happens if the load is concentrated on a particular shard? Issues that can be solved with Shargri-La Solved!!
  20. 20. Current Progress: Version 0.1.0 Released! https://github.com/shargri-la/shargri-la
  21. 21. Current Progress: Version 0.1.0 Released! https://ethresear.ch/t/shargri-la-a-transaction-level-sharded-blockchain-simulator/7936
  22. 22. Current Progress: Version 0.1.0 Released! ● The core of the simulator is written in Rust ● The graph visualization is written in Python (Matplotlib, Pandas)
  23. 23. Version 0.1.0 Analysis of EIP-1559 and ETH Transfers
  24. 24. Overview
  25. 25. UserGraph: A Transaction Demand Model
  26. 26. Simulation Settings ● The number of shards: 64 ● The number of users: 10,000 ● A user will move the shard every 100 slots. ● UserGraph parameters are set by uniform random numbers.
  27. 27. ETH Transfers ● We assume that all the on-chain activities are only the transfers of ETH. ● We didn't implement virtual machine that runs smart contracts to avoid increasing complexity.
  28. 28. Cost-reducing Wallet ● The hypothesis that we have had since the beginning of our research: "Users periodically change the shards they use to avoid the increased costs of cross-shard transactions.” ● We assume that this user behavior is accomplished by the user’s "wallet".
  29. 29. Experiment 1: No user switches shards.
  30. 30. Experiment 2: A minority of users switch shards with the minimum selection.
  31. 31. Experiment 2: A minority of users switch shards with the minimum selection.
  32. 32. Experiment 2: A minority of users switch shards with the minimum selection.
  33. 33. Experiment 2: A minority of users switch shards with the minimum selection.
  34. 34. Experiment 2: A minority of users switch shards with the minimum selection.
  35. 35. Experiment 3: A majority of users switch shards with the minimum selection.
  36. 36. Experiment 3: A majority of users switch shards with the minimum selection.
  37. 37. Experiment 3: A majority of users switch shards with the minimum selection.
  38. 38. Experiment 3: A majority of users switch shards with the minimum selection.
  39. 39. Experiment 3: A majority of users switch shards with the minimum selection. ● Users rush to the minimum fee shard. ● Stuck transactions occurs. ● It's not a good algorithm (and phenomenon) for users.
  40. 40. Experiment 4: A majority of users switch shards with weighted random selection.
  41. 41. Experiment 4: A majority of users switch shards with weighted random selection.
  42. 42. Experiment 4: A majority of users switch shards with weighted random selection.
  43. 43. Experiment 4: A majority of users switch shards with weighted random selection.
  44. 44. Experiment 4: A majority of users switch shards with weighted random selection.
  45. 45. Experiment 4: A majority of users switch shards with weighted random selection. ● Users rush to the minimum fee shard. ● Stuck transactions occurs. ● It's not a good algorithm for users.
  46. 46. Experiment 5: Switchers with the minimum selection, switchers with the weighted random selection, and non-switchers co-exist.
  47. 47. Experiment 6: An extremely popular user exists.
  48. 48. Experiment 6: An extremely popular user exists.
  49. 49. Future Work of Shargri-La
  50. 50. Phase 1/1.5 Data Fee Market ● Ethereum 2.0 Phase 0 is scheduled to launch in November. ● Phase 1 (sharding as a data layer) research is required. ● A EIP-1559-like data fee market is supposed for Phase 1.
  51. 51. Q&A
  52. 52. Appendix
  53. 53. Comparison With Similar Systems Simulation Targets Architecture P2P (Layer 0) Consensus (Layer 1) User, TX (Layer 1.5+) Sharding shardSim ◯ ◯ ☓ ◯ SimBlock ◯ ◯ ☓ ☓ VIBES ◯ ◯ ☓ ☓ Bitcoin-Simulator (ns-3 based) ◯ ◯ ☓ ☓ Shargri-La ☓ ☓ ◯ ◯
  54. 54. Blockchain ・・・ ・・・
  55. 55. Scalability ● Validators have and process the same blockchain data locally. ● It's not parallel processing, so it doesn't scale with more validators.
  56. 56. Cross-shard Transactions
  57. 57. Academic Sharding Research Year Paper Title Conference 2016 A Secure Sharding Protocol For Open Blockchains CCS 2016 2017 OmniLedger: A Secure, Scale-Out, Decentralized Ledger via Sharding S&P 2018 Chainspace: A Sharded Smart Contracts Platform NDSS 2018 2018 RapidChain: Scaling Blockchain via Full Sharding CCS 2018 Towards Scaling Blockchain Systems via Sharding SIGMOD 2019 2019 Monoxide: Scale Out Blockchain with Asynchronous Consensus Zones NSDI 2019 etc.
  58. 58. “Week in Ethereum News” https://weekinethereumnews.com/week-in-ethereum-news-september-6-2020/
  59. 59. “What’s New in Eth2” https://hackmd.io/@benjaminion/eth2_news/https%3A%2F%2Fhackmd.io%2F%40benjaminion%2Fwnie2_200905
  60. 60. Feedback by Other Resercher

×