135 subscribers
join
Rating
Login
Logout

Ethereum Dencun upgrade: all you need to know

Crypto Education

Table of Contents

Dencun (Deneb + Cancun) is an upcoming Ethereum hard fork that will feature proto-danksharding - a scaling solution that can make L2 rollups up to 100x times cheaper to use. Testing is set to start on January 17. Read our beginner-friendly deep dive!

TL;DR

  • Dencun is the next big Ethereum upgrade. It’s actually two upgrades: Deneb on the Beacon Chain and Cancun on the execution chain.
  • Testing should start on Goerli on January 17, 2024, followed by Sepolia on January 30 and Holesky (a new testnet) on February 7. There is no mainnet release date yet.
  • 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.
  • Proto-danksharding is completely different from the earlier ETH2 sharding plan, where Ethereum was to be split into 64 shards.
  • Danksharding introduces blobs - large objects filled with transaction data that can’t be read by the EVM.
  • Blobs will be stored on the Ethereum mainnet for a limited time - just enough for interested parties to verify that they are valid. Other participants can keep storing blob data as long as they wish.
  • The validity of blob data can be verified using a complicated mechanism called KZG commitments.
  • Thanks to blobs, it won’t be necessary to write transaction data to Ethereum in the form of calldata, which is expensive and currently accounts for most rollup costs.
  • 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, but rollup fees will.
  • The new plan acknowledges the huge role that rollups play in scaling Ethereum.
  • Pontem’s new L2, Lumio, should also benefit from proto-danksharding.
  • Dencun features several other EIPs, including EVM opcode changes and optimizations for validators.
  • While the price of ETH could go up prior to the mainnet release, you should be careful and DYOR, as such pumps often result in sell-the-news events. In the longer term, if rollup fees do drop a lot, Cancun will bring benefits to the whole rollup ecosystem.

What is Dencun?

Dencun (short for Deneb + Cancun) is the next major Ethereum upgrade, set to introduce a scaling technology known as proto-danksharding. It should drastically reduce the transaction fees that users pay on L2 rollups like Arbitrum, Optimism, zkSync, and Pontem’s own Lumio L2.

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

Apart from the Ethereum Improvement Proposal (EIP) no.4844, which describes proto-danksharding, Dencun contains at least eight 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 later pushed to 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.

A refresher: the innovations of the previous big upgrade, Shapella

Ethereum’s last big upgrade was Shanghai/Capella (“Shapella”) on April 12, 2023. It allowed ETH withdrawals for stakers – more than two years after staking launched.

Capella unblocked ETH unstaking on the consensus layer (Beacon Chain), while Shanghai made it possible to withdraw unstaked ETH to the execution layer, where all transactions happen.

We’ve covered previous Ethereum upgrades in other blog posts:

Shanghai + Capella upgrade (Shapella)

Ethereum Merge

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).

Ethereum is still lagging, though sharding should be finally introduced as part of the upcoming Deneb / Cancun upgrade. However, the implementation will be radically different from Vitalik’s initial plan.

ETH2 sharding: 64 independent but communicating shards

Vitalik Buterin first described sharding in an article published on December 31, 2017. Like so many of the articles in Vitalik’s blog, this article is very long but accessible to non-tech users and totally worth reading. Back then, as he himself stressed, all blockchains still required each node to store the full blockchain state and process all transactions.

Vitalik writes, “As long as there are sufficiently many nodes verifying each transaction (...) could we not split up transaction processing between smaller groups of nodes(...)?”

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 in detail, because it makes the new concept of danksharding easier to understand in comparison. We’ll describe the process in present tense, but remember that this framework has been deprecated.

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

If at least two-thirds of the shard validators approve (attested) a collation, its header is sent to the Beacon Chain, and the proposer receives a reward. There, a committee of 128 randomly selected validators verifies just the attestations on the header (rather than all of its contents) and adds it to the Beacon Chain.

The Beacon Chain and the shards function in a coordinated way. Time is divided into 12-second slots and epochs of 32 slots each (6.4 minutes). During each slot, a shard can create one collation and submit its header to the Beacon Chain. Thus, with each slot, the network can add up to 64 shard blocks, plus one Beacon Chain block. The beacon block is connected to shard blocks via crosslinks (up to 64 of them).

Validators are allocated to different shards by the Beacon Chain in a pseudorandom way and reshuffled every epoch. A special beacon (from which the chain takes its name) issues random number

To overtake the mainnet, an attacker would need to control at least 2/3 of the committee of 128 validators. With validators chosen pseudorandomly, the chance of this happening is less than 1 in a trillion (see this article on minimum committee size for calculations).

If a shard validator  breaks the rules – for example, votes both for and against a collation, or proposes more than one collation while acting as proposer – others can report that validator for a reward.

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 the Validator Manager Contract on the Beacon Chain in 2023. In the first phase, initially planned for 2023, the shards weren’t supposed to host accounts and smart contracts. They would have worked as a data layer, without data exchange between them.

In the second phase, the shards would have functioned independently from each other, each storing its own blockchain state, and with different dApps running on each of them.

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. Arbitrum, Optimism, and Base are all in the top 10 of blockchains by TVL. ZK rollups have arrived with zkSync Era (currently no.19 on the list) and Polygon zkEVM (no.50). Vitalik Buterin himself said in 2020 that rollups will be the key vehicle of Ethereum scaling in the next few years.

This raises a question: do you really need all those independent shards? Wouldn’t it be better to build a sharding framework around rollups, since they can already do what Ethereum shards were supposed to do, like run dApps?

Splitting the blockchain state into shards isn’t the endgame anymore. Rather, Ethereum’s short- and mid-term roadmap is now all about helping rollups (optimistic and ZK) to 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 fully 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 will introduce  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 Lumio, 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 the first rollup to support both EVM and Move VM, Aptos’ virtual machine. This brings the speed, security, and low fees of Move VM and Aptos to the Ethereum ecosystem for the first time.

Pontem Wallet supports both the Move VM and the EVM parts of Lumio. Liquidswap DEX offers Lumio support out of the box on testnet on Move VM, so you can already try swaps on the new L2.

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, Lumio bundles (rolls up) transactions into batches and sends them to Ethereum in the form of calldata. This incurs gas fees. All the transactions are settled on the Ethereum Sepolia testnet, meaning that Lumio fees are paid in testnet ETH for now - but once Lumio launches on the mainnet, these costs will become very real. Proto-danksharding should bring these 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.

Credit: L2fees

As of January 2024, it costs $0.09 to send ETH with Optimism and $0.08 to do the same with Arbitrum. Swaps cost $0.17 and $0.24, respectively. Of course, this is cheap compared to Ethereum L1 - but still expensive compared to next-generation L1s like Aptos, for example.

In fact, 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 Ethereum mainnet). The bulk of the cost comes 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.

Right now rollups 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 is very expensive: 4 gas per byte when its value is zero and 16 gas for a non-zero byte, at Ethereum L1 gas prices. Calldata gas accounts for most of the rollup costs - and that cost is transferred onto rollup users.

Open any transaction in an Optimism or Arbitrum explorer - and you’ll see that the Ethereum mainnet fee is much, much higher than the L2 fee. For example, here the user paid around 23,000 gas at 0.000000000012 ETH (0.012 Gwei) on the L2 - that’s circa 275 gwei. But the L1 fee was  30,730 gwei, or 111 times higher than the L2 fee.

Credit: Optimistic Explorer

Both Optimism and Arbitrum use calldata optimization (compression) algorithms. But proto-danksharding goes further: it does 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 blog 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 will be able to access all the blob data, but the EVM won’t know what’s in those blobs. They are said to be opaque to the EVM.

The Beacon Chain will store 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.

KZG commitments: how blob data will be 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.  

Will proto-danksharding reduce Ethereum gas fees?

It’s important to realize that proto-danksharding won’t make Ethereum gas fees go down. A transaction between two Ethereum wallets will cost as much as it does now. However, it should become much cheaper to use L2s like Optimism, because the cost of sending transaction data from a rollup to the mainnet can drop by as much as 100x.

What else is in the Cancun + Deneb upgrade?

The hard fork should feature 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.

When will Cancun + Deneb upgrade happen?

The Dencun upgrade on mainnet was originally scheduled for Q4 2023, but later postponed till early 2024.  Before the mainnet release, it has to go through a series of private and public testnets. We’ll list them all so that you can see how much testing goes into such a fork.

  1. Devnet 8: launched on August 18, 2023;
  2. Devnet 9: launched on October 7;
  3. Devnet 10: launched on October 23.  Devnets 8, 9, and 10 are all private, meaning that regular users can’t join them.
  4. Devnet 11: October 30, 2023.
  5. Devnet 12: November 30, 2023.
  6. Goerli: the first public testnet. The plan was to launch it before the DevConnect conference in November 2023, but the new release date is January 17, 2024.
  7. Sepolia, Ethereum’s primary public testnet: January 30, 2024.
  8. Holesky, the new testnet that will replace the veteran Goerli: February 7, 2024.
  9. Mainnet: TBA.

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. So be careful and DYOR.

In the mid-term, if rollup fees do drop noticeably after the introduction of proto-danksharding, it can have a positive effect on ETH and on native gas coins 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 $4000 after Cancun” should be taken with a huge grain of salt.

We’ll keep you posted on the progress of the Dencun upgrade. Meanwhile, we have lots of updates and new features of our own coming up, including concentrated liquidity on Liquidswap and the new PontemAI chatbot. 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