Scroll is a Layer 2 (L2) blockchain solution engineered to scale Ethereum using ZK-Rollups—zero-knowledge proof-based rollups. This technology processes transactions off the main Ethereum chain (L1) and only submits cryptographic proofs along with compressed data to L1, enhancing scalability and reducing costs while maintaining security.
Developed in collaboration with the Ethereum Foundation's Privacy and Scaling Explorations group, Scroll combines a centralized sequencing node (handling execution and rollup tasks) with a decentralized proving network. This article explores its technical architecture, workflow, and key components.
Core Technical Principles
Scroll's design is rooted in zero-knowledge proofs (ZKPs), which allow one party to prove to another that a statement is true without revealing any underlying information. This principle is crucial for creating efficient, scalable rollups that maintain Ethereum's security guarantees.
The blockchain leverages zkEVM (zero-knowledge Ethereum Virtual Machine) compatibility, meaning it supports Ethereum-native smart contracts and development tools while operating as a Layer 2. This compatibility reduces the learning curve for developers and simplifies migration from L1.
Scroll's Architectural Layers
Scroll's architecture is structured into three primary layers: Settlement, Sequencing, and Proving. Each plays a distinct role in ensuring secure, efficient transaction processing.
Settlement Layer
Residing on Ethereum L1, this layer comprises two smart contracts:
- Bridge Contract: Facilitates the transfer of assets, messages, and transactions between L1 and L2. Users and dApps can move data bidirectionally through this bridge.
- Rollup Contract: Verifies batches of transactions from L2, ensures data availability (making transaction data accessible to all network participants), and establishes the canonical order of transactions to prevent fraud like double-spending.
Sequencing Layer
This layer includes centralized nodes responsible for transaction sequencing:
- Execution Node: Currently centralized, this node verifies and executes transactions from users via L2 or the L1 bridge. It constructs L2 blocks from these transactions.
- Rollup Node: Bundles transactions into batches, publishes transaction data to Ethereum for availability, and submits proofs to L1 for final confirmation.
Proving Layer
A decentralized network that validates transaction correctness:
- Provers: A pool of validators generating zkEVM validity proofs to confirm L2 transaction accuracy.
- Coordinator: Assigns verification tasks to random provers and relays proofs to the Rollup Node for L1 finalization.
The Rollup Process Explained
Scroll's rollup mechanism involves three stages: execution, batching, and proof generation. Here's a step-by-step breakdown:
Transactions Are Executed in the Execution Node
- Users submit transactions through the L1 bridge or directly to L2.
- The Sync Service module monitors the Bridge Contract for new L1 transactions, converting them into L1MessageTx format and queuing them locally.
- The Executor module processes transactions from both the L1 queue and the L2 Mempool, executing them to form new L2 blocks.
Transactions Are Packaged and Fixed in L1
- The Rollup Node tracks new L2 blocks and extracts their transaction data.
- The Chunk/Batch Proposer groups transactions into chunks (for proof generation) or batches (for L1 submission) and stores them in a database.
- The Relayer sends a commit transaction to the Rollup Contract, ensuring data availability by preliminarily fixing the data on L1.
Proof Generation and Finalization
The Coordinator retrieves new chunks or batches from the database:
- For chunks, it requests execution traces from the Execution Node and assigns proof generation to a random prover.
- For batches, it collects chunk proofs and assigns batch verification to an aggregator-prover.
- Upon receiving proofs, the Coordinator records them in the database.
- The Relayer sends a finalize transaction to the Rollup Contract for proof verification, finalizing the transactions on L1.
👉 Explore more Layer 2 strategies
Transaction Life Cycle
Scroll transactions progress through three states:
- Confirmed: The transaction is executed and included in an L2 block.
- Committed: Transaction data is published on Ethereum, ensuring data availability without correctness proof.
- Finalized: A validity proof is verified by the Rollup Contract, making the transaction immutable and final.
Transaction Batching Hierarchy
Scroll groups transactions at multiple levels for efficiency:
- Blocks: Ordered sets of transactions.
- Chunks: Groups of adjacent blocks, serving as the unit for zkEVM proof generation.
- Batches: Groups of adjacent chunks, used for L1 data fixation and proof verification. Batch proofs aggregate all chunk proofs within it.
zkEVM Compatibility and Development
Scroll's zkEVM is highly compatible with Ethereum's EVM, allowing developers to use familiar tools like Foundry, Hardhat, and MetaMask. However, minor differences exist in precompiled contracts and supported EIPs, requiring thorough testing within Scroll's environment.
Infrastructure and Ecosystem
Scroll's ecosystem is expanding rapidly, encompassing bridges, DeFi protocols, and infrastructure tools. This growth supports a vibrant environment for dApps and users, fostering innovation and adoption.
Advantages and Limitations
Pros
- Full EVM compatibility for smart contracts and tools.
- Support for standard Web3 APIs and wallets.
- Fast transaction confirmation on L2 and eventual finality on L1.
- Lower transaction fees compared to L1.
- A rapidly developing ecosystem.
Cons
- Requires additional testing due to minor EVM deviations.
- Centralized sequencers during early development.
- Ongoing changes necessitate monitoring for deployed contracts.
Frequently Asked Questions
What is Scroll's primary purpose?
Scroll enhances Ethereum's scalability by processing transactions off-chain using ZK-Rollups, reducing costs and congestion while maintaining security through cryptographic proofs.
How does Scroll ensure transaction security?
Transactions are verified by decentralized provers using zero-knowledge proofs, and data is anchored to Ethereum L1, leveraging its security model for finality.
Can I use Ethereum tools with Scroll?
Yes, Scroll supports popular Ethereum development frameworks, wallets, and APIs, making it accessible for existing developers.
What is the difference between committed and finalized transactions?
Committed transactions have data published on L1 for availability, while finalized transactions have validity proofs verified on L1, ensuring correctness and immutability.
How decentralized is Scroll?
While the proving network is decentralized, sequencing is currently centralized. Future versions aim to decentralize all components.
Where can I find Scroll's ecosystem projects?
Scroll's ecosystem includes various DeFi and infrastructure projects, listed on their official website for exploration.
👉 Get advanced blockchain insights
Conclusion
Scroll represents a promising approach to Ethereum scaling, balancing EVM compatibility with innovative ZK-Rollup technology. Its architecture ensures security, efficiency, and developer familiarity, positioning it as a strong contender in the Layer 2 landscape. As the network evolves, further decentralization and ecosystem growth are expected to enhance its robustness and utility.