Ethereum Merge Decoded

The Merge

  • What is it? The Merge is a transition in how Ethereum’s decentralized network achieves consensus, from proof of work to proof of stake. It merges together the ETH mainnet (live since July 2015) with the Beacon Chain (December 1, 2020), which have been running in parallel. The Merge is a sequence of two upgrades, a CL client upgrade known as Bellatrix (Sept 6) and an EL client upgrade (Sept 14) known as Paris. These two upgrades combine the execution layer and the consensus layer together.
  • What is it not? There are some misconceptions. The Merge is a change in consensus mechanism, not an expansion of network capacity. The Merge doesn’t fix expensive gas fees or boost Ethereum’s speed. Moreover, no production application needs to redeploy. 
  • Why does it matter? The transition to proof of stake will make Ethereum more energy-efficient and secure and lays the groundwork for future upgrades, like sharding. A successful Merge will result in many changes and positive benefits.
    • Ethereum’s current energy consumption is expected to fall by ~99.9%. 
    • Block times will decrease from a ~13.3-second average to a constant 12 seconds (assuming no empty slots).
    • From an economic perspective, large expenses paid to miners for security will dissipate, and new ETH issuance will fall by ~90% as block rewards paid to miners cease. 
    • Finally, validator staking yields are expected to rise by ~50% as transaction priority fees will begin to accrue to validators and MEV revenue.
  • How big is the change in energy consumption? After the Merge, Ethereum’s energy consumption will shrink from 90-100 TWh/yr to 0.01 TWh/yr, reducing total energy consumption by ~99.95%. The current consumption could power a country like Pakistan or Belgium for a year.
  • What does it mean for DeFi and NFTs? DeFi would work as it was working before the merge. We might see some forked chains with some capital chasing higher yields here and there, but it will consolidate to the ETH PoS chain in the long term. For NFTs, in the short term, some attack vectors exist mostly due to confusion amongst non-suspecting users, who are not as tech-savvy. Since multiple copies of the NFTs will exist in forked chains, holders of the original NFT token with the correct ChainID, i.e. of ETH’s PoS chain, need to be wary of replay attacks and should not interact with any PoW forks.
  • What does it mean for the PoW miners (link)? Ethereum miners currently hold a US$ 4bn bag of hardware. Once ETH moves to PoS, these miners will have to change their business in order to survive. There are two options on the table: 1) mine other GPU-compatible coins like Ethereum Classic (ETC), or 2) mine a proposed Ethereum fork that will maintain PoW. However, both these options are not as lucrative. According to Forbes’ August report, ETC would need to increase 5000% if miners were to reap the same rewards on ETC that they did on Ethereum should they all decide to move there. Other options include Dogecoin, Monero, etc., but the combined YoY mining revenues of Ethereum Classic, Dogecoin, Monero, and Flux, for example, barely crest US$ 1.1bn. Ethermine, one of the largest miners, has taken an alternative route and started a staking service.
  • What does it mean for node operators? Nodes operating on Ethereum mainnet today simply need to run an execution layer (EL) client implementation such as Geth or Erigon, while nodes on the Beacon Chain are required to run a different consensus layer (CL) client implementation such as Prysm or Lighthouse. The CL client will gossip blocks, attestations, and slashing, while the EL client will continue to gossip transactions, handle the execution, and maintain the state.
  • What is ETH’s PoS mechanism? ETH PoS uses the Gasper protocol (Casper FFG + LMD GHOST). Gasper combines the low overhead benefits that allow for a high number of participants to support decentralization seen in longest chain systems with the finality benefits of a pBFT-inspired system. In short, Gasper favours liveness over safety, continuing to produce blocks even if finality thresholds aren’t reached, which may result in a fork, but it always keeps the chain moving forward and producing blocks (liveness). Alternative approaches favouring safety like Tendermint will not allow for forks (safety), but they cease block production and halt when finality thresholds are not met. Gasper uses a system of checkpoint attestations of prior blocks, which requires a supermajority of attestation votes and increases the cost of reorganizing the blockchain before such checkpoints. A checkpoint typically receives the necessary votes to become finalized after two epochs, and once a checkpoint is finalized, all previous slots become finalized. 
  • What does ETH PoS look like in epochs, block times, etc.? Validators are frequently chosen to vote on their view of the chain head block, where the chain head block is the most recent block in the validator’s view of the canonical chain. Each vote is known as an attestation, and the attestation process relies heavily on time in the Beacon Chain, which is divided into periods lasting 6.4 minutes, known as epochs. Each epoch is further partitioned into 32 distinct slots, each lasting 12 seconds. The breakdown of validators into a random committee of 32 reduces the gossip time required in the protocol. A small set of validators are also chosen at random to join sync committees (which are different from the aforementioned beacon committees), which pay additional rewards to validators and help light clients sync up and determine the head of the chain. Sync committees are particularly lucrative as participating validators receive a reward for each slot, and the selection lasts for 256 epochs, or 8,192 slots, before a new committee is selected.
  • Other important things to note:
    • Withdrawals The Shanghai upgrade (6-12 months after the merge) will enable the withdrawal of staked ETH. Therefore, the merge-related ETH price volatility would not be affected by staked ETH withdrawals.
    • Testnets like Rinkeby, Ropsten, and Kovan are being deprecated, with only Goerli and Sepolia continuing operations. Therefore, developers must be aware and move their dApps to these testnets.
    • Downtime – Although there won’t be any blockchain downtime during the merge, some services associated with the Ethereum network might see some downtime as their codebase is updated to fit the upgraded core. The merge will take about 12 minutes to complete. During that time, numerous major crypto exchanges have announced that they plan to pause deposits and withdrawals for Ethereum and Ethereum-based tokens. This is completely normal, and user funds won’t be at increased risk during that time.
    • Forks – There will be a fork or split on Ethereum, with the PoS and PoW chains existing separately. This will not affect users in the medium term but can induce short-term volatility/confusion. The founder of ETHPoW is Chandler Guo.
    • Centralization – Another argument around ETH merge is the centralization of ETH. Coinbase, Binance, Lido, and Kraken will form a 60% ETH staker majority. This can be a contentious point going forward.
    • Clients – One notable challenge associated with The Merge is the sheer number of pairwise combinations between consensus and execution layer clients. Simultaneously upgrading and ensuring correct functionality can be a challenge but, at the same time, adds more security. According to clientdiversity.org, CL clients include Prysm, Lighthouse, Teku, and Nimbus, and EL clients include Geth, Erigon, Besu, and Nethermind.

Roadmap Decoded

Summary

  • Through Danksharding, with its data blobs and data availability sampling, The Surge will make data availability cheaper and distribute the job of checking data availability amongst nodes, providing material scalability benefits on L2. 
  • The Verge will achieve statelessness by implementing Verkle Trees, allowing stateless clients to verify blocks without maintaining a local copy of Ethereum’s state. 
  • The Purge will introduce history expiration and state expiry, archiving history data, pruning untouched states, and generally simplifying the protocol. 
  • And The Splurge will add Proposer-Builder Separation, reducing validator hardware requirements and redistributing MEV, as well as account abstraction, increasing wallet choice/functionality and improving user experience.

The Surge

  • In summary, The Surge focuses on scaling and improving Ethereum’s transaction throughput. However, many still misconstrue sharding as scaling Ethereum execution at the base layer, which is no longer the medium-term objective. The sharding roadmap prioritizes making DA cheaper and leaning into the computational strengths of rollups to achieve scalability on L2. Many have highlighted DS as the upgrade that could invert the scalability trilemma because a highly decentralized validator set will allow for data to be sharded into smaller pieces while statistically preserving data availability guarantees, improving scalability without sacrificing security. 
  • The updated roadmap aims to achieve network scalability by moving all computation (i.e., execution) virtually over to L2 while making it cheaper for data to be posted back to the Ethereum mainnet. 
  • Ethereum’s current plan for sharding is known as Danksharding (DS). However, instituting full Danksharding is complex. Thus, the first sub-step is Proto-Danksharding (PDS; EIP-4844), which achieves meaningful scaling benefits more quickly.
  • PDS introduces a new Ethereum transaction type called a Blob-carrying transaction which allows for data to be posted in ‘blobs.’ Blob-carrying transactions are like regular transactions, but they also include an extra data blob that allows the protocol to provide data availability guarantees without committing to storing that data permanently. 
  • Blobs are purely introduced for data availability purposes, and the EVM cannot access blob data, but it can only prove its existence. The full blob content is propagated separately alongside a block as a sidecar. Blob transactions have their own independent EIP-1559-style gas market. Data blobs are expected to be pruned from nodes after a month or so, making them a great data solution for rollups without overburdening node operators with extreme storage requirements.
  • Timeline – PDS is a misnomer, and actual data sharding will not occur until the introduction of DS. Developers aim for PDS to be included in the Shanghai hard fork about six to twelve months after The Merge. 
  • Goal of DS – ​​DS distributes the job of checking data availability amongst validators.

The Verge

  • In short, The Verge aims to decrease the hardware requirements of validator nodes by introducing stateless clients that can verify blocks without downloading a local copy of Ethereum’s state, which requires an increasingly large amount of solid-state storage to maintain. Enabling nodes to validate the network primarily with RAM will increase validator decentralization. 
  • The Verge aims to alleviate the state’s burden on the network by replacing the current Merkle-Patricia state tree with a Verkle Tree, a newer data structure first described in 2018. Verkle proofs are much more efficient in proof size compared to Merkle proofs. Unlike a Merkle-Patricia Tree, which requires more hashes as the tree widens with more children, Verkle Trees use vector commitments that allow the tree width to expand without expanding the witness size.
  • Ethereum aims for ‘weak statelessness’, meaning validators can verify blocks without maintaining a copy of Ethereum’s state, but block builders will still need the state to construct a block. 

The Purge

  • The Purge refers to a series of upgrades to simplify the protocol by reducing historical data storage and technical debt. It will include history expiration and state expiration.
  • History expiration requires nodes to stop serving historical blocks on the p2p network that are more than 1 year old and locally prune their blocks’ copy. 
  • State expiration prunes a state that has not been touched in some defined time, such as one year into a distinct tree structure, removed from the Ethereum protocol. While state expiry is not as essential as it may initially seem after stateless clients are implemented, it will still decrease the strain of dust accounts and other inactive addresses on Ethereum’s state.
  • Timeline – EIP-4444 is coming within 6-12 months after The Merge. State expiry only becomes feasible after the introduction of Verkle Trees. 

The Splurge

  • The Splurge is a catch-all bucket for miscellaneous upgrades. 
  • Proposer-Builder Separation (PBS) is the most prominent upgrade in The Splurge as it directly impacts the roadmap for DS and statelessness. As the name implies, PBS separates block builders from block proposers at the protocol level. Under this model, dedicated block builders search for MEV opportunities to build the most profitable block and submit bids to block proposers to propose their block. Proposer chooses the builder that gives them the highest fees. This results in more centralized block production, but validation is still trustless and should be even more decentralized since block building responsibilities are delegated elsewhere.
  • Another notable upgrade is account abstraction, with the most prominent proposal being EIP-4337. This proposal lets users employ smart contract wallets as their primary Ethereum account instead of an externally-owned account (EOA).  EIP-4337 creates a separate mempool consisting of a higher-order transaction-like object called a UserOperation. A special set of users known as bundlers would aggregate UserOperations into a transaction that would directly communicate with a particular smart contract, and that transaction would then be included in a block on the mainnet. This improves user experience by atomically batching operations into a single transaction that would otherwise require multiple different transactions to execute on the mainnet. Account abstraction would further provide user flexibility to deviate from the ECDSA digital signature algorithm and employ any arbitrary verification logic, such as a quantum-resistant signature scheme. It also simplifies the use of multisigs and social recovery wallets. Lastly, it introduces a form of gas abstraction where gas fees can be paid in ERC-20 tokens, and applications can subsidize the gas fees of their users.

Source –  https://notes.ethereum.org/@MarioHavel/merge-resources

Author – Abhinav Pathak, Research Partner, Woodstock

Leave a Reply

%d bloggers like this: