{"id":30117347,"url":"https://github.com/scroll-tech/rollup-node","last_synced_at":"2025-08-10T10:41:51.055Z","repository":{"id":270691472,"uuid":"907490372","full_name":"scroll-tech/rollup-node","owner":"scroll-tech","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-08T16:40:31.000Z","size":3029,"stargazers_count":4,"open_issues_count":60,"forks_count":4,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-08-08T17:41:13.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scroll-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-23T17:43:35.000Z","updated_at":"2025-08-08T15:53:39.000Z","dependencies_parsed_at":"2025-01-02T12:54:01.295Z","dependency_job_id":"dbb6043c-211e-4e2c-84a4-ef106a1753d5","html_url":"https://github.com/scroll-tech/rollup-node","commit_stats":null,"previous_names":["scroll-tech/rollup-node"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/scroll-tech/rollup-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Frollup-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Frollup-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Frollup-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Frollup-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scroll-tech","download_url":"https://codeload.github.com/scroll-tech/rollup-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Frollup-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269712872,"owners_count":24463216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-10T10:41:45.779Z","updated_at":"2025-08-10T10:41:51.015Z","avatar_url":"https://github.com/scroll-tech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scroll Rollup Node Workspace\n\n[![test](https://github.com/scroll-tech/rollup-node/actions/workflows/test.yaml/badge.svg)](https://github.com/scroll-tech/rollup-node/actions/workflows/test.yaml)\n[![lint](https://github.com/scroll-tech/rollup-node/actions/workflows/lint.yaml/badge.svg)](https://github.com/scroll-tech/rollup-node/actions/workflows/lint.yaml)\n![License](https://img.shields.io/badge/license-MIT-blue)\n![Rust](https://img.shields.io/badge/rust-2021-orange)\n\n## Overview\n\nThis 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.\n\n## Directory Structure\n\n```\n.\n├── bin/\n│   └── rollup/           # Main binary crate (the node)\n│       ├── src/\n│       └── assets/\n├── crates/               # Internal library crates\n│   ├── codec/\n│   ├── database/\n│   │   ├── db/\n│   │   └── migration/\n│   ├── derivation-pipeline/\n│   ├── engine/\n│   ├── indexer/\n│   ├── l1/\n│   ├── network/\n│   ├── node/\n│   ├── primitives/\n│   ├── providers/\n│   ├── scroll-wire/\n│   ├── signer/\n│   ├── sequencer/\n│   └── watcher/\n├── Cargo.toml            # Workspace manifest\n└── ...\n```\n\n## Crate Descriptions\n\n- **bin/rollup/**: The main binary crate. This is the entry point for running the rollup node.\n- **crates/codec/**: Implements encoding/decoding logic for rollup data and payloads.\n- **crates/database/db/**: Database abstraction and storage logic for batches, blocks, and messages.\n- **crates/database/migration/**: Database schema migrations using SeaORM.\n- **crates/derivation-pipeline/**: Stateless pipeline for transforming batches into block-building payloads.\n- **crates/engine/**: Core engine logic for block execution, fork choice, and payload management.\n- **crates/indexer/**: Indexes L1 and L2 data for efficient querying and notification.\n- **crates/l1/**: Primitives and ABI bindings for L1 contracts and messages.\n- **crates/network/**: P2P networking stack for node communication.\n- **crates/node/**: Node manager and orchestration logic.\n- **crates/primitives/**: Shared primitive types (blocks, batches, attributes, etc.).\n- **crates/providers/**: Abstractions for data providers (L1, beacon, block, etc.).\n- **crates/signer/**: Implements signing logic for blocks.\n- **crates/scroll-wire/**: Wire protocol definitions for Scroll-specific networking.\n- **crates/sequencer/**: Sequencer logic for ordering and batching transactions.\n- **crates/watcher/**: Monitors L1 chain state and handles reorgs and notifications.\n\n## Building the Project\n\nEnsure you have [Rust](https://www.rust-lang.org/tools/install) installed.\n\nTo build the main binary:\n\n```sh\ncargo build --bin rollup-node\n```\n\nOr, from the binary crate directory:\n\n```sh\ncd bin/rollup\ncargo build\n```\n\n## Running the Node\n\nAfter building, run the node with:\n\n```sh\ncargo run --workspace --bin rollup-node -- [ARGS]\n```\n\nReplace `[ARGS]` with any runtime arguments you require.\n\n## Running Tests\n\nTo run all tests across the workspace:\n\n```sh\nmake test\n```\n\nTo test a specific crate:\n\n```sh\ncargo test -p \u003ccrate-name\u003e\n```\n\n## Running Lints\n\nTo run all lints across the workspace:\n\n```sh\nmake lint\n```\n\n## Building a Release Binary\n\nFor optimized production builds:\n\n```sh\ncargo build --release --bin rollup-node\n```\n\nThe release binary will be located at `target/release/rollup-node`.\n\n## Running a Sequencer Node\n\nTo run a sequencer node you should build the binary in release mode using the instructions defined above.\n\nThen, you can run the sequencer node with the following command:\n\n### Using Private Key File\n```sh\n./target/release/rollup-node node --chain dev -d --sequencer.enabled --signer.key-file /path/to/your/private.key --http --http.api admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,miner,mev\n```\n\n**Note**: The private key file should contain a hex-encoded private key (`64` characters, optionally prefixed with `0x`).\n\n### Using AWS KMS\n```sh\n./target/release/rollup-node node --chain dev -d --sequencer.enabled --signer.aws-kms-key-id arn:aws:kms:REGION:ACCOUNT:key/KEY-ID --http --http.api admin,debug,eth,net,trace,txpool,web3,rpc,reth,ots,flashbots,miner,mev\n```\n\n### Signer Configuration Notes\n\nWhen running a sequencer, a signer is required unless the `--test` flag is specified. The two signing methods are mutually exclusive - use either `--signer.key-file` or `--signer.aws-kms-key-id`, but not both.\n\n**Private Key File**: Keep your private key file secure and never commit it to version control.\n\n**AWS KMS**: Requires KMS permissions `kms:GetPublicKey` and `kms:Sign` for the specified key.\n\n### General Information\n\nThe above commands will start a dev node in sequencer mode with all rpc apis enabled. You can adjust the `--http.api` flag to include or exclude specific APIs as needed.\n\nThe chain will be configured with a genesis that funds 20 addresses derived from the mnemonic:\n```\ntest test test test test test test test test test test junk\n```\n\n### Configuration Options\n\nA list of sequencer specific configuration options can be seen below:\n\n```sh\n      --scroll-sequencer-enabled\n          Enable the scroll block sequencer\n      --scroll-block-time \u003cSCROLL_BLOCK_TIME\u003e\n          The block time for the sequencer [default: 2000]\n      --payload-building-duration \u003cPAYLOAD_BUILDING_DURATION\u003e\n          The payload building duration for the sequencer (milliseconds) [default: 500]\n      --max-l1-messages-per-block \u003cMAX_L1_MESSAGES_PER_BLOCK\u003e\n          The max L1 messages per block for the sequencer [default: 4]\n      --fee-recipient \u003cFEE_RECIPIENT\u003e\n          The fee recipient for the sequencer [default: 0x5300000000000000000000000000000000000005]\n      --signer.key-file \u003cFILE_PATH\u003e\n          Path to the hex-encoded private key file for the signer (optional 0x prefix). Mutually exclusive with AWS KMS key ID\n      --signer.aws-kms-key-id \u003cKEY_ID\u003e\n          AWS KMS Key ID or ARN for signing transactions. Mutually exclusive with key file\n```\n\n## Contributing\n\n- Fork and clone the repository.\n- Use `make pr` to ensure code quality.\n- Submit pull requests with clear descriptions.\n- See each crate's README or source for more details on its purpose and usage.\n\n---\n\nFor more details, see the documentation in each crate or open an issue if you have questions!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscroll-tech%2Frollup-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscroll-tech%2Frollup-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscroll-tech%2Frollup-node/lists"}