Overview
When running in sequencer mode, the Kona node:- Builds L2 blocks by collecting transactions from the mempool and constructing new blocks
- Selects L1 origins for new L2 blocks based on finalized L1 data
- Manages block production timing and ensures proper sequencing constraints
- Integrates with conductor services for leader election in multi-sequencer setups
- Handles recovery scenarios when the sequencer needs to catch up with L1
Trait Abstractions
Core Interfaces
The sequencer functionality is built around several key trait abstractions:RollupNodeService
The main service trait that defines the node’s operational mode and actor types:
AttributesBuilderConfig
Configures how L2 block attributes are constructed:
SequencerActor
The core actor responsible for block production:
- Builds L2 blocks using the
AttributesBuilder - Manages timing and L1 origin selection
- Handles admin RPC commands for sequencer control
- Coordinates with conductor services for leader election
Programmatic Configuration
Using the RollupNodeBuilder
To configure a Kona node programmatically for sequencer mode:Configuration Options
| Field | Description | Default |
|---|---|---|
sequencer_stopped | Start sequencer in stopped state | false |
sequencer_recovery_mode | Enable recovery mode for catch-up | false |
conductor_rpc_url | Conductor service endpoint for leader election | None |
CLI Usage
Basic Sequencer Setup
To run a Kona node in sequencer mode:Required Arguments
:::warning Required Configuration Sequencer mode requires all standard node arguments plus the--mode=Sequencer flag. Missing any required argument will prevent the node from starting.
:::
| Argument | Flag | Environment Variable | Description |
|---|---|---|---|
| Mode | --mode | KONA_NODE_MODE | Must be set to Sequencer |
| L1 RPC | --l1-eth-rpc | KONA_NODE_L1_ETH_RPC | L1 execution client RPC URL |
| L1 Beacon | --l1-beacon | KONA_NODE_L1_BEACON | L1 beacon API URL |
| L2 Engine | --l2-engine-rpc | KONA_NODE_L2_ENGINE_RPC | L2 engine API endpoint |
| JWT Secret | --l2.jwt-secret | KONA_NODE_L2_ENGINE_AUTH | Path to JWT secret file |
| Chain ID | --chain | KONA_NODE_L2_CHAIN_ID | L2 chain identifier |
Sequencer-Specific Flags
| Flag | Environment Variable | Default | Description |
|---|---|---|---|
--sequencer.stopped | KONA_NODE_SEQUENCER_STOPPED | false | Start sequencer in stopped state |
--sequencer.max-safe-lag | KONA_NODE_SEQUENCER_MAX_SAFE_LAG | 0 | Max L2 blocks between safe and unsafe heads |
--sequencer.l1-confs | KONA_NODE_SEQUENCER_L1_CONFS | 4 | L1 confirmations for origin selection |
--sequencer.recover | KONA_NODE_SEQUENCER_RECOVER | false | Force recovery mode operation |
--conductor.rpc | KONA_NODE_CONDUCTOR_RPC | - | Conductor service RPC endpoint |
--conductor.rpc.timeout | KONA_NODE_CONDUCTOR_RPC_TIMEOUT | 1 | Conductor RPC timeout (seconds) |
Example Configurations
Basic Sequencer
Sequencer with Conductor
Recovery Mode Sequencer
Key Considerations
:::tip Sequencer Operation- L1 Confirmations: The
--sequencer.l1-confssetting determines how many L1 blocks the sequencer waits before using an L1 block as an origin. Higher values provide more safety but increase latency. - Recovery Mode: Use
--sequencer.recover=truewhen the sequencer needs to catch up after being offline. - Conductor Integration: For multi-sequencer deployments, configure the conductor service for proper leader election. :::