before the Merge

18
before the Merge Eth1/Eth2 clients interop Tomasz K. Stanczak (flashbots , Nethermind , Oiler )

Transcript of before the Merge

Page 1: before the Merge

before the MergeEth1/Eth2 clients interop

Tomasz K. Stanczak (flashbots ⚡️🤖, Nethermind 🤯, Oiler 🛢)

Page 2: before the Merge

A bit of history

• Ethereum launched on July, 30th 2015

• Market cap of Ether is at around ~$420 billion

• TVL in DeFi is at ~$90 billion

• We are on a route towards a $1 trillion market

Page 3: before the Merge

PoW Ethereum

• Miners build blocks.

• Miners search for PoW solutions.

• The first miners to find solutions propagate their blocks.

• The blocks that get propagated and accepted the fastest have the

greatest chance of ending up on the canonical chain.

• Block times are following a Poisson distribution with a mean of

around 13 seconds.

• Not playing by the rules leads to the block being rejected by the

network.

Photo: Ding Gang/Caixin

Page 4: before the Merge
Page 5: before the Merge

Prylabs delivered Prysm – the most popular beacon node client

Page 6: before the Merge

Lighthouse is the second most popular beacon node client.

Page 7: before the Merge
Page 8: before the Merge

Specs, research, implementations.

Page 9: before the Merge

A bit of history

Beacon Chain launched December, 1st 2020

• Staked ~8M ETH ($28 billion)

• the Merge brings the two networks together

Artwork: Michael Thompson, https://test.artstation.com/artwork/KWPrB

Page 10: before the Merge

PoS Ethereum

• A time slot lasts 12 seconds.

• Each slot, one of N validators is selected

(N is now ~250,000) to propose a block.

• Each validator proposes a block around once per month.

• Not playing by the rules (signing conflicting statements) leads

to a partial deposit slashing and exclusion from the network.

Art by Imperial Boy

Page 11: before the Merge

Bringing ten Ethereum

clients together

Page 12: before the Merge

the Merge

• https://eips.ethereum.org/EIPS/eip-3675

• TTD (terminal total difficulty) to be announced.

• When the PoW block reaches TTD Ethereum 1

(Execution) clients switch from PoW to PoS.

• Block gossiping gets switched off.

• Difficulty field has no meaning any more (set to 0).

• Block rewards are removed.

• Engine API is used for collecting consensus information.

Source: Back to the Future

Page 13: before the Merge

Engine API

• https://hackmd.io/@n0ble/consensus_api_design_space

• engine_preparePayload

• engine_getPayload

• engine_executePayload

• engine_forkchoiceUpdated

Page 14: before the Merge
Page 15: before the Merge
Page 16: before the Merge

Post-Merge Sync

• Execution clients start by receiving the last

consensus block from the beacon node

• Then retrieve all the headers Back to the

Genesis

• Confirm the genesis hash matches

• Download block data (bodies and receipts)

• Continue listening to the beacon node

Source: Back to the Future

Page 17: before the Merge

Wat change?

• To be in sync with the network you need to run

both the beacon node and the execution client

(e.g. Lighthouse + Nethermind)

(https://github.com/NethermindEth/nethermind/tree/themerge/amphora)

• You may stake 32 ETH to run a validator – propose and attest blocks, capture tx fees and MEV

• You may fallback to services like Alchemy or Infura for now but long term,

running an execution client should be required

• Blocks should be more predictably produced exactly 12 seconds apart

(some slots may be missed – currently below 1%)

• You should read https://ethereum.org/en/eth2/

Source: Vincent Callebaut Architectures