Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 6 additions & 32 deletions bin/node/src/commands/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ pub struct NodeCommand {
/// (overrides the default rollup configuration from the registry)
#[arg(long, visible_alias = "rollup-cfg", env = "KONA_NODE_ROLLUP_CONFIG")]
pub l2_config_file: Option<PathBuf>,
/// Poll interval (in seconds) for reloading the runtime config.
/// Provides a backup for when config events are not being picked up.
/// Disabled if `0`.
#[arg(
long,
visible_alias = "l1.runtime-config-reload-interval",
default_value = "600", // 10 minutes in seconds
env = "KONA_NODE_L1_RUNTIME_CONFIG_RELOAD_INTERVAL",
)]
pub l1_runtime_config_reload_interval: u64,
/// P2P CLI arguments.
#[command(flatten)]
pub p2p_flags: P2PArgs,
Expand All @@ -95,7 +85,6 @@ impl Default for NodeCommand {
l2_provider_rpc: Url::parse("http://localhost:8545").unwrap(),
l2_engine_jwt_secret: None,
l2_config_file: None,
l1_runtime_config_reload_interval: 600,
node_mode: NodeMode::Validator,
p2p_flags: P2PArgs::default(),
rpc_flags: RpcArgs::default(),
Expand Down Expand Up @@ -218,9 +207,6 @@ impl NodeCommand {
let p2p_config = self.p2p_flags.config(&cfg, args, Some(self.l1_eth_rpc.clone())).await?;
let rpc_config = self.rpc_flags.into();

let runtime_interval =
std::time::Duration::from_secs(self.l1_runtime_config_reload_interval);

info!(
target: "rollup_node",
chain_id = cfg.l2_chain_id.id(),
Expand All @@ -237,7 +223,6 @@ impl NodeCommand {
.with_l1_beacon_api_url(self.l1_beacon)
.with_l2_provider_rpc_url(self.l2_provider_rpc)
.with_l2_engine_rpc_url(self.l2_engine_rpc)
.with_runtime_load_interval(runtime_interval)
.with_p2p_config(p2p_config)
.with_rpc_config(rpc_config)
.with_supervisor_rpc_config(supervisor_rpc_config.unwrap_or_default())
Expand Down Expand Up @@ -324,6 +309,12 @@ mod tests {
]
}

#[test]
fn test_node_cli_defaults() {
let args = NodeCommand::parse_from(["node"].iter().chain(default_flags().iter()).copied());
assert_eq!(args.node_mode, NodeMode::Validator);
}

#[test]
fn test_node_cli_missing_l1_eth_rpc() {
let err = NodeCommand::try_parse_from(["node"]).unwrap_err();
Expand Down Expand Up @@ -364,21 +355,4 @@ mod tests {
.unwrap_err();
assert!(err.to_string().contains("--l2-provider-rpc"));
}

#[test]
fn test_node_cli_defaults() {
let args = NodeCommand::parse_from(["node"].iter().chain(default_flags().iter()).copied());
assert_eq!(args.l1_runtime_config_reload_interval, 600);
}

#[test]
fn test_node_cli_runtime_config_default() {
let args = NodeCommand::parse_from(
["node", "--l1.runtime-config-reload-interval", "0"]
.iter()
.chain(default_flags().iter())
.copied(),
);
assert_eq!(args.l1_runtime_config_reload_interval, 0);
}
}
3 changes: 0 additions & 3 deletions crates/node/service/src/actors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
mod traits;
pub use traits::{CancellableContext, NodeActor};

mod runtime;
pub use runtime::{RuntimeActor, RuntimeContext, RuntimeState};

mod engine;
pub use engine::{
EngineActor, EngineBuilder, EngineContext, EngineError, EngineInboundData, L2Finalizer,
Expand Down
100 changes: 0 additions & 100 deletions crates/node/service/src/actors/runtime.rs

This file was deleted.

7 changes: 3 additions & 4 deletions crates/node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ pub use actors::{
L1WatcherRpcState, L2Finalizer, NetworkActor, NetworkActorError, NetworkBuilder,
NetworkBuilderError, NetworkConfig, NetworkContext, NetworkDriver, NetworkDriverError,
NetworkHandler, NetworkInboundData, NodeActor, PipelineBuilder, RpcActor, RpcActorError,
RpcContext, RuntimeActor, RuntimeContext, RuntimeState, SequencerActor, SequencerActorError,
SequencerBuilder, SequencerConfig, SequencerContext, SequencerInboundData, SupervisorActor,
SupervisorActorContext, SupervisorActorError, SupervisorExt, SupervisorInboundData,
SupervisorRpcServerExt,
RpcContext, SequencerActor, SequencerActorError, SequencerBuilder, SequencerConfig,
SequencerContext, SequencerInboundData, SupervisorActor, SupervisorActorContext,
SupervisorActorError, SupervisorExt, SupervisorInboundData, SupervisorRpcServerExt,
};

mod metrics;
Expand Down
15 changes: 1 addition & 14 deletions crates/node/service/src/service/core.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! The core [`RollupNodeService`] trait
use crate::{
AttributesBuilderConfig, DerivationContext, EngineContext, L1WatcherRpcContext, NetworkContext,
NodeActor, NodeMode, RpcContext, RuntimeContext, SequencerContext, SequencerInboundData,
NodeActor, NodeMode, RpcContext, SequencerContext, SequencerInboundData,
SupervisorActorContext, SupervisorExt,
actors::{
DerivationInboundChannels, EngineInboundData, L1WatcherRpcInboundChannels,
Expand Down Expand Up @@ -77,9 +77,6 @@ pub trait RollupNodeService {
InboundData = SupervisorInboundData,
>;

/// The type of runtime actor to use for the service.
type RuntimeActor: NodeActor<Error: Display, OutboundData = RuntimeContext, InboundData = ()>;

/// The type of attributes builder to use for the sequener.
type AttributesBuilder: AttributesBuilder + Send + Sync + 'static;

Expand All @@ -106,9 +103,6 @@ pub trait RollupNodeService {
/// Creates a network builder for the node.
fn network_builder(&self) -> <Self::NetworkActor as NodeActor>::Builder;

/// Returns a runtime builder for the node.
fn runtime_builder(&self) -> Option<<Self::RuntimeActor as NodeActor>::Builder>;

/// Returns an engine builder for the node.
fn engine_builder(&self) -> <Self::EngineActor as NodeActor>::Builder;

Expand Down Expand Up @@ -148,9 +142,6 @@ pub trait RollupNodeService {
//
// )

// Create the runtime actor.
let (_, runtime) = self.runtime_builder().map(Self::RuntimeActor::build).unzip();

// Create the engine actor.
let (
EngineInboundData {
Expand Down Expand Up @@ -187,10 +178,6 @@ pub trait RollupNodeService {
spawn_and_wait!(
cancellation,
actors = [
runtime.map(|r| (
r,
RuntimeContext { cancellation: cancellation.clone() }
)),
rpc.map(|r| (
r,
RpcContext {
Expand Down
21 changes: 2 additions & 19 deletions crates/node/service/src/service/standard/builder.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! Contains the builder for the [`RollupNode`].

use crate::{
EngineBuilder, InteropMode, NetworkConfig, NodeMode, RollupNode, SequencerConfig,
actors::RuntimeState,
};
use crate::{EngineBuilder, InteropMode, NetworkConfig, NodeMode, RollupNode, SequencerConfig};
use alloy_primitives::Bytes;
use alloy_provider::RootProvider;
use alloy_rpc_client::RpcClient;
Expand Down Expand Up @@ -43,8 +40,6 @@ pub struct RollupNodeBuilder {
rpc_config: Option<RpcBuilder>,
/// An RPC Configuration for the supervisor rpc.
supervisor_rpc_config: SupervisorRpcConfig,
/// An interval to load the runtime config.
runtime_load_interval: Option<std::time::Duration>,
/// The [`SequencerConfig`].
sequencer_config: Option<SequencerConfig>,
/// The mode to run the node in.
Expand Down Expand Up @@ -109,11 +104,6 @@ impl RollupNodeBuilder {
Self { rpc_config, ..self }
}

/// Sets the runtime load interval on the [`RollupNodeBuilder`].
pub fn with_runtime_load_interval(self, interval: std::time::Duration) -> Self {
Self { runtime_load_interval: Some(interval), ..self }
}

/// Appends the [`SequencerConfig`] to the builder.
pub fn with_sequencer_config(self, sequencer_config: SequencerConfig) -> Self {
Self { sequencer_config: Some(sequencer_config), ..self }
Expand Down Expand Up @@ -156,18 +146,12 @@ impl RollupNodeBuilder {
let engine_builder = EngineBuilder {
config: Arc::clone(&rollup_config),
l2_rpc_url,
l1_rpc_url: l1_rpc_url.clone(),
l1_rpc_url,
engine_url: self.l2_engine_rpc_url.expect("missing l2 engine rpc url"),
jwt_secret,
mode: self.mode,
};

let runtime_builder = self.runtime_load_interval.map(|load_interval| RuntimeState {
loader: kona_sources::RuntimeLoader::new(l1_rpc_url, rollup_config.clone()),
client: engine_builder.client(),
interval: load_interval,
});

let p2p_config = self.p2p_config.expect("P2P config not set");
let sequencer_config = self.sequencer_config.unwrap_or_default();

Expand All @@ -184,7 +168,6 @@ impl RollupNodeBuilder {
l2_provider,
engine_builder,
rpc_builder: self.rpc_config,
runtime_builder,
p2p_config,
sequencer_config,
// By default, the supervisor rpc config is disabled.
Expand Down
12 changes: 2 additions & 10 deletions crates/node/service/src/service/standard/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
use crate::{
DerivationActor, DerivationBuilder, EngineActor, EngineBuilder, InteropMode, L1WatcherRpc,
L1WatcherRpcState, NetworkActor, NetworkBuilder, NetworkConfig, NodeMode, RollupNodeBuilder,
RollupNodeService, RpcActor, RuntimeActor, SequencerConfig, SupervisorActor,
SupervisorRpcServerExt,
actors::{RuntimeState, SequencerActor, SequencerBuilder},
RollupNodeService, RpcActor, SequencerConfig, SupervisorActor, SupervisorRpcServerExt,
actors::{SequencerActor, SequencerBuilder},
};
use alloy_provider::RootProvider;
use async_trait::async_trait;
Expand Down Expand Up @@ -38,8 +37,6 @@ pub struct RollupNode {
pub(crate) rpc_builder: Option<RpcBuilder>,
/// The P2P [`NetworkConfig`] for the node.
pub(crate) p2p_config: NetworkConfig,
/// The [`RuntimeState`] for the runtime loading service.
pub(crate) runtime_builder: Option<RuntimeState>,
/// The [`SequencerConfig`] for the node.
pub(crate) sequencer_config: SequencerConfig,
/// The supervisor rpc server config.
Expand All @@ -66,7 +63,6 @@ impl RollupNodeService for RollupNode {
type SupervisorExt = SupervisorRpcServerExt;
type SupervisorActor = SupervisorActor<Self::SupervisorExt>;

type RuntimeActor = RuntimeActor;
type RpcActor = RpcActor;
type EngineActor = EngineActor;
type NetworkActor = NetworkActor;
Expand Down Expand Up @@ -97,10 +93,6 @@ impl RollupNodeService for RollupNode {
Some(SupervisorRpcServerExt::new(handle, events_tx, control_rx))
}

fn runtime_builder(&self) -> Option<RuntimeState> {
self.runtime_builder.clone()
}

fn engine_builder(&self) -> EngineBuilder {
self.engine_builder.clone()
}
Expand Down
Loading