How offchainlabs/nitro works
Nitro is a complete Arbitrum optimistic-rollup node stack. Its main workflow accepts L2 transactions, executes them through Geth and ArbOS, sequences them into batches, compresses and posts batch data to Ethereum, and supports validation and fraud proofs when execution is disputed. The graph also captures inbox ingestion, data availability, bridges, and Stylus/WASM execution. The README establishes the high-level product capabilities; sampled source confirms execution, ArbOS storage, and selected persistence behavior, so unsampled subsystem wiring is shown only where the documented workflow supports it.
Main entry points: batch_poster.go Batch poster · tx_processor.go ArbOS · executionengine.go Geth execution · node.go Nitro node
Components 21
Node and sequencing
- Node RPC
arbnode/api.go - Nitro node
arbnode/node.go - Inbox reader
arbnode/inbox_reader.go - Sequencer
arbnode/sequencer_inbox.go
L2 execution
- Geth execution
execution/gethexec/executionengine.go - ArbOS
arbos/tx_processor.go - L2 state
arbos/arbosState/arbosstate.go - Stylus WASM
arbos/programs/programs.go - System precompiles
precompiles/precompile.go
Batch and availability
- Batch poster
arbnode/batch_poster.go - Batch compression
arbcompress/compress_common.go - Poster queue
arbnode/dataposter/storage/storage.go - Data availability
daprovider/anytrust/provider_factory.go
Validation and proofs
- Validator
validator/validation_entry.go - WASM prover
crates/prover/src/lib.rs - BOLD assertions
bold/assertions/manager.go - Challenge protocol
bold/challenge/manager.go
Rollup interfaces
- Cross-chain messaging
arbos/arbostypes/incomingmessage.go - BOLD API
bold/api/server/server.go
Other components
- Node operator
- Ethereum L1
Connections 22
- Node operator → Node RPC: submits transactions
- Node RPC → Nitro node: sends requests
- Nitro node → Inbox reader: reads L1 messages
- Nitro node → Sequencer: coordinates sequencing
- Sequencer → Geth execution: executes transactions
- Inbox reader → Geth execution: provides messages
- Geth execution → ArbOS: processes transactions
- ArbOS → L2 state: reads and writes
- ArbOS → System precompiles: exposes system calls
- Geth execution → Stylus WASM: executes WASM
- Sequencer → Batch poster: collects L2 data
- Batch poster → Batch compression: compresses batches
- Batch poster → Poster queue: persists queued transactions
- Batch poster → Data availability: publishes data
- Batch poster → Ethereum L1: posts batches
- Data availability → Ethereum L1: supports data availability
- Ethereum L1 → Inbox reader: provides L1 messages
- Validator → WASM prover: uses WASM proofs
- BOLD assertions → Ethereum L1: posts assertions
- Challenge protocol → Ethereum L1: manages challenges
- BOLD API → BOLD assertions: serves assertion API
- ArbOS → Cross-chain messaging: handles L1 messages