What is the Dencun Upgrade on Ethereum?

What is the Dencun Upgrade on Ethereum?

Ethereum's scalability has been a major limitation for the blockchain, its developers, and users alike. And the race to solve Ethereum’s scalability has gone from sidechains and state channels to rollups and sharding. 

Today, rollups are the frontrunners in this race, effectively addressing scalability on the execution front. However, they fall short of solving data availability challenges. 

Enter the Dencun upgrade, a core Ethereum upgrade revolving around proto-danksharding which introduces us to ‘blobs’.

Now, what is proto-danksharding and blobs and what’s the Dencun upgrade all about?

In this blog, we will help you understand the Dencun upgrade better, delving into the specific EIPs (Ethereum improvement proposals), and how they help Ethereum in detail.

What is the Dencun upgrade?

Dencun upgrade is Ethereum’s next major hard fork following the Shapella upgrade. It’s a blend of 'Deneb' and 'Cancun' and consists of a series of upgrades to Ethereum's consensus layer (CL) and execution layer (EL), respectively. The upgrade aims to improve Ethereum's execution efficiency and data availability within the network, with a focus on proto-danksharding (EIP-4844)'.

While the primary focus is on proto-danksharding, the Dencun hard fork consists of eight other EIPs. However, here is a high-level, digestible overview of what they mean to Ethereum:

Improved data availability

  • Proto-danksharding (EIP-4844) introduces data blobs that enhance the throughput and efficiency of Layer 2 solutions.

More efficient smart contracts

  • Temporary data storage (EIP-1153) in smart contracts with new opcodes clears the intermediate data after transaction completion, reducing permanent storage overheads.
  • EIP-6780 restricts the SELFDESTRUCT function in smart contracts to specific conditions, improving contract stability and predictability.
  • Memory copy instruction (EIP-5656) aims to streamline memory management in the Ethereum virtual machine (EVM), leading to more efficient processing of smart contracts.

Reduced external dependence

EIP-4788 makes Beacon Chain's block roots accessible to the Ethereum Virtual Machine (EVM) by storing them in a smart contract on the execution layer. In essence, this is a built-in oracle on Ethereum's mainnet, allowing smart contracts direct access to the network's consensus state without needing external oracles.

Better validator management and efficiency

EIP-7045, EIP-7044, and EIP-7514 — these three EIPs collectively contribute to optimizing the validator lifecycle and operations on the Ethereum network.

  • EIP-7045 extends the maximum slot for including validator attestations in the Beacon Chain.
  • EIP-7044 simplifies the exit process for validators and ensures their actions remain valid across future forks.
  • EIP-7514 caps the churn limit for Ethereum validator activations at 8 per epoch to help maintain a stable and manageable size of the validator set. 

Reliable blob fees

EIP-7516 introduces the BLOBBASEFEE opcode in Ethereum, which allows smart contracts to access the current base fee for data blobs on-chain directly.  This helps rollup contracts to manage and predict their data blob costs more effectively.



Now that we know what the Dencun upgrade essentially is and how it improves Ethereum, let us take a look at the events leading to this upgrade and why Dencun is important.

Ethereum’s journey to the Dencun upgrade

Over the last two years, Ethereum has been through a few major upgrades. Zooming out, each upgrade is a step towards the scaling of Ethereum and the Dencun upgrade is a key milestone in this pursuit.

Let’s take a look at a few pivotal events that lead up to the Dencun upgrade. 

  • In December 2020, the Beacon chain launched, introducing Proof-of-Stake and enabling ETH staking while setting the stage for Ethereum's transition away from Proof-of-Work.
  • September 2022 sees The Merge, uniting Ethereum's mainnet with the Beacon Chain, fully transitioning to PoS.
  • April 2023 marks the Shanghai upgrade, enabling staked ETH withdrawals, and enhancing validator flexibility.
  • Holesky, Ethereum’s new public testnet went live on September 28, 2023. Supporting 1.4 million validators and staking, Holesky is a vital rock bed for the Dencun upgrade.
  • The Dencun upgrade is hyper-focused on scaling the data availability part of Ethereum which promises to have a positive cascading effect on transaction costs and speed.

Looking at the lead-up to the Dencun upgrade, we can see that the previous upgrades weren’t directly solving Ethereum’s scalability concerns. The Merge was primarily about transitioning to a more sustainable and secure consensus mechanism, while the Shanghai upgrade was focused on improving the staking experience. 

Both were crucial steps in Ethereum's journey but did not directly address the scalability challenges that the Dencun upgrade aims to tackle.  

💡
Read to understand the Ethereum Shanghai upgrade

Now, let’s dive deeper into the Dencun upgrade.

EIP 4844: Proto-danksharding 

Proto-danksharding is a proposed upgrade that aims to improve Ethereum’s scalability and data handling. It introduces the concept of blob-carrying transactions, which are designed to handle large data packets more efficiently than traditional transactions that carry CALLDATA.

Blobs or binary large objects are large data packets (~125 kB) distinct from regular Ethereum calldata, as they are stored off-chain and referenced in the transaction. They're technically vectors of data represented as polynomials, allowing for simple cryptographic referencing and verification.

The primary goal of using Blobs instead of CALLDATA is to increase the amount of data that can be included in a block, making them easier to process and store.

To make blob-carrying transactions happen, in the Dencun Upgrade, the Ethereum network introduces two new EVM opcodes: BLOBSTORE and BLOBLOAD. 

These opcodes handle the storage and retrieval of blob data. The BLOBSTORE opcode allows a transaction to include a reference to a blob, while BLOBLOAD enables accessing the data within the blob. The blobs themselves are stored off-chain, reducing the burden on Ethereum.

Features of blobs

KZG commitments: Blobs are committed using KZG, a vector commitment scheme compatible with future data-availability sampling which is crucial for full danksharding — the core of Ethereum’s next upgrade i.e. The Surge.

Pruning: Blobs are pruned regularly (~18 days) in beacon nodes (consensus layer). This reduces storage burden and enables cheaper pricing compared to permanent CALLDATA.

EVM-invisibility: Blobs cannot be read by contracts and therefore are invisible to the EVM. The EVM only deals with a reference to the blob, essentially a cryptographic commitment, to maintain network integrity and reduce the burden on the execution layer.

Benefits of proto-danksharding

  • Layer 2 rollups are one of the primary beneficiaries of proto-danksharding. They batch multiple transactions into one to be processed on Ethereum and currently face high costs due to the expensive nature of calldata. 

    With proto-danksharding, rollups can use data blobs to post batched transaction data more cheaply, significantly reducing operational costs and improving scalability.
  • Network efficiency and decentralization are balanced by proto-danksharding. By keeping the data blobs transient and limiting their size, proto-danksharding ensures that smaller, individual node operators can still participate in the network.  
  • Ethereum’s throughput increases as the introduction of data blobs increases the amount of data that can be included in a block without overburdening the network. This leads to an overall increase in network throughput, allowing Ethereum to accommodate more transactions, users, and dApps alike.
💡
Note: There is no sharding in proto-danksharding. 

It doesn’t involve splitting the Ethereum network into multiple shards. Instead, it introduces a new transaction type for handling large data packets, setting the groundwork for the eventual implementation of full sharding in the future.

Now, let us move on to the other EIPs that are a part of the Dencun upgrade.

EIP-1153: Transient storage opcodes

EIP-1153 introduces transient storage to the Ethereum Virtual Machine (EVM) by adding two new opcodes: TLOAD and TSTORE. This form of storage operates similarly to existing storage opcodes but is discarded at the end of each transaction.

Alongside permanent contract storage and memory, transient storage becomes the third form of storage in Ethereum. This aims to enhance the efficiency of complex transactions without adding to the gas costs. 

EIP-4788: Beacon block root in the EVM

EIP 4788 bridges the communication gap between Ethereum's execution and consensus layers. It achieves this by exposing the parent beacon block root in each execution block and storing these roots in a new smart contract on the execution layer.

Effectively, EIP 4788 introduces a protocol-level oracle, relaying Ethereum’s consensus state to the mainnet. Consequently, developers can reduce their reliance on oracles to retrieve data about Ethereum's consensus state which is a must-have for liquid staking pools and re-staking arrangements.

EIP-5656: MCOPY - Memory copying instruction

EIP-5656 introduces a new EVM opcode, MCOPY, aimed at enhancing the efficiency of memory copying within smart contracts. This opcode simplifies the process of moving data blocks within memory, a fundamental operation in computing used for tasks like building data structures and copying objects.

This efficiency improvement benefits both developers, in terms of simpler coding practices, and end-users, through reduced gas costs.

EIP-6780: SELFDESTRUCT only in the same transaction

EIP-6780 addresses the SELFDESTRUCT opcode, modifying its functionality to limit its use. The update ensures that SELFDESTRUCT can only delete a contract if it's called within the same transaction as the contract's creation. 

Existing contracts using SELFDESTRUCT are unaffected, but future uses will be limited, enhancing the overall security and predictability of smart contracts on Ethereum.

EIP-7044: Perpetually valid signed voluntary exits

EIP-7044 introduces a change to make signed voluntary exit messages from validators perpetually valid, rather than being valid only for two upgrades. 

In setups where ETH stakers delegate their stake to a validator operator, this EIP allows them to unilaterally submit their voluntary exit to an Ethereum consensus client at any time, providing more control and flexibility in their staking operations.

EIP-7045: Increase max attestation inclusion slot

EIP-7045 extends the maximum inclusion slot for attestations from one rolling epoch to two non-rolling epochs. This change allows validators more time to include their attestations in a block, increasing the security and robustness of Ethereum's PoS consensus mechanism. 

Increasing the max attestation slots leads to faster block confirmation times and makes the consensus mechanism more resilient against temporary censorship.

EIP-7514: Add max epoch churn limit

EIP-7514 introduces a cap on the per-epoch churn limit at 8, transitioning the growth rate of Ethereum validators from exponential to linear. The churn limit defines the maximum number of validators that can enter or exit the active set every epoch (~6.4 minutes). 

This addresses concerns about state-size bloat and strain on node performance, while also preventing validator bloat.

EIP-7516: BLOBBASEFEE opcode

EIP-7516 is an improvement directly related to proto-danksharding, introducing the BLOBBASEFEE opcode to enable smart contracts to programmatically access the current blob base fee. This feature is particularly useful for contracts dealing with large data blobs, as it allows them to account for the blob gas price in a trustless manner.

The cost is identical to the BASEFEE opcode's cost, reflecting the simplicity of making available data that is already in the header.



Is the Dencun upgrade the answer to Ethereum’s scalability concerns?

The Dencun upgrade is not the final answer, but it gets Ethereum closer in its pursuit of scalability. The EIPs, especially the proto-danksharding, address finer aspects of scalability and the upgrade also provides a sound foundation for full sharding to happen — quickly and more seamlessly.

We hope this blog helped you understand the Dencun upgrade, its proposals, how it improves Ethereum, and ultimately, how it helps developers.

If you have any questions, join 45,000+ other builders in our Discord community or reach out directly to the team. And if you want to start building smart contracts, get started with thirdweb’s web3 tools and SDKs for free!



FAQs

1. Are proto-danksharding and full sharding the same on Ethereum?

Proto-danksharding is a precursor for full sharding, enhancing the data capacity and preparing Ethereum for full sharding. This approach lays the groundwork for danksharding, a more extensive sharding strategy where Ethereum's blockchain will be divided into multiple shards, each processing a portion of the network's transactions and data.

2. Will the Dencun upgrade reduce Ethereum gas fees?

Yes and no. 

Yes, by employing data "blobs", transactions on layer 2 solutions like rollups will be super economical. This should ideally also reduce overall network costs. 

No — because the Dencun upgrade doesn’t directly aim to reduce Ethereum’s gas fees, as it focuses more on scaling Ethereum’s data availability.

3. What are the key EIPs included in the Dencun upgrade?

EIP-4844 is the most talked about when it comes to the Dencun upgrade. But there are other EIPs like EIP-1153, EIP-4788, EIP-5656, EIP-6780, EIP-7044, EIP-7045, EIP-7514, and EIP-7516 that are included in the upgrade. 

4. How can developers prepare for the Ethereum Dencun upgrade?

Developers, ideally, will not have to change anything. 

But, for best practices, developers can utilize the Holesky testnet to test dApps and smart contracts with the new features and changes introduced by the Dencun upgrade. Similarly, they need to keep an eye out on the development tools, libraries (like Web3.js or Ethers.js), and dependencies being updated to support the Dencun upgrade.

5. What comes after the Dencun upgrade for Ethereum?

The Dencun upgrade lays the groundwork for The Surge which focuses on implementing full sharding. By partitioning data processing across multiple chains, The Surge aims to significantly enhance Ethereum's capacity to handle transactions and store data.

thirdweb: The complete web3 development platform
Build web3 apps easily with thirdweb’s powerful SDKs, audited smart contracts, and developer tools—for Ethereum & 700+ EVM chains. Try now.