Introduction
Scroll is a Layer 2 (L2) blockchain solution designed to scale Ethereum using ZK-Rollups (Zero-Knowledge Rollups). Developed in collaboration with the Ethereum Foundation's Privacy and Scaling Explorations group, Scroll bundles transactions off-chain and submits cryptographic proofs to Ethereum (L1), ensuring security while reducing costs and congestion.
This guide explores Scroll’s architecture, workflow, and key components, including:
- Centralized sequencing nodes (Execution Node, Rollup Node).
- Decentralized proving networks (Roller Net).
- The rollup process and transaction lifecycle.
Core Technical Principles
Scroll’s design is influenced by Ethereum’s scalability challenges and ZKP (Zero-Knowledge Proof) advancements. Key principles include:
- EVM Compatibility: Supports existing Ethereum smart contracts with minor adjustments.
- Data Availability: All transaction data is stored on L1 for transparency.
- Decentralized Proving: Proofs are generated by a network of validators (Provers).
Architecture Overview
Scroll’s architecture comprises four layers:
1. Settlement Layer (L1 Ethereum)
- Bridge Contract: Facilitates asset/message transfers between L1 and L2.
Rollup Contract:
- Verifies transaction batches.
- Ensures data availability.
- Orders transactions for the canonical chain.
2. Sequencing Layer
Execution Node:
- Processes L2 transactions.
- Creates L2 blocks.
Rollup Node:
- Bundles transactions into batches.
- Submits data and proofs to L1.
3. Proving Layer
- Provers: Generate ZK proofs for transaction validity.
- Coordinator: Assigns proof tasks to Provers randomly.
4. Rollup Process
- Execution: Transactions are processed into L2 blocks.
- Batching: Blocks are grouped into chunks/batches.
- Finalization: Proofs are submitted to L1 for verification.
Rollup Workflow
Stage 1: Transaction Execution
- Users submit transactions via L1 Bridge or L2 mempool.
- Sync Service (Execution Node) retrieves L1 transactions.
- The Executor creates L2 blocks.
Stage 2: Batch Creation
- Rollup Node extracts L2 block data.
- Chunk/Batch Proposer packages transactions.
- Relayer submits batch data to L1 (Commit phase).
Stage 3: Proof Finalization
- Coordinator requests proofs from Provers.
- Verified proofs are recorded in the database.
- Relayer submits proofs to L1 (Finalize phase).
Transaction Lifecycle
- Confirmed: Executed in L2 but not yet posted to L1.
- Committed: Data published to L1 (no validity proof).
- Finalized: Proof verified on L1.
Key Features
Pros
- EVM Compatibility: Use existing tools (Hardhat, MetaMask).
- Low Fees: Reduced gas costs vs. L1.
- Fast Transactions: Instant L2 confirmations.
Cons
- Testing Overhead: Requires L2-specific audits.
- Centralization: Sequencers are currently centralized.
FAQ
Q1: Is Scroll fully compatible with Ethereum?
A: Yes, except for minor precompiled contract differences.
Q2: How long does finalization take?
A: Typically minutes, depending on L1 congestion.
Q3: Can I deploy existing Ethereum dApps on Scroll?
A: Yes, with minor adjustments.
Conclusion
Scroll’s innovative use of ZK-Rollups positions it as a leading Ethereum scaling solution. Its EVM compatibility and growing ecosystem (see here) make it ideal for developers prioritizing low-cost, high-speed transactions.
For more on blockchain architecture, follow our Magazine.