fix(supervisor/core): derivation reset#2346
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR refines the append-only storage behavior for derived and source blocks with explicit idempotency and conflict handling, adds a new get_source_block reader, and extends the syncnode abstraction with a dedicated data provider, controller (including a reset API), and cleans up task and node constructors.
- Clarify and document append-only semantics for
save_derived_blockandsave_source_block, adding conflict-error paths - Introduce
get_source_blockmethod and corresponding tests - Rename
ManagedNodeApiProvider→ManagedNodeDataProvider, addManagedNodeControllerwithreset, and remove redundantdb_providerfields
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/supervisor/storage/src/traits.rs | Expanded doc comments to describe idempotency and conflicts |
| crates/supervisor/storage/src/providers/derivation_provider.rs | Added get_source_block, conflict checks for old blocks |
| crates/supervisor/core/src/syncnode/traits.rs | Split data vs. control traits, added reset API |
| crates/supervisor/core/src/syncnode/node.rs | Removed db_provider field, updated constructor |
| crates/supervisor/core/src/syncnode/error.rs | Replaced DatabaseNotInitialised with StorageError |
Comments suppressed due to low confidence (2)
crates/supervisor/core/src/syncnode/node.rs:54
db_provideris not in scope here, leading to a compilation error. The constructor should accept adb_provider: Arc<DB>parameter (and pass it intoResetter::new).
let resetter = Arc::new(Resetter::new(client.clone(), db_provider));
crates/supervisor/core/src/syncnode/error.rs:26
StorageErroris not imported in this file, causing an unresolved type. Adduse kona_supervisor_storage::StorageError;or the correct import path.
StorageError(#[from] StorageError),
Closes #2341