How Scroll's Blockchain Architecture and ZK-Rollups Work

·

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:

Sequencing Layer

This layer includes centralized nodes responsible for transaction sequencing:

Proving Layer

A decentralized network that validates transaction correctness:

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

  1. Users submit transactions through the L1 bridge or directly to L2.
  2. The Sync Service module monitors the Bridge Contract for new L1 transactions, converting them into L1MessageTx format and queuing them locally.
  3. 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

  1. The Rollup Node tracks new L2 blocks and extracts their transaction data.
  2. The Chunk/Batch Proposer groups transactions into chunks (for proof generation) or batches (for L1 submission) and stores them in a database.
  3. The Relayer sends a commit transaction to the Rollup Contract, ensuring data availability by preliminarily fixing the data on L1.

Proof Generation and Finalization

  1. 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.
  2. Upon receiving proofs, the Coordinator records them in the database.
  3. 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:

Transaction Batching Hierarchy

Scroll groups transactions at multiple levels for efficiency:

  1. Blocks: Ordered sets of transactions.
  2. Chunks: Groups of adjacent blocks, serving as the unit for zkEVM proof generation.
  3. 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

Cons

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.