Conversation
📚
|
There was a problem hiding this comment.
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 ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6c7895a to
a9dbc44
Compare
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
180d8e9 to
5269688
Compare
### 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.
### 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.
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.