Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

feat(bin/node): Change sequencer.enabled -> mode#2342

Merged
clabby merged 1 commit intomainfrom
cl/mode-flag-wiring
Jul 7, 2025
Merged

feat(bin/node): Change sequencer.enabled -> mode#2342
clabby merged 1 commit intomainfrom
cl/mode-flag-wiring

Conversation

@clabby
Copy link
Contributor

@clabby clabby commented Jul 6, 2025

Overview

Changes the sequencer.enabled flag to a more generic mode flag that can be used to specify different modes of operation for the node. Also wires this flag up to the NodeBuilder.

closes #2307

@clabby clabby self-assigned this Jul 6, 2025
Copilot AI review requested due to automatic review settings July 6, 2025 15:25
@clabby clabby added K-feature Kind: feature M-bin Meta: Touches application binaries labels Jul 6, 2025
@clabby clabby requested review from emhane and refcell as code owners July 6, 2025 15:25
@clabby clabby added the A-node Area: cl node (eq. Go op-node) handles single-chain consensus label Jul 6, 2025
@clabby clabby requested a review from theochap as a code owner July 6, 2025 15:25
@clabby clabby added the W-node Workstream: kona-node label Jul 6, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Updates the node configuration flag from sequencer.enabled to a generic mode option and connects it through the builder.

  • Introduces with_mode on RollupNodeBuilder and moves mode into the RollupNode struct
  • Defines FromStr for NodeMode to parse CLI input
  • Removes duplicate mode assignment in RollupNodeBuilder::build

Reviewed Changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
crates/node/service/src/service/standard/builder.rs Added with_mode setter and wired mode into RollupNode
crates/node/service/src/service/mode.rs Implemented FromStr for NodeMode
Comments suppressed due to low confidence (3)

crates/node/service/src/service/mode.rs:18

  • Consider defining a custom error type (e.g., ParseNodeModeError) instead of using String so you can implement std::error::Error and provide richer context.
    type Err = String;

crates/node/service/src/service/mode.rs:17

  • Add unit tests for parsing NodeMode with valid inputs ("validator", "sequencer") and invalid cases to ensure the FromStr implementation behaves as expected.
impl std::str::FromStr for NodeMode {

crates/node/service/src/service/mode.rs:7

  • The NodeMode enum lacks a doc comment. Consider adding a brief description of its purpose and the meaning of each variant for maintainability.
pub enum NodeMode {

@codecov
Copy link

codecov bot commented Jul 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.6%. Comparing base (8e309de) to head (4c0033c).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@clabby clabby force-pushed the cl/mode-flag-wiring branch from fa3b6a0 to 5178b10 Compare July 7, 2025 12:00
@clabby clabby requested a review from refcell July 7, 2025 12:00
@clabby clabby force-pushed the cl/mode-flag-wiring branch from 5178b10 to 9bea18d Compare July 7, 2025 12:01
## Overview

Changes the `sequencer.enabled` flag to a more generic `mode` flag that can be used to specify different modes of operation for the node.
Also wires this flag up to the `NodeBuilder`.
@clabby clabby added this pull request to the merge queue Jul 7, 2025
Merged via the queue into main with commit 27d83dd Jul 7, 2025
25 checks passed
@clabby clabby deleted the cl/mode-flag-wiring branch July 7, 2025 16:49
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
## Overview

Changes the `sequencer.enabled` flag to a more generic `mode` flag that
can be used to specify different modes of operation for the node. Also
wires this flag up to the `NodeBuilder`.

closes op-rs/kona#2307
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
## Overview

Changes the `sequencer.enabled` flag to a more generic `mode` flag that
can be used to specify different modes of operation for the node. Also
wires this flag up to the `NodeBuilder`.

closes #2307
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-node Area: cl node (eq. Go op-node) handles single-chain consensus K-feature Kind: feature M-bin Meta: Touches application binaries W-node Workstream: kona-node

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(bin/node): Change sequencer.enabled -> NodeMode

3 participants