Introduction
The purpose of this draft proposal is to inform the Scroll DAO of a proposed protocol upgrade, and to allow projects, users, and devs to prepare in advance. There will be a call on Mar 12 to discuss this, which you can find in the governance calendar.
Executive Summary
I am Peter, a Protocol Engineer at Up Labs. We work with the Scroll Foundation to implement upgrades to the Scroll protocol.
We propose the Euclid upgrade to be considered for inclusion and execution during the April 2025 governance cycle. This is the latest upgrade since Darwin, and the biggest upgrade since Scroll launched its mainnet.
Euclid contains five main changes:
- Migration to OpenVM Prover.
- Migration to MPT state commitment.
- Optimized rollup process.
- EIP-7702 and RIP-7212 support.
- Stage-1 readiness.
These changes will result in lower fees, higher throughput, better security, better compatibility, and more advanced features that users and developers on Scroll can enjoy.
Features
The Euclid network upgrade activates the following features.
OpenVM Prover
Scroll has been among the pioneers of ZK technology through our EVM bytecode compatible halo2 zkEVM. ZK technology has continued to progress rapidly ever since, and now general-purpose RISC-V zkVMs are becoming practical. In the Euclid upgrade we are deprecating our halo2 circuits in favor of a new prover built on top of OpenVM.
The new OpenVM prover offers numerous benefits: Prover code is easier to reason about and to audit. We can better reuse code among different components. We can also reduce proving costs and latency. Finally, the new prover will enable us to prove arbitrarily complex transactions, allowing us to remove the circuit capacity checker module that has been a major bottleneck on sequencer throughput.
MPT State Commitment
Scroll currently uses a zk-friendly state commitment data structure called zktrie. With the new OpenVM prover, it is now practical to prove Ethereum’s state structure: the Merkle-Patricia Trie, also known as MPT. Scroll is now deprecating the zktrie and adopting MPT.
MPT unlocks better sequencer performance and offers better compatibility for dapps relying on L2 state proofs.
Optimized Rollup Process
In Euclid, we are rolling out a series of optimizations to the rollup process. These result in major reductions in Data Availability (DA) overhead, and ultimately lower fees for users. The main optimizations are:
- Move blob verification from contract code to zk circuits.
- Amortize message queue commitment cost.
- Move L2 block header data from calldata to blobs.
- Commit multiple blobs in a single transaction.
These changes combined are estimated to reduce batch commitment costs by up to 90%.
In addition, Scroll L2 nodes will deprecate Clique (the current Proof-of-Authority consensus) and will start reading the authorized L2 block signer from the new system config contract on L1.
Powerful Smart Accounts
In Euclid, Scroll is adopting EIP-7702 and RIP-7212. Adopting 7702 in parallel with Ethereum’s Pectra upgrade ensures that Scroll maintains a high degree of compatibility with Ethereum. These features will also allow Scroll users and developers to tap into the latest technologies in smart accounts: Users can add smart contract functionalities to their existing accounts, use passkeys for signing authorizations, and benefit from the emerging UX improvements that these new standards enable.
Stage-1
In Euclid, we are rolling out important safety guarantees that will allow Scroll to reach Stage-1 based on the standard defined by L2BEAT.
- Enforced transaction inclusion is a censorship resistance mechanism. It allows users to enqueue a transaction directly from Ethereum, forcing the sequencer to include it.
- Permissionless batch submission is a mechanism to prevent liveness failure. In the unlikely scenario that the Scroll sequencer stops posting or finalizing batches for an extended period of time, this mechanism allows anyone to step up and start posting and finalizing batches.
Both mechanisms force the Scroll sequencer to do its job. As such, they serve as deterrents, and they offer important safety guarantees to the users.
We have also recently transferred control to the Security Council, an independent body of 12 reputable members, forming a 9/12 multisig. The Euclid upgrade will be the first upgrade to be executed by the Security Council.
Upgrade Process
Euclid will be the first upgrade that goes through the Scroll DAO governance process. This document is an early draft; the official governance proposal will be submitted at the end of March. If the proposal passes, the upgrade will be rolled out in 2 phases:
- Euclid phase-1 consists of the OpenVM Migration and MPT Migration features. It is expected to take place a few days after the governance process has concluded. The Security Council will execute the contract upgrade, and verify a non-standard state transition from zktrie state root to MPT state root. After this, Scroll will continue to operate as before, but finalization will happen using the new OpenVM-based zk provers.
- Euclid phase-2 consists of Optimized Rollup Process, Smart Accounts, and Stage-1. It is expected to take place one week after phase-1. The Security Council will execute the contract upgrade. After this, users can start enjoying lower fees and better AA support.
Security Considerations
We are conducting security audits and extensive tests. We will share more information in the official governance proposal.
Impact on Users
Euclid will bring numerous benefits to Scroll users:
- DA costs will be reduced by 80% or more.
- Peak throughput will be improved by 4x or more.
- Users can enjoy new wallet features that are unlocked by the smart account standards.
- Users will have robust security guarantees through Stage-1 readiness.
However, users should expect a slightly degraded experience during the upgrade. This will last between a few hours and one day, and will entail the following:
- During phase-1, batch finalization is expected to be delayed by several hours. Users should expect increased withdrawal times.
- During phase-2, Scroll will migrate to a new message queue contract. As a result, we expect slightly increased delays when depositing funds to Scroll.
Impact on Node Operators
For Euclid phase-1 (MPT Migration), node operators should migrate to the new MPT version of l2geth. This requires a full resync (from network or from snapshot).
- Scroll Sepolia node release: Release scroll-v5.8.23 · scroll-tech/go-ethereum · GitHub
- Scroll Sepolia node operator guidelines.
- Mainnet release and node snapshots will be shared later.
Zktrie nodes will continue to operate, but they will stop verifying state roots on the received block headers. We encourage node operators to migrate to mpt nodes shortly before Euclid.
In addition, node operators need to be aware of stage-1 (permissionless batches). While this mechanism will most likely not be triggered in practice, if it is, it will require manual steps to recover the nodes. We will provide detailed documentation about this later.
Impact on Indexers and Dapps
Projects that need guidance to prepare for Euclid are encouraged to open a ticket on Discord with their questions.
See an up-to-date version of these notes on this page.
During Euclid phase-1, we switch to a new state commitment data structure. Any dapp on Scroll that relies on zktrie proofs must migrate to MPT proofs. The batch versions used in phase-1 will be v5 and v6 (identical format to the previous v4 batches).
Euclid phase-2 brings major changes to how we commit batches.
-
Batch headers and blob payload will use a new encoding. The batch versions used in phase-2 will be v7.
-
Commit batch calldata will no longer contain block headers. Projects that need this information from L1 must fetch and decode the blob.
-
Previously, one
CommitBatch
event would correspond to one commit transaction that carried a single blob. After Euclid phase-2, a single commit transaction can carry multiple batches. This means that indexers should be able to process multiple batches from the same L1 transaction. We maintain the 1 batch = 1 blob semantics and emit aCommitBatch
event for each batch. -
In permissionless batch mode, the batch submitter commits and finalizes a single batch in a single atomic step through the newly added
commitAndFinalizeBatch
function. While this will be rare in practice, indexers should prepare to handle this case. -
Function signatures will change for commit, finalize, and revert batch. Projects that decode transaction calldata should add support for the new signatures. See the contract changes for the detailed function signatures.
Pre-Euclid-phase-2:
commitBatchWithBlobProof
,finalizeBundleWithProof
,revertBatch
Post-Euclid-phase-2:
commitBatches
,finalizeBundlePostEuclidV2
,commitAndFinalizeBatch
,revertBatch
(new). -
The
committedBatches
array in theScrollChain
will become sparse: Only the last batch hash from each commit batch transaction will be stored in the contract state. -
We will migrate to a new message queue contract (
L1MessageQueueV2
) that will store messages by a different (rolling) hash.
In addition, L2 unsafe blocks will no longer include a signature or vanity tag in the ExtraData
field.
Resources
-
Contract changes (subject to changes based on audit results):
-
DA codec (for batch header and blob encoding): GitHub - scroll-tech/da-codec: scroll's DA encoding/decoding libraries