The Merge
October 2021 | PEEPanEIP
Paul Hauner�Sigma Prime | Lighthouse�@paulhauner
Topic
Merging Ethereum
Introduction
Paul Hauner @paulhauner
Introduction
Sigma Prime @sigp_io
The Merge: An Overview
The Merge: An Overview
The Merge: An Overview
Replace Proof-of-Work
The Merge: An Overview
With Proof-of-Stake
The Specification
EIP-3675: Upgrade consensus to Proof-of-Stake
Staking Stuff
+ �Transaction Stuff
Staking Stuff
Transaction Stuff
Transaction Stuff
Staking Stuff
Staking Stuff
+ �Transaction Stuff
PoW Ethereum
PoS Ethereum�(Beacon Chain)
Chain Structure
One PoS chain to rule them all?
Chain Structure
Ehh... kinda...
Chain Structure
Staking Stuff
+ �Transaction Stuff
Staking Stuff
+ �Transaction Stuff
PoS Ethereum�(Beacon Chain)
One chain
Staking Stuff
+ �Transaction Stuff
Chain Structure
Staking Stuff����
Staking Stuff����
PoS Ethereum�(Beacon Chain)
...with a sneaky inside chain
Transaction Stuff
Transaction Stuff
Staking Stuff����
Transaction Stuff
Chain Structure
Why sneaky inside chain?
Chain Structure
Ethereum Chain
Transaction Stuff
Transaction Stuff
Transaction Stuff
Reason 1: existing tooling and dependencies
Parent�Hash
Parent�Hash
State Trie
EVM
Dapps + Infra
Chain Structure
All these hard things are already done very well by existing Ethereum PoW clients.
Reason 2: no need to implement the wheel
Chain Structure
All these hard things are already done very well by existing Ethereum PoS clients.
Reason 2: no need to implement the wheel
Chain Structure
Staking Stuff����
Staking Stuff����
Transaction Stuff
Transaction Stuff
Staking Stuff����
Transaction Stuff
Terminology
Time for some terminology
Terminology
Staking Stuff
Staking Stuff
Transaction Stuff
Transaction Stuff
Staking Stuff
Transaction Stuff
Consensus Layer
Execution Layer
Terminology
Consensus Clients
Execution Clients
Terminology
Competing Terminology
Existing�Eth2�Eth1
New�Consensus�Execution
Equivalent
Terminology
I use the “new” terminology.
You do you.
Terminology
Moar terminology
Terminology
Staking Stuff����
Staking Stuff����
Transaction Stuff
Transaction Stuff
Staking Stuff����
Transaction Stuff
Beacon Blocks
Execution Payloads
Terminology
Beacon Block����
Beacon Block����
Execution
Payload
Execution
Payload
Beacon Block����
Execution
Payload
Data Structures
Data Structures
Intermission 1/3
Block Production
Producing a Beacon Block
Block Production
consenus_client.exe
execution_client.exe
Validator #42
Block Production
consenus_client.exe
execution_client.exe
Validator #42
My validator has been elected to produce the next block!
Block Production
consenus_client.exe
execution_client.exe
Validator #42
To: execution_client.exe��Please prepare to produce a block!
engine_forkchoiceUpdated
Block Production
consenus_client.exe
execution_client.exe
Validator #42
Waiting until it’s time to produce a block.
Working to find best set of transactions...
Block Production
consenus_client.exe
execution_client.exe
Validator #42
It’s time to produce a block!
Working to find best set of transactions...
Block Production
consenus_client.exe
execution_client.exe
Validator #42
To: execution_client.exe��Please send me an execution payload!
Working to find best set of transactions...
engine_getPayload
Block Production
consenus_client.exe
execution_client.exe
Validator #42
Beacon Block����
???
Execution Payload
Block Production
consenus_client.exe
execution_client.exe
Validator #42
Beacon Block����
Execution Payload
Block Production
consenus_client.exe
execution_client.exe
Validator #42
Beacon Block����
Execution Payload
Block Production
consenus_client.exe
execution_client.exe
Validator #42
To: execution_client.exe��That payload is at the head of the chain!
engine_forkchoiceUpdated
Block Production
Producing a block: what have we learned?
Block Processing
Processing a Beacon Block
Block Processing
consenus_client.exe
execution_client.exe
Generic User
Block Processing
consenus_client.exe
execution_client.exe
Generic User
Beacon Block����
Execution Payload
Block Processing
consenus_client.exe
execution_client.exe
Generic User
Beacon Block����
Execution Payload
Block Processing
consenus_client.exe
execution_client.exe
Validator #42
To: execution_client.exe��Please verify this execution payload
engine_executePayload
Execution Payload
Block Processing
consenus_client.exe
execution_client.exe
Generic User
Beacon Block����
Execution Payload
Execution Payload
Block Processing
consenus_client.exe
execution_client.exe
Generic User
Beacon Block����
Execution Payload
Execution Payload
Block Processing
consenus_client.exe
execution_client.exe
Generic User
Beacon Block����
Execution Payload
Execution Payload
Block Processing
consenus_client.exe
execution_client.exe
Validator #42
To: execution_client.exe��That payload is at the head of the chain!
engine_forkchoiceUpdated
Block Processing
Processing a block: what have we learned?
Intermission 2/3
Infrastructure
The Merge: Infrastructure
Infrastructure
consenus_client.exe
execution_client.exe
JSON RPC
Infrastructure
consenus_client.exe
execution_client.exe
JSON RPC
Infrastructure
consenus_client.exe
Infrastructure
execution_client.exe
Infrastructure
A malicious EL client can cause double-spends!
A malicious CL can censor transactions!
Trust
Infrastructure
consenus_client.exe
execution_client.exe
The Internet
The User
discv5 (udp)
libp2p (tcp)
devp2p (udp)
devp2p (tcp)
JSON-RPC (http,ws,etc)
REST API (tcp)
Infrastructure
execution_client
chain_db
accounts
consensus_client
beacon_chain_db
validator_keys
Syncing
The Merge: Syncing
Syncing
Naive “lockstep” sync
Block
#0
Block
#1
Block
#2
Syncing
Lockstep sync after a partition
Block
#0
Block
#1
Block
#2
Syncing
In lockstep sync, the CL “spoon-feeds” blocks to the EL.
Syncing
“Optimistic” sync
Block
#0
Block
#1
Block
#2
Syncing
In optimistic sync, it is assumed the EL can get blocks from its own P2P network.
Syncing
Consensus safety in optimistic sync
Syncing
Do not build blocks here
Build blocks here
...or attest here
Attest here
Syncing
Optimistic sync open questions
Syncing
Optimistic sync discussion
Intermission 3/3
Progress
The Merge: Progress so Far
Greece Workshop
Amphora Workshop
Greece Workshop
Disclaimer: I participated remotely
Greece Workshop
Face-to-Face (F2F) in Greece 🇬🇷
Greece Workshop
The ultimate goal:
multi-client merge devnet
Greece Workshop
🙀 n²
Greece Workshop
Milestones
Greece Workshop
Greece Workshop
Greece Workshop
Instructions to join (for humans): https://bit.ly/2Zgr0no
Greece Workshop
Greece Workshop
Merge Engineering Standing
Thank You
Get in touch...
Paul Hauner�Sigma Prime | Lighthouse�@paulhauner
Lighthouse
github.com/sigp/lighthouse