Skip to main content

Scroll

Key Takeaways

  • Scroll is a layer-2 blockchain protocol that offers scaling solutions for the Ethereum mainnet.
  • It uses a zero-knowledge proof system and allows miners to generate proofs for them.
  • Scroll connects to the Ethereum mainnet through the Rollup and Bridge smart contracts, ensuring data availability for layer-2 transactions and allowing users to pass assets and messages between layer-1 and layer-2.

1. Overview


Scroll is a layer-2 blockchain protocol that offers scaling solutions for the Ethereum mainnet. Its aim is to create a zk-rollup ecosystem that can make blockchains accessible to billions of users. Scroll processes transactions off-chain and posts succinct proofs of correctness on-chain, resulting in higher throughput and lower costs compared to the Ethereum Virtual Machine (EVM). Here are some key features of Scroll:

  • zkEVM: Scroll provides a native zkEVM layer-2 solution that closely mimics the Ethereum Virtual Machine. It uses a new hierarchical zero-knowledge proof system and allows miners to generate proofs for them.
  • Node: The Scroll node is the primary way for applications and users to interact with Scroll. It consists of three modules: the Sequencer, Coordinator, and Relayer.
  • Rollup and Bridge smart contracts: Scroll connects to the base layer of Ethereum through the Rollup and Bridge smart contracts, ensuring data availability for layer-2 transactions and allowing users to pass assets and messages between layer-1 and layer-2.

Overall, Scroll is an open-source, community-driven entity modeled after Ethereum itself. It is taking a longer road by building "at the bytecode level" to "behave exactly like" the Ethereum Virtual Machine.

The current architecture consists of three infrastructure components

  • Scroll Node: Constructs L2 blocks from user transactions, commits them to the Ethereum base layer, and passes messages between L1 and L2.
  • Roller Network: Generates the zkEVM validity proofs to prove that transactions are executed correctly.
  • Rollup and Bridge Contracts: Provides data availability for Scroll transactions, verifies zkEVM validity proofs, and allows users to move assets between Ethereum and Scroll.

2. Execution


Interactions between users or applications and Scroll are mainly handled through the Scroll node, which consists of the Sequencer, Coordinator, and Relayer modules.

Users or applications send L2 transactions to the Sequencer using its JSON-RPC interface. Every few seconds, the Sequencer retrieves a group of transactions from the L2 mempool and processes them, creating a new L2 block and a new state root. This process is based on Go-Ethereum (Geth), which is a widely-used Ethereum node implementation.

Once the newly generated block is created, it notifies the Coordinator module. The Coordinator then receives the execution trace of the new block from the Sequencer and sends the execution trace to a Roller randomly selected from the roller pool to create a proof.

Meanwhile, the Relayer module continuously monitors the bridge and rollup contracts deployed on both Ethereum and Scroll. The Relayer has two main responsibilities: it observes the rollup contract to keep track of the status of L2 blocks, including their data availability and validity proof, and it monitors deposit and withdrawal events from the bridge contracts deployed on both Ethereum and Scroll, relaying messages between the two.

(Source: Scroll’s Architecture Overview)

3. Settlement


The Rollers act as provers in the network and are responsible for generating validity proofs for the zkRollup. Rollers are expected to use accelerators such as GPUs, FPGAs, and ASICs to reduce proving time and cost. Figure 2 illustrates how a Roller generates a validity proof for each block. The process consists of the following steps:

  • A Roller first converts the execution trace received from the Coordinator into circuit witnesses.
  • It generates proofs for each of the zkEVM circuits.
  • Finally, it uses proof aggregation to combine proofs from multiple zkEVM circuits into a single block proof.

https://github.com/scroll-tech/scroll-prover

4. Data Availability


To ensure that data for Scroll blocks is always available, the Sequencer sends transaction data to the Rollup contract as calldata, along with state roots and commitments to the transaction data. After receiving the L2 state roots and blocks from the Sequencer, the Rollup contract stores them in the Ethereum state as Ethereum calldata, making use of Ethereum's security. This allows indexers such as the Scroll Relayer to rebuild L2 blocks with ease.

5. Team


6. Resources


CTRL + J