Dencun Upgrade: Explaining Complex EIPs in Simple Terms

icon ETH
icon FOR
Photo - Dencun Upgrade: Explaining Complex EIPs in Simple Terms
On March 13, 2024, the Ethereum blockchain is poised for the Cancun-Deneb (Dencun) upgrade, introducing a slew of improvements (EIPs) at both the consensus and execution layers. Let's unpack the key enhancements this upgrade brings.
Previously, we've touched upon this significant milestone in Ethereum's roadmap, focusing solely on one particular improvement – the introduction of the EIP-4844 transaction type, also known as “proto-danksharding.”Now, let's explore the additional EIPs* set for rollout in this March's update.

*EIP, short for Ethereum Improvement Proposals, are initiatives designed to improve the protocol, contributed by external authors. The most viable and fitting proposals are selected by Ethereum developers for implementation in future upgrades.

EIP-6780: Cleaning Up Unnecessary Smart Contracts

This improvement is introduced to restrict SELFDESTRUCT to a single transaction.

What is SELFDESTRUCT?

SELFDESTRUCT is an Ethereum developer tool for eliminating redundant smart contracts. However, its challenges include:

  • Complexity in application;
  • Potential for data loss.

What does EIP-6780 accomplish?

EIP-6780 makes the SELFDESTRUCT function more secure and easier to handle. It narrows down its applicability, which was originally broad and affected all smart contracts within the network. Here's how it works:

  1. SELFDESTRUCT can now be applied solely to the smart contract that the transaction directly references, preventing developers from inadvertently deleting unrelated contracts.
  2. SELFDESTRUCT will no longer delete the contract's code, its storage link, or reset the nonce after a transaction is executed. As a result, data remains secure and recoverable even if SELFDESTRUCT is mistakenly used.

Imagine your computer is cluttered with unnecessary files. EIP-6780 is like a clever cleanup program that helps you eliminate those files thoughtfully. It ensures nothing crucial is removed from your archive but clears out the unnecessary, freeing up space for efficient operation.

EIP-5656: Streamlined Data Copying 

If EIP-6780 carefully removes unwanted clutter, EIP-5656 introduces a method to efficiently copy important documents into new storage with the "MCOPY" command.

What is MCOPY?

MCOPY is Ethereum's new functionality that enables developers to copy data more efficiently. 

How does MCOPY work?

MCOPY is designed for the effective construction of data structures by allowing memory copying. This is done by shifting blocks of data from one part of memory to another, akin to solving a Rubik's Cube. 

This method is a standard operation for building databases and replicating objects.

EIP-5656 dramatically reduces the gas expense associated with this copying process by almost fourfold, thereby making the creation and execution of new contracts also require less gas. 

Such energy-efficient contracts are especially advantageous for everyday users of Ethereum-based apps.

Picture your computer as a vast box where all your files are stored. You need to relocate necessary files from one folder to another while "packing" them efficiently to make more space available. MCOPY functions like a copy-paste tool for data movement within the Ethereum Virtual Machine (EVM).

EIP-4788: Open Access to Consensus Information

The Ethereum blockchain is constantly evolving, with changes that applications using this network need to stay informed about. 

For example, staking applications require up-to-date information on Ethereum's consensus state for proper operation. Until now, DApps had to depend on third-party oracles for this crucial information.

EIP-4788 revolutionizes this process by providing direct access to Ethereum consensus information within the blockchain, making it readily available to all applications.

How EIP-4788 Functions

  1. Each Ethereum block will now contain a special code (hash) that refers back to the previous consensus block.
  2. This code allows anyone to verify the Ethereum consensus state at any given moment.
  3. To prevent network overload, this information is stored temporarily (approximately one day).

Effectively, EIP-4788 serves as an internal oracle, removing the reliance on external data sources. This boosts the system's security and reduces potential points of failure.

This enhancement is particularly significant for application developers and services involved in liquidity pools, such as Lido and Rocket Pool, offering them new avenues to create secure solutions without the need for trusted oracles.

EIP-7044: Simplifying Withdrawal from Staking

This improvement streamlines the process of withdrawing assets from delegated staking pools. Prior to the Dencun upgrade, withdrawing required interaction with a validator, who possesses two keys (a signing key and a withdrawal key). The node owner needed to sign a specific message to initiate the withdrawal. However, there was a concern that validators might refuse or ignore such requests, affecting their earnings based on the pool's funds.

EIP-7044 solves this problem by generating pre-signed withdrawal notifications at the time of contract initiation. This ensures that the withdrawal terms remain unaffected by any actions of the validators or subsequent updates to the network.

Benefits of EIP-7044

  1. Convenience: It eliminates the need to seek permission from others to access your funds.
  2. Security: Reduces the risk of losing your cryptocurrency due to the refusal or inactivity of the pool manager.

EIP-7045: Expanding the Voting Period

The Ethereum blockchain operates with blocks and attestations, which are essentially votes endorsing the correct creation of a block. 

Before the Dencun upgrade, these attestations needed to be included within a single epoch to validate a block.

*An epoch, as defined by Ethereum’s protocol, is a complete cycle of data processing that includes filling 32 slots, with each slot lasting 12 seconds, during which blocks are validated.

EIP-7045 increases the maximum window for including attestations from one epoch to two epochs, meaning up to 64 slots in total.

Who Stands to Benefit?

This upgrade primarily benefits validators as it allows them to cast votes for the 32 slots of the initial epoch as well as for the slots of the subsequent epoch, without forfeiting their rewards. By lengthening the attestation inclusion window, validators are afforded more flexibility in their voting activities.

Put simply, node owners can now vote on larger volumes of slots at once. Theoretically, this could result in quicker block confirmations and reduced delays for Ethereum users.

Active development on new Ethereum Improvement Proposals (EIPs 6110, 7002, and 7549) is underway, targeted for the next upgrade—Prague-Electra. We'll continue to provide updates, making complex topics accessible and understandable.