Skip to content

Commit c01c200

Browse files
authored
feat: initial mdbook (#401)
* feat: initial mdbook * feat: book action * fix: book path
1 parent 82dbc02 commit c01c200

File tree

5 files changed

+416
-0
lines changed

5 files changed

+416
-0
lines changed

.github/workflows/book.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy mdBook
2+
on:
3+
# REMOVE
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: peaceiris/actions-mdbook@v2
16+
with:
17+
mdbook-version: 'latest'
18+
19+
- name: Build book
20+
run: mdbook build book # Add "book" to specify the directory
21+
22+
- uses: peaceiris/actions-gh-pages@v4
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: ./book/book

book/book.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[book]
2+
authors = ["Gregory Edison"]
3+
language = "en"
4+
src = "src"
5+
title = "Rollup node"

book/src/SUMMARY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Summary
2+
3+
- [Introduction](./chapter_1.md)
4+
- [Running a Node](./running-a-node.md)

book/src/chapter_1.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Introduction
2+
3+
Welcome to the Scroll Rollup Node documentation.
4+
5+
## What is Scroll?
6+
7+
Scroll is a zkRollup on Ethereum that enables scaling while maintaining security and decentralization through
8+
zero-knowledge proofs. By moving computation and state storage off-chain while posting transaction data and validity
9+
proofs to Ethereum L1, Scroll achieves higher throughput and lower transaction costs while inheriting Ethereum's
10+
security guarantees.
11+
12+
## What is the Rollup Node?
13+
14+
The rollup node is responsible for constructing the Scroll L2 chain from data posted to Ethereum L1. At its core, the
15+
rollup node implements a derivation function: given the L1 chain state, it deterministically produces the corresponding
16+
L2 chain.
17+
18+
### Core Function
19+
20+
While conceptually the rollup node computes L2 as a pure function of L1 data, in practice it operates
21+
incrementally—processing new L1 blocks as they arrive and handling reorganizations when the L1 chain restructures. This
22+
incremental approach allows the node to efficiently maintain synchronization without reprocessing the entire chain
23+
history.
24+
25+
The derivation process works by:
26+
27+
1. **Monitoring L1**: Watching for batch commitments, finalization events, and cross-chain messages posted to Ethereum
28+
2. **Decoding Batches**: Extracting and decoding batch data (including blob data) to reconstruct transaction lists
29+
3. **Building Payloads**: Constructing execution payloads with the appropriate transactions and L1 messages
30+
4. **Executing Blocks**: Applying payloads through the execution engine to advance the L2 state
31+
32+
### Architecture
33+
34+
Built on the Reth framework, the rollup node employs an event-driven architecture where specialized components
35+
communicate through async channels:
36+
37+
- **L1 Watcher**: Tracks L1 events and maintains awareness of chain reorganizations
38+
- **Derivation Pipeline**: Transforms batch data from L1 into executable L2 payloads
39+
- **Engine Driver**: Interfaces with the execution engine via the Engine API
40+
- **Chain Orchestrator**: Coordinates the overall flow from L1 events to L2 blocks
41+
- **Network Layer**: Propagates blocks across the P2P network for faster synchronization
42+
43+
### Node Modes
44+
45+
The rollup node can operate in different configurations:
46+
47+
- **Follower Node**: Derives L2 blocks by processing batch data posted to L1, participating in P2P block propagation
48+
- **Sequencer Node**: Actively sequences new transactions into blocks and posts batches to L1
49+
50+
## About This Documentation
51+
52+
This documentation provides comprehensive guides for operating and understanding the Scroll rollup node, including setup
53+
instructions, configuration options, architecture details, and troubleshooting guidance.

0 commit comments

Comments
 (0)