This repository is a modular Rust workspace for the Scroll rollup node. It is designed for extensibility, maintainability, and ease of contribution. It consists of multiple internal crates (libraries) and a main binary crate, organized for clear separation of concerns and reusability.
.
├── book/ # mdBook documentation (published to GitHub Pages)
├── crates/ # Internal library crates
│ ├── node/ # Main binary crate (the node)
│ ├── codec/
│ ├── database/
│ │ ├── db/
│ │ └── migration/
│ ├── derivation-pipeline/
│ ├── engine/
│ ├── chain-orchestrator/
│ ├── l1/
│ ├── network/
│ ├── primitives/
│ ├── providers/
│ ├── scroll-wire/
│ ├── signer/
│ ├── sequencer/
│ └── watcher/
├── sequencer-migration/ # Migration tooling from l2geth to l2reth
├── tests/ # Integration tests
├── Cargo.toml # Workspace manifest
└── ...
- crates/node/: The main binary crate. This is the entry point for running the rollup node.
- crates/codec/: Implements encoding/decoding logic for rollup data and payloads.
- crates/database/db/: Database abstraction and storage logic for batches, blocks, and messages.
- crates/database/migration/: Database schema migrations using SeaORM.
- crates/derivation-pipeline/: Stateless pipeline for transforming batches into block-building payloads.
- crates/engine/: Core engine logic for block execution, fork choice, and payload management.
- crates/chain-orchestrator/: Responsible for orchestrating the L2 chain based on events from L1 and data gossiped over the P2P network.
- crates/l1/: Primitives and ABI bindings for L1 contracts and messages.
- crates/network/: P2P networking stack for node communication.
- crates/node/: Node manager and orchestration logic.
- crates/primitives/: Shared primitive types (blocks, batches, attributes, etc.).
- crates/providers/: Abstractions for data providers (L1, beacon, block, etc.).
- crates/signer/: Implements signing logic for blocks.
- crates/scroll-wire/: Wire protocol definitions for Scroll-specific networking.
- crates/sequencer/: Sequencer logic for ordering and batching transactions.
- crates/watcher/: Monitors L1 chain state and handles reorgs and notifications.
- book/: mdBook documentation published to https://scroll-tech.github.io/rollup-node/
- tests/: Integration tests for the rollup node, including E2E and sequencer migration tests
- sequencer-migration/: Scripts and tooling for migrating from l2geth to rollup-node (l2reth)
Ensure you have Rust installed.
To build the main binary:
cargo build --bin rollup-nodeOr, from the binary crate directory:
cd crates/node
cargo buildFor comprehensive instructions on running a node, including:
- Hardware requirements
- Configuration options
- Example configurations for mainnet and sepolia
- Logging and debugging
- Troubleshooting
Please refer to the official documentation: https://scroll-tech.github.io/rollup-node/
To run all tests across the workspace:
make testTo test a specific crate:
cargo test -p <crate-name>To run all lints across the workspace:
make lintFor optimized production builds:
cargo build --release --bin rollup-nodeThe release binary will be located at target/release/rollup-node.
- Official Documentation Book - Comprehensive guide for running follower and sequencer nodes
- Sequencer Migration Guide - Documentation for migrating from l2geth to rollup-node
- Fork and clone the repository.
- Use
make prto ensure code quality. - Submit pull requests with clear descriptions.
- See each crate's README or source for more details on its purpose and usage.
For more details, see the documentation in each crate or open an issue if you have questions!