The Cancun upgrade is coming. What adaptations have mainstream L2s made?

TL;DR:

  • The Cancun upgrade will be launched on March 13, 2024, and EIP4844 will be online soon. Danksharding is the core of the Ethereum roadmap, and this upgrade is the first step to implement Danksharding.
  • After Ethereum L2 adapts to EIP4844, transaction fees have dropped significantly, and L2’s TPS has doubled. **Users will feel that transactions are faster, cheaper, experience smoother, and more responsive. There will be more complex and larger Dapp applications on these L2s. **
  • Optimistic rollups are easier to adapt to EIP4844, while ZK rollups are more complex to adapt**. Ethereum does not have a precompiled contract to support BLS12-381 elliptic curves, which makes some ZKP verification difficult and hinders the progress of ZK rollups adapting to EIP4844. **
  • The problem of elliptic curves can be solved in two ways, 1. Wait for Ethereum to precompile BLS12-381 elliptic curves; 2. Use another proof method to achieve the same purpose, use BN254 supported by Ethereum precompilation .
  • Currently, Arbitrum, Optimistic, Starknet, zkSync, Scroll, Polygon zkEVM and new L2 Morph are all adapting to EIP4844. Among them, Arbitrum, Optimistic and Starknet stated that they will implement EIP4844 adaptation after the Cancun upgrade. Morph took the lead in releasing the innovative zkSNARK zkEVM adaptation solution, which will be the first zkSNARK zkEVM to adapt to EIP4844

1. Background

In 2020, Ethereum released the "Rollup-centered Ethereum Roadmap", and the final picture of Ethereum described in "Endgame" published by Vitalik the following year, ** determined the big picture of Ethereum. Direction: Optimize the construction of the basic layer of Ethereum to serve Rollup. **

Ethereum designed Danksharding’s sharding technology to improve Ethereum’s usability as a data availability layer. It will significantly reduce L2’s transaction fees, increase Rollup’s TPS, and achieve a substantial expansion of Ethereum.

The Cancun upgrade is coming, what adaptations have the mainstream L2s made?

Until this year, the Ethereum Cancun-Dencun upgrade was finally launched on March 13, 2024, and EIP4844 is about to go online. This hard fork can be said to be the first step in Ethereum's implementation of Danksharding. The core of the roadmap. **

Regarding what is the DA layer, the technical principles of Danksharding, and the content of EIP4844, please refer to a technical article I wrote last year: DA (Data Availability) Summer is coming?

**2. How will the Cancun upgrade benefit L2? **

EIP4844 introduces a new transaction type called blob-carrying transactions**. **Each blob-carrying transaction can "carry" a list of blobs. A blob is a packet of data, approximately 125 KB. Blobs are stored for a short period of time, only 4096 epochs, which is a little more than 18 days.

  • The Cancun upgrade is coming, what adaptations have the mainstream L2s made? L2 transaction fees have dropped significantly. Since Blobs do not require permanent storage, Blobs are larger and cheaper than block space. Blob can store 10 times more data than Calldata at the same gas consumption. Rollup adapted to EIP4844 can store transaction data in Blobs, reducing transaction fees by an order of magnitude.
  • The TPS of L2 is doubled. The current target is 3 blobs per block, with a maximum of 6 blobs allowed. Blocks are only 90KB, and each blob is about 125KB. The introduction of Blob is equivalent to expanding the space several times of the block to store Rollup data, so the TPS of Rollup can also be doubled. And "On Increasing the Block Gas Limit" written by Toni and Vitalic stated that by increasing the block Gas limit and the price of non-zero Calldata bytes, a smaller block size with fewer variables will be achieved, so that more can be added in the future. Blob. The more blobs, the greater the storage space.

For end users, after **EthereumL2 is adapted to EIP4844, the transaction speed will be faster, the cost will be lower, the experience will be smoother, and the response will be more responsive. There will be more complex and larger Dapp applications on these L2s. **

3. How does L2 adapt to EIP4844?

How does L2 adapt to EIP4844? We need to discuss Optimistic Rollup and ZK Rollup separately.

Optimistic Rollups adapts to EIP4844

Optimistic rollup uses fraud proof to ensure the correctness of rollup execution. That is, the node first chooses to believe that the state transition is correct. Unless someone initiates a fraud certificate within a specified period of time to prove that the previously submitted state transition is illegal, the state transition will be revoked.

The Cancun upgrade is coming, what adaptations have the mainstream L2s made?

Optimistic rollup is simpler to adapt to EIP4844 than ZK rollup. Submit all L2 transactions to L1 through Blob-carrying transactions to complete the adaptation. In addition, the fraud proof needs to be adjusted to adapt to EIP4844. This part can be done slowly. After all, many optimistic rollups have not yet launched fraud proofs. I put a fraud certificate online, but found that no fraud certificate had been submitted for more than two years.

L2 transaction submission: When the Rollup is submitted, the Blob-carrying transaction is used to store the Rollup data in the Blob. The payload of the Blob-carrying transaction is rlp([tx_payload_body, blobs, commitments, proofs]), where

  • tx_payload_body- is the TransactionPayloadBody of the standard EIP-2718 blob transaction.
  • blobs - List of blobs. A transaction can contain up to two blobs.
  • commitments - List of KZG commitments for the blob.
  • proofs- Blob and list of proofs corresponding to KZG commitment. This proof will be verified by the ETH node.

Adjustment for fraud proof:

  • First, the prover and challenger need multiple rounds of interaction to find the dispute point.
  • Then submit the disputed point to L1 for judgment. To adapt to EIP4844, it may be necessary to prove that the data at issue is stored on a certain Blob.
  • Since Blob data will be deleted after about 18 days, the challenge period must be before it is deleted, which is satisfied by current optimistic rollups. Generally, the challenge period does not exceed 7 days.

ZK Rollups adapts to EIP4844

ZK rollup uses ZKP to prove that the L2 state transition is correct. ZK rollup adaptation to EIP4844 is more complicated than optimistic rollup.

The Cancun upgrade is coming, what adaptations have the mainstream L2s made?

  1. L2 transaction submission: This step of Optimistic Rollup is similar.
  2. **ZK proof submission: Compared with the ZK Rollup before adaptation, in addition to the ZKP proof of state transition, one more proof process is required. That is to say, it is proved that the blob commitment and the transaction batch are corresponding, thus ensuring that the input of the state transition proof is correct. **
  3. For example: the ZK circuit of state transition can generate a proof of the calculation process a + a = b. The ZKP generated when (a=1,b=2) and (a=2,b=4) is legal. Therefore, I also need to provide a proof that the input I provided at that time was (a=1,b=2) instead of (a=2,b=4).
  4. This does not need to be done before adapting to EIP4844, because the data is directly stored in Calldata and can be read directly, ensuring that the input will not be adjusted. After using EIP4844, the Blob data cannot be read directly, and this can only be proven through a new circuit.
  5. It is easier to implement this proof mechanism using STARK’s ZK rollup (such as Starknet). This is a challenge for ZK rollup using SNARK. The reason is: **The elliptic curve used by EIP4844's blob commitment is BLS12-381, while the ETH precompiled contract only supports BN254. Due to the different curves, it is difficult for us to directly Verify blob commitment completion proof in the smart contract. **
  6. **ZkEVM/zkVM using SNARK needs to solve the problem mentioned in point 2 that ZK proof cannot be generated due to curve mismatch. **
  • Waiting for Ethereum to support BLS12-381 precompiled contracts. This will be long.
  • Use another method of proof to prove. To design new circuits, you must use the BN254 elliptic curve supported by the precompiled contract. Currently, we see Morph taking this approach. This also makes Morph the first zkEVM to complete EIP4844 adaptation.

Morph’s EIP-4844 zkEVM integrated solution, please see:

**4. Which L2s are adapted to EIP4844? **

In the Optimistic rollup, Optimism and Arbitrum have expressed their commitment to adopting EIP-4844 and are working closely with their communities to test and deploy the necessary updates. Arbitrum is a Stage 1 rollup and has relatively good security. It involves the need to adapt fraud proof to EIP4844. Optimistic rollup is a Stage 0 rollup. There is currently no fraud proof. It is easier to adapt, but the security is not high enough.

In ZK rollup, the difficulty of rollup adaptation using STRAK and SNARK is different. It is easier to adapt EIP4844 with STARK's rollup, and Starknet is one of the representatives. Starknet published an article stating that Cancun will implement EIP4844 adaptation after the upgrade (article link). Using SNARK's rollup, zkSync is also exploring how to leverage blob-carrying transactions to further reduce costs and improve performance. Scroll published an article last year introducing the idea of adapting EIP4844 (article link)

The most impressive one is Morph, which is an Optimistic ZK Rollup and was the first to release a solution for adapting zkEVM to EIP4844. **It can be said to be the first zkEVM Rollup to complete EIP4844. **

Optimistic ZK Rollup combines the advantages of both types of Rollup. It optimistically believes in the execution results submitted by Sequencer and allows those who doubt the results to initiate challenges. Only when a challenge is issued, the prover will generate ZKP to prove the correctness of the execution results. **It has the efficiency of Optimistic rollup and the ZK-proven reliability of ZK rollup. **

View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 1
  • Repost
  • Share
Comment
0/400
Spidermanvip
· 2024-03-14 14:56
Stud All in 🙌
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)