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

nit(node/service): move all the l1 arguments into a single struct#3144

Merged
theochap merged 1 commit intomainfrom
theo/refactor-l1-args-into-config
Dec 8, 2025
Merged

nit(node/service): move all the l1 arguments into a single struct#3144
theochap merged 1 commit intomainfrom
theo/refactor-l1-args-into-config

Conversation

@theochap
Copy link
Copy Markdown
Member

@theochap theochap commented Dec 4, 2025

Description

Really simple PR that moves all the l1 related config args into the same struct.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.3%. Comparing base (d7d4b5d) to head (4339379).
⚠️ 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.

Copy link
Copy Markdown
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

This PR refactors the L1-related configuration by consolidating scattered L1 configuration fields into two cohesive structs: L1Config (runtime configuration) and L1ConfigBuilder (builder pattern). This improves code organization by grouping related configuration parameters together.

Key changes:

  • Introduced L1Config struct containing chain, trust_rpc, beacon, and engine_provider fields
  • Introduced L1ConfigBuilder for constructing L1Config instances with config, trust_rpc, beacon, and rpc_url fields
  • Updated RollupNode to use the new L1Config struct instead of individual fields
  • Removed redundant l1_beacon field from EngineConfig since it's now part of L1Config

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/node/service/src/service/node.rs Adds L1Config struct and updates RollupNode to use it; all field accesses updated to reference nested fields
crates/node/service/src/service/mod.rs Exports new L1Config and L1ConfigBuilder types
crates/node/service/src/service/builder.rs Adds L1ConfigBuilder and updates RollupNodeBuilder to construct L1Config instances
crates/node/service/src/lib.rs Re-exports new L1Config and L1ConfigBuilder types publicly
crates/node/service/src/actors/engine/actor.rs Removes redundant l1_beacon field from EngineConfig
bin/node/src/commands/node.rs Updates to construct L1ConfigBuilder and passes it to RollupNodeBuilder

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

pub struct RollupNodeBuilder {
/// The rollup configuration.
pub config: RollupConfig,
/// The L1 chain configuration.
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

The documentation comment is misleading. The field l1_config_builder is not just "The L1 chain configuration" but is a complete builder that includes the chain configuration, trust RPC flag, beacon URL, and RPC URL. Consider updating to: /// The L1 configuration builder.

Suggested change
/// The L1 chain configuration.
/// The L1 configuration builder.

Copilot uses AI. Check for mistakes.
Comment thread crates/node/service/src/service/node.rs Outdated
Comment on lines +29 to +33
pub chain: Arc<L1ChainConfig>,
/// Whether to trust the L1 RPC.
pub trust_rpc: bool,
/// The L1 beacon client.
pub beacon: OnlineBeaconClient,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: Doesn't hurt to be slightly more specific about these.

Suggested change
pub chain: Arc<L1ChainConfig>,
/// Whether to trust the L1 RPC.
pub trust_rpc: bool,
/// The L1 beacon client.
pub beacon: OnlineBeaconClient,
pub chain_config: Arc<L1ChainConfig>,
/// Whether to trust the L1 RPC.
pub trust_rpc: bool,
/// The L1 beacon client.
pub beacon_client: OnlineBeaconClient,

@theochap theochap force-pushed the theo/refactor-l1-args-into-config branch from b1b31f8 to 4339379 Compare December 8, 2025 16:13
@theochap theochap enabled auto-merge December 8, 2025 16:13
@theochap theochap added this pull request to the merge queue Dec 8, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 8, 2025
)

## Description

Really simple PR that moves all the l1 related config args into the same
struct.
github-merge-queue bot pushed a commit that referenced this pull request Dec 8, 2025
)

## Description

Really simple PR that moves all the l1 related config args into the same
struct.
Merged via the queue into main with commit 7fdc212 Dec 8, 2025
43 of 47 checks passed
@theochap theochap deleted the theo/refactor-l1-args-into-config branch December 8, 2025 20:48
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
…-rs/kona#3144)

## Description

Really simple PR that moves all the l1 related config args into the same
struct.
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
…-rs/kona#3144)

## Description

Really simple PR that moves all the l1 related config args into the same
struct.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants