Skip to content

feat(kona/service): refactor kona-service to make it easier to test the derivation pipeline#19141

Open
theochap wants to merge 1 commit intodevelopfrom
push-zmmyntoxxsyk
Open

feat(kona/service): refactor kona-service to make it easier to test the derivation pipeline#19141
theochap wants to merge 1 commit intodevelopfrom
push-zmmyntoxxsyk

Conversation

@theochap
Copy link
Member

Summary

  • Refactors the NodeActor trait and all actor implementations in kona-service to simplify initialization and improve testability of the derivation pipeline
  • Introduces InboundData pattern to decouple actor construction from inter-actor communication wiring
  • Touches all actors (derivation, engine, l1_watcher, network, rpc, sequencer) and the node service orchestration

Test plan

  • Existing unit tests pass (cargo nextest run --package kona-node-service)
  • Network actor integration tests pass
  • Gossip example builds and runs

🤖 Generated with Claude Code

@theochap theochap requested a review from a team as a code owner February 10, 2026 22:39
@theochap theochap requested a review from bitwiseguy February 10, 2026 22:39
@almanax-ai
Copy link
Contributor

almanax-ai bot commented Feb 10, 2026

Plan expired

Your subscription has expired. Please renew your subscription to continue using CI/CD integration and other features.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 4.00000% with 144 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.9%. Comparing base (86f1d29) to head (07272e9).

Files with missing lines Patch % Lines
rust/kona/crates/node/service/src/service/node.rs 0.0% 89 Missing ⚠️
...crates/node/service/src/actors/l1_watcher/actor.rs 0.0% 24 Missing ⚠️
...ona/crates/node/service/src/actors/engine/actor.rs 0.0% 12 Missing ⚠️
.../crates/node/service/src/actors/sequencer/actor.rs 0.0% 6 Missing ⚠️
rust/kona/crates/node/service/src/service/util.rs 0.0% 5 Missing ⚠️
...crates/node/service/src/actors/derivation/actor.rs 0.0% 3 Missing ⚠️
...t/kona/crates/node/service/src/actors/rpc/actor.rs 0.0% 3 Missing ⚠️
...e/service/src/actors/derivation/delegated/actor.rs 0.0% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #19141      +/-   ##
===========================================
+ Coverage     75.3%    75.9%    +0.6%     
===========================================
  Files          194      477     +283     
  Lines        11285    59795   +48510     
===========================================
+ Hits          8502    45420   +36918     
- Misses        2639    14375   +11736     
+ Partials       144        0     -144     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests ?
unit 75.9% <4.0%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...na/crates/node/service/src/actors/network/actor.rs 100.0% <100.0%> (ø)
...e/service/src/actors/derivation/delegated/actor.rs 0.0% <0.0%> (ø)
...crates/node/service/src/actors/derivation/actor.rs 0.0% <0.0%> (ø)
...t/kona/crates/node/service/src/actors/rpc/actor.rs 90.0% <0.0%> (ø)
rust/kona/crates/node/service/src/service/util.rs 0.0% <0.0%> (ø)
.../crates/node/service/src/actors/sequencer/actor.rs 24.5% <0.0%> (ø)
...ona/crates/node/service/src/actors/engine/actor.rs 0.0% <0.0%> (ø)
...crates/node/service/src/actors/l1_watcher/actor.rs 0.0% <0.0%> (ø)
rust/kona/crates/node/service/src/service/node.rs 0.0% <0.0%> (ø)

... and 662 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theochap theochap force-pushed the push-zmmyntoxxsyk branch 2 times, most recently from bab5bf2 to 3ea4493 Compare February 18, 2026 21:28
@theochap theochap force-pushed the push-zmmyntoxxsyk branch 2 times, most recently from c1fe1d3 to d0dc567 Compare February 19, 2026 21:53
Comment on lines +24 to 38
let build_ticker = tokio::time::interval(Duration::from_secs(rollup_config.block_time));
SequencerActor {
admin_api_rx,
attributes_builder: TestAttributesBuilder { attributes: vec![] },
cancellation_token: CancellationToken::new(),
conductor: None,
engine_client: MockSequencerEngineClient::new(),
is_active: true,
in_recovery_mode: false,
origin_selector: MockOriginSelector::new(),
rollup_config: Arc::new(RollupConfig::default()),
rollup_config,
unsafe_payload_gossip_client: MockUnsafePayloadGossipClient::new(),
build_ticker,
next_payload_to_seal: None,
last_seal_duration: Duration::from_secs(0),
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing initialization of the needs_reset field in the test actor construction. The SequencerActor struct now includes a needs_reset: bool field (added in actor.rs line 138), but it's not being initialized here. This will cause a compilation error.

SequencerActor {
    // ... existing fields ...
    build_ticker,
    next_payload_to_seal: None,
    last_seal_duration: Duration::from_secs(0),
    needs_reset: false, // Add this line
}

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@theochap theochap force-pushed the push-zmmyntoxxsyk branch 2 times, most recently from 88089e6 to d3f9b7f Compare February 23, 2026 13:26
@theochap theochap requested a review from a team as a code owner February 23, 2026 13:26
@theochap theochap force-pushed the push-zmmyntoxxsyk branch 2 times, most recently from 90b2651 to e2d8b4c Compare February 25, 2026 19:45
…he derivation pipeline

fix(kona/service): fix rust-fmt and rust-docs CI failures

Fix trailing `|` formatting in match arm and resolve broken
`CancellationToken` intra-doc link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@theochap theochap force-pushed the push-zmmyntoxxsyk branch from e2d8b4c to 07272e9 Compare March 11, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant