The Ethereum Dencun upgrade has officially been confirmed to launch on March 13th. This article will explain the technical details of the Dencun upgrade in plain and understandable language, outlining the context between this upgrade and data availability (DA) and Layer 2.
EIP-4844 is the most important proposal in the Dencun upgrade, marking a significant step for Ethereum in its decentralized scalability journey. In simple terms, the current Ethereum Layer 2 needs to submit transactions occurring in Layer 2 to the Ethereum mainnet’s calldata for node verification of the validity of Layer 2 network blocks.
However, this method brings about some challenges. Despite compressing transaction data as much as possible, the large volume of Layer 2 transactions multiplied by the expensive storage cost of the Ethereum mainnet still incurs significant expenses for Layer 2 nodes and users. This price factor causes many Layer 2 users to move to sidechains.
EIP-4844 introduces a cheaper storage area called BLOB (Binary Large Object) and a new transaction type called “BLOB-Carrying Transaction” that can reference the BLOB storage space. This replaces the previous requirement of storing transaction data in calldata, helping Layer 2 achieve gas cost savings in the Ethereum ecosystem.
It is important to note that the reason BLOB data is cheaper than similar-sized Ethereum calldata is that the Ethereum Execution Layer (EL) cannot directly access the BLOB data itself. Instead, EL can only access references to BLOB data, while the actual data of BLOB can only be downloaded and stored by the Ethereum Consensus Layer (CL), also known as beacon nodes. The storage of BLOB data consumes much less memory and computational power compared to ordinary Ethereum calldata. Additionally, BLOB has a limited storage duration (usually about 18 days) and does not infinitely expand like the Ethereum ledger size.
In contrast to the permanent ledger of the blockchain, BLOB is a temporary storage with a lifespan of 4096 epochs, approximately 18 days. After expiration, most consensus clients will be unable to retrieve specific data from BLOB. However, the evidence of its previous existence will be preserved on the mainnet in the form of KZG commitments and permanently stored on the Ethereum mainnet.
The choice of 18 days is a compromise between storage cost and effectiveness. Optimistic Rollup projects, such as Arbitrum and Optimism, have a 7-day fraud-proof time window based on their settings. The transaction data stored in BLOB is essential for initiating challenges in Optimistic Rollups. Therefore, the expiration of BLOB must ensure that Optimistic Rollups’ fraud proofs can access the necessary data. For simplicity, the Ethereum community chose 2 to the power of 12 (4096 epochs derived from 2^12, with each epoch lasting approximately 6.4 minutes) as the duration.
Understanding the relationship between EIP-4484 and BLOB is crucial for comprehending the role of BLOB in data availability (DA). EIP-4484 is the overall proposal, introducing a new transaction type, while BLOB can be seen as a temporary storage location for Layer 2 transactions. Most of the data (Layer 2 transaction data) in EIP-4484 is stored in BLOB, while the remaining data, which is the commitment of BLOB data, will exist in the mainnet’s calldata. In other words, commitments can be read by the Ethereum Virtual Machine (EVM). The commitment can be imagined as constructing all the transactions in BLOB into a Merkle tree, and only the Merkle root, which is the commitment, can be accessed by the contract.
By storing only the commitment, the cost is optimized while achieving the verifiability of transaction data. This is a clever and efficient solution for uploading transaction data in Rollup technology. It should be noted that Dencun does not use a Merkle tree like Celestia but instead utilizes the KZG (Kate-Zaverucha-Goldberg) algorithm, which is more complex in the generation process but has a smaller verification volume and simpler verification steps. However, it requires a trusted setup (ceremony.ethereum.org has already ended) and does not have resistance against quantum computing attacks (Dencun uses the Version Hash method and can switch to other verification methods if necessary). Celestia, a popular DA project, uses a Merkle tree variant, which relies to some extent on the honesty of nodes but helps reduce the computational resource threshold between nodes and maintains the decentralized nature of the network.
EIP-4844 brings about both cost reduction and security risks, which also presents new opportunities. To understand why, we need to discuss the escape hatch mechanism or force withdrawal mechanism mentioned earlier. These mechanisms ensure the safe return of user funds to the mainnet when Layer 2 nodes fail. The precondition for activating these mechanisms is that users need to obtain the complete state tree of Layer 2. Normally, users can request data from a Layer 2 full node, generate Merkle proofs, and submit them to the contract on the mainnet to prove the legitimacy of their withdrawals.
However, it should be noted that users want to activate the escape hatch mechanism precisely because the Layer 2 nodes are malicious. In such cases, it is highly likely that users will not be able to obtain the desired data from the nodes. This is known as data withholding attack, as Vitalik often mentions. Prior to EIP-4844, the mainnet recorded permanent Layer 2 records, and when there were no Layer 2 nodes that could provide the complete off-chain state, users could deploy a full node themselves. This full node could obtain all the historical data released by the Layer 2 sorter on the mainnet, allowing users to construct the necessary Merkle proofs and safely complete the L2 asset withdrawal.
However, after EIP-4844, Layer 2 data only exists in the BLOB of Ethereum full nodes, and historical data older than 18 days will be automatically deleted. Therefore, the method mentioned above, synchronizing the mainnet to obtain the complete state tree, is no longer feasible. To obtain the complete Layer 2 state tree, users can only rely on third-party mainnet nodes that have stored all Ethereum BLOB data (which should have been automatically deleted after 18 days) or Layer 2 native nodes (which are rare). As a result, after the launch of EIP-4844, it will become very difficult for users to obtain the complete Layer 2 state tree through a completely trusted method.
To address this security vulnerability, we need a trustless storage solution with a positive economic feedback loop. Ethstorage provides a solution to this problem and has received funding from the Ethereum Foundation. This concept truly caters to and compensates for the Dencun upgrade, making it highly worthy of attention.
Ethstorage primarily extends the availability of DA BLOB in a fully decentralized manner, filling the security gap in Layer 2 after EIP-4844. Additionally, most existing Layer 2 solutions mainly focus on expanding Ethereum’s computational capabilities, i.e., increasing TPS. However, there is a growing demand for secure storage of large amounts of data on the Ethereum mainnet, especially due to the popularity of dApps such as NFTs and DeFi.
For example, the storage requirements for on-chain NFTs are significant because users not only possess tokens from NFT contracts but also own on-chain images. Ethstorage can address the issue of storing these images without the need for trust in third parties.
Lastly, Ethstorage can meet the frontend needs of decentralized dApps. Current solutions are mainly hosted by centralized servers with DNS, making websites vulnerable to censorship and other issues such as DNS hijacking, website hacking, server crashes, and so on. Ethstorage is currently in the early stage of network testing, and users who see potential in this field can try it out.
Related News:
– Understanding the ERC-404 protocol that drives the Ethereum NFT revolution from the popularity of Pandora
– Collaboration between Ethereum domain registrar leader GoDaddy and ENS leads to a 15% surge in ENS
– Franklin Templeton launches Ethereum spot ETF, embracing the crypto community with its “laser eyes,” praising SOL’s huge potential.