Understanding Transactions on the Scroll Network

·

Transactions are fundamental to any blockchain, acting as cryptographically signed instructions that initiate a change in the network's state. On Scroll, a zk-rollup designed for scaling Ethereum, a transaction can range from a simple transfer of assets to a complex smart contract interaction. This guide provides a comprehensive overview of how transactions function within the Scroll ecosystem, detailing their types, life cycle, and underlying batching mechanics.

Core Transaction Types on Scroll

Scroll currently supports three distinct types of transactions, each serving a specific purpose within its architecture.

It is important to note that Scroll does not currently support EIP-2930 (Access Lists) or EIP-1559 (dynamic fee market) transaction types. However, the network plans to reintroduce support for these in a future update.

The L1 Message Transaction Explained

The L1MessageTx is a critical innovation for cross-domain communication. When a user initiates an action on an L1 Scroll bridge contract, a message is placed in the L1MessageQueue. The Scroll sequencer then picks up this message and creates a corresponding L1MessageTx to be included in an L2 block.

A key characteristic of this transaction type is that it lacks a signature. The user's authorization was already implicitly verified when the original transaction was submitted and validated on the L1 blockchain.

The structure of an L1MessageTx is defined as follows:

This transaction type is RLP-encoded according to EIP-2718 rules: TransactionType || TransactionPayload, where the type is 0x7E.

Notable behaviors of L1MessageTx:

The Journey of a Scroll Transaction

Every transaction on the Scroll network progresses through three distinct phases before it is considered an immutable part of the chain's history.

  1. Confirmed: A transaction reaches the Confirmed state once it has been executed and included in a new L2 block. This provides users with initial execution certainty on L2.
  2. Committed: Next, the L2 blocks containing the transaction are grouped into a batch. The data for this batch is then submitted to Ethereum L1 via a commit transaction. Once this commit transaction is finalized on L1, the transaction's status becomes Committed. At this point, the transaction data is publicly available on Ethereum, allowing anyone to reconstruct the L2 state.
  3. Finalized: The final stage involves generating a validity proof for the batched transactions. This cryptographic proof is verified on the L1 Scroll contract through a finalize transaction. Once this verification is successful and the finalize transaction is confirmed, the transaction status changes to Finalized. It is now a canonical and trustless part of the Scroll L2 chain.

How to Submit a Transaction

Users and smart contracts can interact with Scroll through two primary entry points.

The first method is to submit a transaction directly to an L2 sequencer. This is the standard method for most L2-native actions and requires users to simply configure their wallet (like MetaMask) to connect to a Scroll RPC endpoint.

The second method is to initiate a transaction from Ethereum L1. The Scroll L1 bridge contracts provide three main gateways for this:

All messages sent via these L1 gateways are appended to the L1MessageQueue, from which the sequencer processes them into L2 blocks.

The Commit and Finalize Process

The rollup node plays a crucial role in the transaction life cycle. It packs confirmed L2 blocks into chunks and batches. Periodically, it submits a commit transaction to L1, posting the data of an entire batch to the ScrollChain contract. This action moves all transactions in that batch to the Committed state.

Subsequently, after a validity proof is generated for the batch, the rollup node submits a finalize transaction. This transaction includes the proof and the new state root for on-chain verification. Its success transitions the batch's transactions to the Finalized state, providing strong, math-backed finality.

How Scroll Batches Transactions for Efficiency

To optimize gas costs and proof verification on Ethereum, Scroll employs a sophisticated multi-tier batching schema.

  1. Blocks: Individual transactions are ordered and packaged into L2 blocks.
  2. Chunks: A series of contiguous blocks are grouped into a chunk. The chunk is the fundamental unit for generating zero-knowledge proofs in the zkEVM circuit.
  3. Batches: Multiple contiguous chunks are grouped into a batch. The batch is the base unit for both data commitment (via the commit transaction) and proof verification (via the finalize transaction) on L1. The proof for a batch is an aggregation of all the proofs from its constituent chunks.

This hierarchical approach allows Scroll to amortize the fixed cost of L1 operations over a large number of L2 transactions, significantly reducing the overall cost per transaction and enhancing scalability. Upon chunk creation, a proving task is sent to a prover. When a batch is created, its data is committed to L1, and an aggregator prover begins the task of creating a single, aggregated validity proof for the entire batch.

Frequently Asked Questions

What is the main difference between a confirmed and a finalized transaction?
A confirmed transaction has been included in an L2 block and provides fast, pre-confirmation. A finalized transaction has had its validity cryptographically proven and verified on Ethereum L1, offering the highest level of security and finality equivalent to Ethereum itself.

Can I cancel a transaction after I submit it to Scroll?
Once a transaction is submitted to the network and included in a block, it cannot be canceled. For transactions stuck in a pending state (e.g., due to low gas), users can sometimes attempt to replace them by submitting a new transaction with the same nonce and a higher gas price.

Why are some transaction types like EIP-1559 not supported yet?
Scroll prioritizes security and stability. As a new zk-rollup, it launched with a core set of robust features. Support for more advanced transaction types like EIP-1559 is on the roadmap and will be integrated after thorough testing to ensure a seamless user experience.

How long does it take for a transaction to finalize?
The time to finality can vary. While confirmation on L2 is nearly instantaneous, finalization depends on the time it takes to generate the validity proof and for the finalize transaction to be processed on Ethereum, which is influenced by L1 network congestion.

Do I need to do anything special to send a transaction from L1 to L2?
Yes, you must interact with the correct Scroll bridge contracts on Ethereum L1. You cannot send funds directly to an L2 address from an L1 wallet; you must use the official bridge interfaces or supported third-party bridges. To 👉 view the real-time bridge interface, check the official Scroll documentation for the most up-to-date links and guides.