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

fix(supervisor/core): derivation reset#2346

Merged
dhyaniarun1993 merged 5 commits intomainfrom
fix/derivation-reset
Jul 8, 2025
Merged

fix(supervisor/core): derivation reset#2346
dhyaniarun1993 merged 5 commits intomainfrom
fix/derivation-reset

Conversation

@dhyaniarun1993
Copy link
Collaborator

Closes #2341

@dhyaniarun1993 dhyaniarun1993 self-assigned this Jul 7, 2025
@dhyaniarun1993 dhyaniarun1993 added K-fix Kind: fix W-supervisor Workstream: supervisor labels Jul 7, 2025
@codecov
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 82.27273% with 39 lines in your changes missing coverage. Please review.

Project coverage is 80.7%. Comparing base (64203b4) to head (457b19d).
Report is 13 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/supervisor/core/src/chain_processor/task.rs 72.4% 19 Missing ⚠️
...visor/storage/src/providers/derivation_provider.rs 92.2% 7 Missing ⚠️
crates/supervisor/core/src/syncnode/node.rs 0.0% 6 Missing ⚠️
...rates/supervisor/core/src/chain_processor/chain.rs 0.0% 3 Missing ⚠️
crates/supervisor/core/src/syncnode/task.rs 76.9% 3 Missing ⚠️
crates/supervisor/core/src/syncnode/resetter.rs 97.4% 1 Missing ⚠️

☔ 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.

@dhyaniarun1993 dhyaniarun1993 marked this pull request as ready for review July 7, 2025 10:08
Copilot AI review requested due to automatic review settings July 7, 2025 10:08
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 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_block and save_source_block, adding conflict-error paths
  • Introduce get_source_block method and corresponding tests
  • Rename ManagedNodeApiProviderManagedNodeDataProvider, add ManagedNodeController with reset, and remove redundant db_provider fields

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_provider is not in scope here, leading to a compilation error. The constructor should accept a db_provider: Arc<DB> parameter (and pass it into Resetter::new).
        let resetter = Arc::new(Resetter::new(client.clone(), db_provider));

crates/supervisor/core/src/syncnode/error.rs:26

  • StorageError is not imported in this file, causing an unresolved type. Add use kona_supervisor_storage::StorageError; or the correct import path.
    StorageError(#[from] StorageError),

@dhyaniarun1993 dhyaniarun1993 changed the title fix: derivation reset fix(supervisor/core): derivation reset Jul 7, 2025
@dhyaniarun1993 dhyaniarun1993 added this pull request to the merge queue Jul 8, 2025
Merged via the queue into main with commit ebb9f7c Jul 8, 2025
25 checks passed
@dhyaniarun1993 dhyaniarun1993 deleted the fix/derivation-reset branch July 8, 2025 08:39
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

K-fix Kind: fix W-supervisor Workstream: supervisor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(supervisor/core): Handle derivation update failures

3 participants