135 subscribers
join
Rating
Login
Logout

Ethereum Dencun upgrade: all you need to know

Crypto Education

Table of Contents

Dencun (Deneb + Cancun) is an Ethereum hard fork that went live on March 13. Itl features proto-danksharding - a scaling solution that can make L2 rollups up to 100x times cheaper to use. Read our beginner-friendly deep dive!

TL;DR

  • Dencun is the latest big Ethereum upgrade. It went live on March 13, 2024, and actually consists of two upgrades: Deneb on the Beacon Chain and Cancun on the execution chain.
  • The main innovation is proto-danksharding (EIP 4844), a scaling solution set to reduce the fees on Ethereum rollups by as much as 100 times.
  • The first L2s to roll out support for proto-danksharding were Optimism and the OP chains (Base, Zora), as well as Starknet and zkSync.. Their transaction fees dropped by up to 99% as a result.
  • Proto-danksharding is completely different from the earlier ETH2 sharding plan, where Ethereum was to be split into 64 shards. The new plan acknowledges the huge role that rollups play in scaling Ethereum.
  • Danksharding introduces blobs - large objects filled with transaction data that can’t be read by the EVM. Thanks to blobs, it’s not necessary to write transaction data to Ethereum in the form of calldata, which used to account for most of rollup costs.
  • 24 hours after the upgrade, there were an average 1.39 blobs sent to Ethereum every hour, vs the target of 3 blobs/hour. Starkent accounted for almost 77% of all blobs.
  • The strange name proto-danksharding honors the two key researchers behind EIP 4844: Protolambda (Diederik Loerakker) and Dankrad Feist.
  • Ethereum mainnet fees won’t go down after the upgrade - only rollup fees will. Pontem’s new L2, SuperLumio, should also benefit from proto-danksharding.
  • While the price of ETH did revisit $4,000  just before the mainnet release, you should be careful and DYOR before buying. In the longer term, if blob production reaches target and the fees stay low, Cancun will bring benefits to the whole rollup ecosystem.

What is Dencun?

Dencun (short for Deneb + Cancun) is the latest major Ethereum upgrade. It introduces a scaling technology known as proto-danksharding, which should drastically reduce the transaction fees that users pay on L2 rollups like Pontem’s SuperLumio, Optimism, Arbitrum, etc.

We’ve covered the fundamentals of sharding in a recent article, and this time we’ll see how it is implemented on Ethereum specifically.

Apart from the Ethereum Improvement Proposal (EIP) no.4844, which describes proto-danksharding, Dencun contains several more EIPs: new EVM opcodes, a limitation on the growth rate of staked ETH, etc.

Cancun is the upgrade of the execution layer, while Deneb is the corresponding fork of the consensus layer (Beacon Chain). Dencun was originally scheduled for the end of October 2023 but eventually went live on March 13, 2024.

Cancun is a famous resort in Mexico

You may have heard that Ethereum engineers have been working on sharding - a scaling solution that should make Ethereum much faster. However, the final design is completely different from the original, and we will look at both in detail.

What’s in a name?

Ethereum has an elegant system for naming its upgrades. Execution layer forks are named after cities:

  • Constantinople and Istanbul in 2019 (which are the same city in different historical periods, of course);
  • Berlin and London in 2021;
  • Paris (The Merge) in 2022;
  • Shanghai and Cancun in 2023.

For the Beacon Chain updates; names of stars are used:

  • Altair (2021), the brightest star in the Eagle constellation;
  • Bellatrix (2022), in the Orion;
  • Capella (2023), the brightest star in the Auriga (Chariot);
  • Deneb (coming up in October 2023), the brightest in the Cygnus (Swan).

There’s a third naming system for the upgrades that delay the difficulty bomb. As the bomb would make the network freeze, they are called after glaciers:

  • Muir Glacier (2020), in Alaska;
  • Arrow Glacier (2021), on Mt. Kilimanjaro in Tanzania;
  • Gray Glacier (2022) – actually Grey rather than Gray, in Chilean Patagonia.
The real Gray glacier. Credit: Denomades

Blockchain sharding 101

Sharding means splitting a database (and blockchain is a database) into smaller sets of data that are hosted and/or processed separately. It’s widely used to scale traditional databases that would lag if you were to host them on a single server.

In blockchain, sharding can solve the issue of bottlenecks, whereas the network is only as performant as a single node. This problem arises mostly on chains where every node has to process every single transaction - unlike Aptos, for example, which has parallel execution and can reach 160,000 TPS without any sharding.

  • Sharding a blockchain is more complex than a regular database, and there are many questions to answer:
  • How to split the workload among the nodes?
  • How will the information about blocks be recorded on the central chain (“beacon chain”)?
  • How will the shards communicate?
  • Should you split both the blockchain state or just transaction processing?
  • How will you ensure security, given that a single shard is easier to attack than a unified network? And so forth.

Vitalik Buterin first wrote about sharding Ethereum in 2017. Since then, other blockchains have already introduced sharding, including TON, NEAR, and Zilliqa (see our deep dive into blockchain sharding).

On Ethereum, sharding was finally introduced as part of the Deneb / Cancun upgrade. However, the implementation is radically different from Vitalik’s initial plan.

The original ETH2 sharding idea with 64 shards

Vitalik Buterin first described sharding in an article published on December 31, 2017, but the first actual announcement of sharding in Ethereum came in April 2018.

Over the following four years, Ethereum core devs came up with a detailed plan of implementation – only to abandon it in 2022 following the rise of rollup chains. We’ll still cover the original plan, because it makes the new concept of danksharding easier to understand in comparison.

The original idea was to split the blockchain state into 64 chains (the current mainnet + 63 new shards), with at least 128 validators in each. One validator per shard would play the role of the proposer and create a collation of transactions (a shardblock). The other shard validators would verify that the collation is valid.

If at least two-thirds of the shard validators approved a collation, its header would be sent to the Beacon Chain. There, a committee of 128 randomly selected validators would verify just the attestations on the header (rather than all of its contents) and add it to the Beacon Chain.

Validators would be allocated to different shards by the Beacon Chain in a pseudorandom way and reshuffled every epoch. Every shard would be able to host dApps and user accounts, and cross-shard communication would also be possible. The total processing capacity would have risen to 100,000 TPS.

Sharding was supposed to be the next big update after the Merge (the full transition to Proof-of-Stake). It was planned to deploy in 2023 - but then rollups came onto the scene.

Danksharding: a rollup-centric paradigm

Ethereum’s new sharding roadmap

Something very important happened in the Ethereum ecosystem in the past couple of years: rollups have arrived. Vitalik Buterin himself said in 2020 that rollups will be the key vehicle of Ethereum scaling in the next few years - and indeed, Arbitrum and Optimism are both in the top 10 of blockchains by TVL.

Since rollups could already do what Ethereum shards were supposed to do (like run dApps), Ethereum devs abandoned the idea of creating 64 independent shards. Instead, they decided to build a sharding framework that would help rollups send data to the mainnet cheaply.

This design is called danksharding. The term comes from the name of the Ethereum Foundation researcher who proposed it, Dankrad Feist. He holds a PhD in theoretical physics and applied math from Cambridge University and has been working on Ethereum since 2019.

Dankrad Feist

The term “sharding” is still appropriate: even though the whole blockchain state won’t be sharded, data storage will. Instead of storing a full copy of the blockchain state (many terabytes in size), a device can store only a small part of the data-filled “blobs” - we’ll talk about them soon.

The Dencun upgrade introduces  a version of danksharding known as proto-danksharding. It is described in the Ethereum Improvement Proposal no. 4844.

The “proto” part in proto-danksharding is a clever pun. In Greek, “proto” means an early version of something, but it also points to Protolambda - the pseudonym of the second researcher who proposed EIP-4844 together: His real name is Diederik Loerakker, and he is currently working for OP Labs.  

By the way: do you know about SuperLumio, Pontem’s new rollup?

We have a special reason to be interested in the Cancun upgrade: in December 2023, Pontem launched a new optimistic rollup, Lumio. The unique thing about it is that Lumio is an altVM L2: it supports both EVM and Move VM, Aptos’ virtual machine, and can support many other blockchain virtual machines.  

In February 2024, we launched the first mainnet iteration, SuperLumio. It is built using the OP Stack and forms part of Superchain, an upcoming network of interconnected L2s. Pontem Wallet already supports both the Move VM and the EVM parts of Lumio on testnet and will soon add support for SuperLumio on mainnet.

Developers can deploy smart contracts on Lumio both on Move VM (Pontem’s Intellij IDE plugin is the best way to do it) or on EVM using Hardhat or Foundry.

Like any optimistic rollup, SuperLumio bundles (rolls up) transactions into batches and writes them to Ethereum. Proto-danksharding should bring the associated costs down dramatically - here’s how.

The challenge: cutting the costs of data availability

Before we dive into the mechanics of proto-danksharding, let’s try to understand the problem it solves: the cost of L2 transactions.

You see, the costs of processing a transaction on a rollup and updating the rollup’s storage are tiny, because these operations happen off-chain (outside of the Ethereum mainnet). Pre-Cancun, the bulk of the cost came from having to ensure data availability. A bona fide network participant (“prover”) must be able to examine rollup transactions and verify that they aren’t fraudulent - therefore, transaction data needs to be available on the mainnet, too.

Before Cancun, all rollups would send batches of compressed transactions to Ethereum L1 in the form of calldata - information in the transaction’s Data field. The problem is that writing calldata to Ethereum was very expensive - and that cost was transferred onto rollup users.

Many rollups used calldata optimization (compression) algorithms. But proto-danksharding went further: it did away with calldata posting altogether, replacing it with… blobs.

Blobs: danksharding’s way to cut rollup fees

In proto-danksharding, rollup transaction data is stuffed into special objects called blobs, or Binary Large Objects. Blobs are common data structures in JavaScript and Python: they are objects filled with unprocessed data that don’t even have to be in the JavaScript or Python format.

On Ethereum, blobs will be transferred using a new type of transaction: blob-carrying transactions. They will have a new field called “blob”.

Blobs can be as large as 125 kB, which is a lot of Ethereum. Each blob consists of a body, which holds transaction data, and a much smaller header featuring the signature of the proposer and other data (see this article by crypto research platform Xangle for details).

As a blob arrives on the mainnet, the latter verifies that the data contained in the blob is available on the network - but not what’s in it. The rollup chain can access all the blob data, but the EVM doesn’t know what’s in those blobs. They are said to be opaque to the EVM.

The Beacon Chain stores blob data for a limited time - a few weeks or a couple of months perhaps. That should be enough for any interested party to access and verify that the rollup is playing by the rules. External participants, such as rollup operators, can keep storing blob data as long as they want.

As blobs are introduced, Optimism & SuperLumio fees are down 99%

Credit: L2fees

As of March 14 2024 - one day after the upgrade - it cost $0.34 to send ETH with Arbitrum, and $0.93 to make a token swap. At the same time, it cost less than $0.01 to do the same with Optimism. Why such a huge difference? Because Optimism had already rolled out support for proto-danksharding, while Arbitrum was still using the old calldata method.

As of the time of this update (mid-March 2024, most - but not all - rollups have deployed support for proto-danksharding. These include Optimism and OP Stack-based chains (Base, and Zora), as well as Starknet and zkSynce. On these L2s, the drop in transaction fees was dramatic: around 99%.

Meanwhile, Arbitrum users should see significant fee reductions starting from March 18. Pontem’s SupeLumio, being an OP chain, is technically able to produce blobs from the get-go, and the first ones should appear soon, too.

As of the time of writing, an average of 1.39 blobs were being submitted per hour, while the target is 3 blobs. The most active blob producer among L2s is StarkNet (75.8%), where the average swap fee dropped from $6.8 to $0.06. It is followed by zkSync with 17.6%. However, it’s only once the average number of blobs per hour reaches the target that we’ll be able to examine their impact on fees.

Credit: @0xRob via Dune Analytics

Will proto-danksharding reduce Ethereum gas fees?

It’s important to realize, however, that proto-danksharding won’t make gas fees on Ethereum itself go down, because blobs affect only the mechanics of writing rollup data onto the mainnet. A transaction between two Ethereum wallets will cost as much as it would without the Cancun upgrade.

KZG commitments: how blob data is verified

Are you ready for something a bit more technical? Then let’s look into commitments.

  • There needs to be a way to verify the blobs posted by rollups - to check that the rollup hasn’t messed with the data. Here’s how it’s done:
  • Together with a blob, a rollup posts a so-called “commitment”.
  • A commitment is created by applying a polynomial function to the blob data to get the function’s values at different data points.
  • A prover can apply the same function to the same data points to check that the resulting values are the same.
  • The cryptographic scheme used to create commitments out of blob data is called  Kate-Zaverucha-Goldberg (KZG).
  • The participants (rollup operators and provers) need to come up with a set of data points for verification - and keep those points secret from everyone else.  
  • The procedure used to generate such strings of data points is called a KZG ceremony. In it, one participant receives a string of values from the previous ones, then creates some new random numbers and mixes them with the original values. The participant next passes the new string on to the next person and destroys their own copy of the string. As long as there is at least one honest participant, the ceremony is secure.
  • Over 141,000 users participated in Ethereum’s EIP-4844 KZG Summoning Ceremony. One needed an ETH wallet address or a GitHub account to participate. The final result was a Structured Reference String (SRS), which will be used in the Cancun upgrade.
Over 141,000 contributions ensured that proto-danksharding’s verification scheme would be safe. Credit: Ethereum.org

Proposer-builder separation (PBS) and the new bidding system

It takes a lot of resources to form a blob of data and generate a commitment for it. Only validators with powerful hardware would be able to do it. But in order to promote decentralization, Ethereum needs everyone to be able to participate - so it introduces a system known as proposer-builder separation.

A validator with sufficient resources can be a block builder: form ordered lists of transactions and submit them as block headers to other validators, called block proposers. Any validator can be a block proposer and verify blobs, which is much faster and cheaper.

Here’s the most interesting part: builders compete by bidding various sums of ETH, and it’s up to the proposer to pick one. It’s expected that they will go for the highest bidder (as the proposer gets to keep the bid price as their income). Finally, the winning builder constructs the whole block with all its blob data and receives the reward.

Things get more complicated down the line: the devs want to introduce crLists - lists of transactions that proposers will broadcast and that builders will have to include in a block if they can’t use all available space for other transactions. The goal is to combat censorship: situations where builders omit some transactions on purpose (cr in crList stands for “censorship-resistant”). Read more about crLists here.  

What else is in the Cancun + Deneb upgrade?

The hard fork features the following Ethereum Improvement Proposals, split by the execution and consensus layer.

Shared between Cancun and Deneb:

  • EIP-4844: proto-danksharding and blob-carrying transactions.
  • EIP-4788: commits the roots of Beacon Chain blocks to the EVM; can be useful to staking pools and bridges.

Cancun (execution layer):

  • EIP-6780: modifies how the SELFDESTRUCT EVM opcode will function.
  • EIP-5656: introduces the new EVM opcode MCOPY, which offers a gas-efficient way to copy bytes of data from Memory in Solidity.
  • EIP-1153: : new opcodes TSTORE and TLOAD that handle transient storage, which is cheaper to use than permanent storage and is discarded after each transaction.
  • EIP-7516: returns the current base fee for a blob.

Deneb (consensus layer):

  • EIP-7044: makes a validator’s voluntary exit signature valid perpetually - and not just for two upgrades as it is now.
  • EIP-7045: increases the maximum slot in which validators’ attestations can be included to the end of the next epoch; needed for security.
  • EIP-7514: slows down the rate at which the number of validators can grow. The goal is to give the community time to discuss adjusting ETH staking rewards.

How will Cancun affect the price of ETH?

Major blockchain upgrades are often “sell-the-news” events, with the price going up prior to the update and then dropping immediately after. Indeed, the price of ETH went above $4,000 for a short time on March 11, but you should be careful and DYOR before buying.

In the mid-term, if rollup fees stay low after the blob production rate reaches the target, it can have a positive effect on ETH and on native rollup tokens like ARB and OP. However, once again, you have to be careful.

After the Merge back in 2022 there was a lot of media hype about how ETH was becoming “deflationary”, and the price kept going up. But we all know what happened after: the bear market. So, any headlines like “ETH is going to $5000 after Cancun” should be taken with a huge grain of salt.

We’ll keep you posted on the dynamics of rollup fees following the Dencun upgrade. Meanwhile, we have lots of updates and new features of our own coming up, including a very important partnership for SuperLumio. Do give us a follow on  Telegram, Twitter, and Discord and stay tuned!

About Pontem

Pontem Network is a product studio building the first-ever suite of foundational dApps for Aptos. Pontem Wallet, the first wallet for Aptos, is available for Chrome, Mozilla Firefox, Android, and iOS.

Use Pontem Wallet to store and send any tokens on Aptos. The wallet is integrated with our Liquidswap DEX, the first DEX and AMM for Aptos, Topaz and Souffl3 NFT marketplaces, Ditto and Tortuga liquid staking platforms, Argo and Aries lending protocols, and all other major Aptos dApps.

Our other products include the browser code editor Move Playground,  the Move IntelliJ IDE plugin for developers, and the Solidity-to-Move code translator ByteBabel – the first ever implementation of the Ethereum Virtual Machine for Aptos.

Install our wallet and try DEX

Related posts

ethereum-dencun-upgrade-all-you-need-to-know
659ee186a75d4520812a556a
amb-ethereum-dencun-upgrade-all-you-need-to-know