1 of 20

Design Choices

in Eth2.0

Aditya Asgaonkar

Ethereum Foundation

2 of 20

Eth2.0 Design Requirements

  1. Scalability

Super-linear scaling: total throughput of the system is super-linear w.r.t throughput of a single node

  • Security

Security of the system is uniform in all parts, and corresponds to consensus safety across all nodes

3 of 20

Eth2.0 Design Requirements

  • Scalability

Super-linear scaling: if capacity of each node increases K times, then capacity of total system increases super-linearly w.r.t. K

  • Security

Security of the system is uniform in all parts, and corresponds to consensus safety across all nodes

4 of 20

Scalability

  • Sharding
    • Partition the state into distinct shards
    • Subsets of the total validator set are responsible for each partition

5 of 20

Security

  • Beacon Chain
    • All validators form consensus on the cumulative total state, which is the accumulation of the states of all shards

Combining this with the scalability requirement immediately leads to 2 conclusions!

6 of 20

Security + Scalability = ??

  1. Beacon chain data consideration:

Cannot contain full shard data, breaks super-linear data throughput

  • Beacon chain execution consideration:

Cannot execute full shard transactions, breaks super-linear execution throughput

7 of 20

Eth2.0 General Design

  • Beacon Chain
    • All validators participate & form consensus
    • Only merkle roots of state from shards
    • No execution of transactions from shards
  • Shards
    • No consensus in shards!
    • Blocks validated & voted on by committee sampled from beacon validators

8 of 20

Eth2.0 General Design

All validators

Shard Committee

Beacon Chain

Shard Chain

1. Sample

4. Consensus

2. 2/3rd voting

3. Crosslink

9 of 20

Eth2.0 for Smart Contract Devs

  • Changes to the dev experience, ex:
    • Static State Access [?]
  • Some things that devs are used to today may not be possible, ex:
    • Synchronous calls to ANY other contract on the system

10 of 20

Eth2.0 for Smart Contract Devs

  • Synchronous cross-shard transactions
    • Basic problem is to make receiver shard aware of incoming cross-shard transaction
    • Impossible without including more information than only shard merkle roots in the beacon chain
    • This would break super-linear scalability

11 of 20

Eth2.0 for Smart Contract Devs

  • Static State Access
    • Stateless execution:
      • Nodes in the network are aware of only the state root
      • Transactions must include witness data for all state that they access

12 of 20

Eth2.0 for Smart Contract Devs

  • Dynamic State Access
    • TX1
      • … ; ptr = SLOAD(addr); data = SLOAD(ptr); …
      • Witness:

State Root

ptr

data

addr

ptr

13 of 20

Eth2.0 for Smart Contract Devs

  • Dynamic State Access
    • TX1
      • … ; ptr = SLOAD(addr); data = SLOAD(ptr); …
    • TX2
      • … ; SSTORE(addr, new_ptr); …

In the same block, TX2 is included before TX1.

What happens now?

14 of 20

Eth2.0 for Smart Contract Devs

  • Dynamic State Access
    • The merkle branch to location new_ptr is missing and the block producer must now fetch it

State Root

ptr

data

addr

new_ptr

15 of 20

Eth2.0 for Smart Contract Devs

  • Static State Access
    • Only access predictable locations in the storage
    • Then it is possible for block producers to update witness without fetching data from the network
    • Block producers can infer new witness from previous included transactions

16 of 20

Eth2.0 for Smart Contract Devs

  • The primary objective of Eth2.0 is to make a scalable & secure blockchain system
  • Enabling familiar, Eth1-like execution behavior is a secondary objective

17 of 20

Eth2.0 for Smart Contract Devs

  • Don’t freak out!
  • This is ok!
  • You’ll be alright!

18 of 20

Eth2.0 for Smart Contract Devs

There is no other blockchain that provides the same strong security and super-linear scalability guarantees, which offers these things!

19 of 20

Eth2.0 for Smart Contract Devs

!!TRIGGER WARNING!!

There is no other blockchain* that provides the same strong security and super-linear scalability guarantees, which offers these things!^

* that I know of

^ such as synchronous cross-shard transactions

20 of 20

Thank You

Twitter: @adiasg