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

feat(node): Supervisor Actor Setup#2161

Merged
refcell merged 2 commits intomainfrom
rf/supervisor-init
Jun 17, 2025
Merged

feat(node): Supervisor Actor Setup#2161
refcell merged 2 commits intomainfrom
rf/supervisor-init

Conversation

@refcell
Copy link
Contributor

@refcell refcell commented Jun 16, 2025

Description

Sets up the supervisor actor which will spawn and handle communication to and from the supervisor as an external or in-process service.

Progress on #2107.

Copilot AI review requested due to automatic review settings June 16, 2025 16:08
@refcell refcell added the A-node Area: cl node (eq. Go op-node) handles single-chain consensus label Jun 16, 2025
@refcell refcell self-assigned this Jun 16, 2025
@refcell
Copy link
Contributor Author

refcell commented Jun 16, 2025

📚 $\text{Stack Overview}$

Pulls submitted in this stack:

This comment was automatically generated by st.

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

This PR sets up the supervisor actor while refactoring derived block pair handling across storage, core, and protocol modules. Key changes include replacing explicit cloning with dereferencing (relying on Copy semantics), updating derive attributes in protocol types, and adding a new SupervisorActor implementation to support external or in-process supervision.

Reviewed Changes

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

Show a summary per file
File Description
crates/supervisor/storage/src/providers/derivation_provider.rs Removed unnecessary cloning when saving a derived block pair, relying on Copy semantics.
crates/supervisor/storage/src/chaindb.rs Updated calls in both normal and test contexts to use dereferenced values instead of clones.
crates/supervisor/core/src/syncnode/task.rs Adjusted event sending by removing clone in favor of dereferencing the derived ref pair.
crates/supervisor/core/src/chain_processor/task.rs Eliminated clone calls in saving derived block pairs and in tests for consistency with Copy types.
crates/protocol/interop/src/derived.rs Changed derived types to derive Copy, ensuring value semantics for lightweight identifiers.
crates/node/service/src/lib.rs & crates/node/service/src/actors/* Introduced and exported a new SupervisorActor and related types to support supervision.
Comments suppressed due to low confidence (3)

crates/protocol/interop/src/derived.rs:14

  • Deriving Copy for 'DerivedIdPair' changes how values are passed and stored; please verify that all consumers of this type are designed to work with value semantics to avoid potential unintentional copying of larger structures.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

crates/supervisor/storage/src/providers/derivation_provider.rs:256

  • The removal of the clone call assumes that 'incoming_pair' implements Copy safely; please confirm that this change aligns with the intended ownership semantics and that no unintended side effects occur.
.put::<DerivedBlocks>(incoming_pair.derived.number, incoming_pair.into())

crates/supervisor/core/src/chain_processor/task.rs:109

  • Passing 'derived_ref_pair' directly without cloning implies that it is a lightweight, Copy type; please ensure that this design change is intentional and consistently applied across the codebase.
if let Err(err) = self.state_manager.save_derived_block_pair(derived_ref_pair) {

@codecov
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.2%. Comparing base (412d3a9) to head (5269688).
Report is 1 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.

refcell added 2 commits June 17, 2025 12:42
Co-authored-by: theo <80177219+theochap@users.noreply.github.com>

Moves the `ManagedEvent` and related `BlockReplacement` types into the
`kona-interop` crate so the `kona-node` can use these types.

Closes #2158
@refcell refcell force-pushed the rf/supervisor-init branch from 180d8e9 to 5269688 Compare June 17, 2025 16:42
@refcell refcell merged commit 6803561 into main Jun 17, 2025
24 checks passed
@refcell refcell deleted the rf/supervisor-init branch June 17, 2025 17:17
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
### Description

Sets up the supervisor actor which will spawn and handle communication
to and from the supervisor as an external or in-process service.

Progress on op-rs/kona#2107.
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
### Description

Sets up the supervisor actor which will spawn and handle communication
to and from the supervisor as an external or in-process service.

Progress on #2107.
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants