Dencun Upgrade
A Crucial Step in Ethereum Scalability
The Dencun upgrade is a major upcoming upgrade to the Ethereum mainnet, featuring several new functionalities, with the most crucial being Proto-Danksharding (via EIP-4844). This feature will reduce the storage costs on Layer 2 (L2), consequently lowering L2 transaction gas fees and enabling the acceptance of more complex applications.
PREFACE
Why is it called the Dencun Upgrade?
The upgrade name Dencun is composed of two merged names: Deneb and Cancun. Deneb represents the upgrade of Ethereum's Consensus Layer, while Cancun represents the upgrade of Ethereum's Execution Layer.
After Ethereum transitioned to Proof of Stake (PoS), the original Ethereum protocol was split into two layers: the Consensus Layer and the Execution Layer. Here's the difference between these two layers:
Consensus Layer
This layer is responsible for the network's consensus mechanism, determining which transactions are valid and agreeing on the order of transactions to be added to the blockchain. With the upgrade, Ethereum transitioned from Proof of Work (PoW) to Proof of Stake (PoS) in this layer.
Execution Layer
This layer handles all computations related to state changes, such as validating transactions, executing smart contracts, updating account balances, and maintaining Ethereum's state tree. The Execution Layer also includes permanent storage spaces such as Calldata.
Related EIPs for this upgrade
Explanation of the Important Upgrade EIP-4844
The EIP-4844 upgrade introduces a new transaction type called BlobTx and a new storage space called Blob. This storage space resides in the Ethereum Consensus Layer, making it inaccessible to the Execution Layer's EVM. Consequently, data stored in this location cannot be accessed by smart contracts.
As a decentralized ledger, storage has always been a significant topic for blockchain. If the storage capacity of each block is too small, it can lead to reduced transaction capacity and quantity. The pressure of competition can cause an increase in gas fees and render the blockchain unusable. On the other hand, if the storage capacity of each block is too large, it will increase the pressure on nodes, requiring each node to improve the quality of its hardware, thus reducing the security of the decentralized network due to fewer running nodes.
This upgrade introduces blob storage, where each blob will have up to 128KB of space to store additional information. Each Ethereum block will support a maximum of 6 blobs, totaling a maximum of 768KB. This means that each Ethereum block can be expanded by up to approximately 0.7MB. Calculating based on an Ethereum block every 12 seconds, with each block defaulting to supporting 3 blobs, there will be approximately 21,600 blobs per day, resulting in nodes adding around 2.6 GB of data. Therefore, blobs are designed with a lifespan of approximately 18 days (4096 epochs) based on their use cases, after which nodes will delete them. Consequently, storing data in blobs incurs very low gas fees.
Compare the differences between the following types of storage
Name | Storage | Calldate | Memory | Blod |
---|---|---|---|---|
Description | Ethereum storage, incl. the core World State | Immutable storage location | Temporary memory during EVM execution | Additional external storage |
Location | Execution layer | Execution layer | Execution layer | Consensus layer |
Gas fee | $$$$$ | $$$ | 0 | $ |
Life cycle | Permanent | Permanent | Destroyed immediately after the execution | Deleted after c. 18 days |
Unable to be read and utilized by smart contracts on the EVM, and also subject to deletion after a period of time, what's the use of Blob? Currently, Layer 2 benefits the most from it.
Let's take a look at how Layer 2 works
Taking Optimistic Rollup as an example, transactions that occur on Layer 2 are captured by the Layer 2 Sequencer and merged and compressed (Rollup) into more compact data, typically including the state root, compressed transaction data, proof information, etc., and then uploaded to the Ethereum mainnet. This information is not parsed or read by Ethereum or smart contracts, but is mainly used to ensure the security of L2 data, prove the authenticity and reliability of its transactions, and recover some states in emergencies.
For example, in Optimistic Rollup, operations such as withdrawing funds require a waiting period of 7 days. During this time, validators verify the relevant data to discover if the Sequencer has engaged in any malicious behavior. After the seven-day challenge period, the transaction can be deemed secure and confirmed. Currently, this information is stored on the Ethereum mainnet in the form of Calldata, which provides the most secure and reliable storage but requires a relatively high Gas fee. Since Ethereum's block capacity is limited, this also restricts the scalability and development of L2. However, blobs can alleviate this issue. L2 can strip the relevant data used for verification and store it in blobs because they do not need to be permanently stored; they only need to be accessible during the challenge period. Therefore, this can greatly reduce Gas fees.
Below is a flowchart and comparison of the process before and after the upgrade:
Future Outlook
Although the Gas fees on L2 have already decreased several times compared to the Ethereum mainnet, the Cancun upgrade will further reduce L2 by 10 times (estimated). This will greatly promote the activity and innovation of the application layer on L2:
DeFi transaction efficiency improvement and reduction in transaction fees
Better performance, gaming experience, and gameplay for blockchain games
Developers can develop more complex applications without worrying about the fees paid by users
Large-scale transactions (such as Visa) become achievable
Let's look forward to and witness the future of Ethereum together!