Skip to content

op-service,op-supervisor: Correctly detect ethereum.NotFound in RPCs #16555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

sebastianst
Copy link
Member

Description

The ethereum.NotFound error can be lost across RPC boundaries. This PR fixes our L2 source and Interop RPC clients to heuristically detect this error and forward it internally accordingly. This is important because this error is often treated in a special way. The heuristic is isolated into a new function eth.MaybeAsNotFoundErr(err) for reuse.

Tests

Unit tests added for the new MaybeAsNotFoundErr function.

Additional context

Without this, Interop resets don't work because the bisection checks for this error but the RPC client didn't produce it correctly.

@sebastianst sebastianst requested review from a team as code owners June 24, 2025 11:55
@sebastianst sebastianst requested a review from protolambda June 24, 2025 11:55
Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (1515740) to head (d8f9519).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #16555       +/-   ##
============================================
- Coverage    77.18%        0   -77.19%     
============================================
  Files          166        0      -166     
  Lines         9507        0     -9507     
============================================
- Hits          7338        0     -7338     
+ Misses        2019        0     -2019     
+ Partials       150        0      -150     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 166 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

The EthClient.payloadCall, EthClient.headerCall, EthClient.blockCall inner methods should be getting this error check. The methods that were changed here just wrap those 3 inner methods. If the inner methods handle the error, then we don't have to repeat it in every usage. Also see other comment about the existing nil checks (the standard way of communicating not-found in RPC for blocks). But these 3 methods miss the error inspection when the error is non-nil.

@sebastianst sebastianst force-pushed the seb/fix-eth-not-found-rpc branch from c95ff94 to d8f9519 Compare June 24, 2025 13:53
Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

Very nice

@sebastianst sebastianst enabled auto-merge June 24, 2025 14:11
@sebastianst sebastianst added this pull request to the merge queue Jun 24, 2025
Merged via the queue into develop with commit 4a8eb69 Jun 24, 2025
61 checks passed
@sebastianst sebastianst deleted the seb/fix-eth-not-found-rpc branch June 24, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants