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

feat(supervisor/core): added invalidated block on managed node#2541

Merged
itschaindev merged 2 commits intomainfrom
feat/managed-node-invalidate-block
Jul 24, 2025
Merged

feat(supervisor/core): added invalidated block on managed node#2541
itschaindev merged 2 commits intomainfrom
feat/managed-node-invalidate-block

Conversation

@dhyaniarun1993
Copy link
Collaborator

Part of #2435

@dhyaniarun1993 dhyaniarun1993 self-assigned this Jul 24, 2025
@dhyaniarun1993 dhyaniarun1993 added the K-feature Kind: feature label Jul 24, 2025
Copilot AI review requested due to automatic review settings July 24, 2025 06:41
@dhyaniarun1993 dhyaniarun1993 added the W-supervisor Workstream: supervisor label Jul 24, 2025
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 adds block invalidation functionality to the managed node controller as part of issue #2435. The change enables the supervisor to instruct managed nodes to invalidate blocks when invalid blocks are detected, allowing for proper state rollback.

  • Adds invalidate_block method to the ManagedNodeController trait
  • Implements the method across the node client, controller, and related components
  • Updates test mocks to include the new invalidation functionality

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/supervisor/core/src/syncnode/traits.rs Adds invalidate_block method to ManagedNodeController trait with documentation
crates/supervisor/core/src/syncnode/node.rs Implements invalidate_block method in the managed node controller
crates/supervisor/core/src/syncnode/client.rs Adds client-side implementation with RPC call and metrics
crates/supervisor/core/src/syncnode/task.rs Updates mock client to include invalidate_block method
crates/supervisor/core/src/syncnode/resetter.rs Updates mock client to include invalidate_block method
crates/supervisor/core/src/chain_processor/task.rs Updates mock controller to include invalidate_block method
crates/supervisor/core/src/chain_processor/chain.rs Refactors test mocks from manual implementation to mockall-generated mocks

@codecov
Copy link

codecov bot commented Jul 24, 2025

Codecov Report

Attention: Patch coverage is 74.64789% with 18 lines in your changes missing coverage. Please review.

Project coverage is 82.3%. Comparing base (bf02a69) to head (a6a37ce).
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/syncnode/client.rs 0.0% 14 Missing ⚠️
crates/supervisor/core/src/syncnode/node.rs 0.0% 4 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.

Copy link
Collaborator

@itschaindev itschaindev left a comment

Choose a reason for hiding this comment

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

lgtm

@itschaindev itschaindev added this pull request to the merge queue Jul 24, 2025
Merged via the queue into main with commit d608283 Jul 24, 2025
29 of 30 checks passed
@itschaindev itschaindev deleted the feat/managed-node-invalidate-block branch July 24, 2025 12:47
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-feature Kind: feature W-supervisor Workstream: supervisor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants