1 of 27

EIP4844 with Prysm

Peep-an-EIP. March 29, 2023

Kasey and Terence

2 of 27

EIP4844: Why and What?

3 of 27

https://vitalik.ca/general/2021/04/07/sharding.html

4 of 27

Today on Visa

https://usa.visa.com/dam/VCOM/global/about-visa/documents/aboutvisafactsheet.pdf

5 of 27

Ethereum Today

  • 10 transactions per second
  • How to increase tps?
  • How to increase block space?
  • How to compete with global internet of value?

6 of 27

The rollup centric roadmap

Rollups put skyscrapers on Ethereum

(H/T: Ben Edgington)

7 of 27

Past: everything happens on L1

Ethereum L1 (~10 tps)

Defi, NFT, ICO, payment, DAO etc

8 of 27

Today: with L2s

Ethereum L1 (~10 tps)

Defi, NFT… etc

L2s (~100 tps)

Defi

NFT

DAO

Defi

Payment

DAO

NFT

Defi

Optimised for security

Optimised for throughput and UX

9 of 27

Today: L2 uses CALLDATA

Ethereum L1 (~10 tps) CALLDATA

L2s (~100 tps)

10 of 27

EIP-4844: L2 uses BLOBDATA

Ethereum L1 (~10 tps) CALLDATA BLOBDATA

L2s (~1000 tps)

11 of 27

Block

Blobs

12 of 27

Block vs Blob

Blockspace

Blobspace

Seen by all nodes

Yes

Yes

Size

1MB theoretical limit

128KB target / 256KB max

Storage

Execution client

Consensus client

EVM access

Yes

No

Longevity

Forever

18 days

Cost

Expensive (16 bytes / gas)

Cheap

13 of 27

Blob transaction

Submitted to execution client mempool

Gossiped among execution clients (protocol: eth/68)

Blob transaction consists of

  • New transaction type: 0x05
  • Usual data fields (nonce, value, calldata, etc)
  • New field `blob_versioned_hashes` as part of commitment scheme
  • Encoded as SSZ

14 of 27

Blob transaction end to end

L2 batch poster

Execution peer

Mem pool

Execution client

Mem pool

Consensus client

Validator

Consensus peer

Execution client

L2 validators

Blob tx + regular tx

p2p: eth/68

Execution peer

Mem pool

Execution peer

Mem pool

Get blob bundle

Get and sign blobs

Gossip beacon block and blobs

Consensus peer

Consensus peer

Verify blob txs

Read blobs

15 of 27

EIP4844 on Prysm

16 of 27

What happens at every upgrade

P2P

State Transition

Beacon API Server

Validator (aka Prysm) API Server

Pool (like mempool)

Blocks and blobs

Engine API

https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/p2p-interface.md

https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/beacon-chain.md

https://github.com/ethereum/execution-apis/blob/main/src/engine/experimental/blob-extension.md

https://github.com/ethereum/beacon-APIs

https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/validator.md

Other consensus objects (i.e. exits, attestations)

17 of 27

Beacon API changes

  • New endpoints
    • Blob signing endpoint
    • Blob downloading endpoint
  • New paradigm
    • Signing blinded block(?)
  • How to work with Prysm validator 2.0

18 of 27

Validator changes

  • Sign blobs + blocks
  • No slashing equivocation involved. (Yay)
  • Optimization for latencies
  • What it means for DVT

19 of 27

Crypto library

  • Switching to c-kzg
  • Audit starting April / 17
  • Finalizing polynomial commitment related interfaces
  • Improving security UX (ie. where to host trusted setup file)

20 of 27

Block and blobs import

  • Can’t import block without blob
  • Queue them individually in sync pkg
  • When to request them?
  • How long to keep them for?
  • Potential DOS vectors?
  • This requires a good design, and plays a critical role in validator performance

21 of 27

Block and blobs import

22 of 27

Forward sync

  • Block sync remains the same
  • Blobs sync with additional complexity
  • Client gets “stuck” w/ non-empty block w/o blob
  • Peer scoring handler for blobs
  • Rate limiting handler for blobs

23 of 27

Backfilling

  • We don't have backfilling
  • We need to implement back filling for block (~4 months)
  • We need to implement back filling for blob (~18 days)
  • Rate limiters
  • Peer selections

24 of 27

Prysmctl

  • Download blobs
  • Verify blob tx
  • Send blob tx
  • More?

25 of 27

Today’s progress

26 of 27

Where we are today

  • Specs
    • Consensus: https://github.com/ethereum/consensus-specs/tree/dev/specs/deneb
    • Execution: https://eips.ethereum.org/EIPS/eip-4844
    • APIs: https://github.com/ethereum/execution-apis/blob/main/src/engine/experimental/blob-extension.md
  • Client implementation
    • four consensus implementations
    • four execution implementations
  • Devnets
    • Launched four devnets, devnet v5 in ~3-4 weeks
  • Tooling
    • Blobscan: https://blobscan.4844-devnet-4.ethpandaops.io/
  • KZG ceremony
    • On-going

27 of 27

Devnet histories

  • Devnet v1: prysm-geth only
  • Devnet v2: data gas, sync testing
  • Devnet v3: rebased on top of shanghai, no withdrawal, begin using eth/68 to gossip blobs at execution layer
  • Devnet v4: blobs syncing hardened, all clients participated
  • Devnet v5: decoupled blobs, blob tx mempool hardening. (In a few weeks)