Repository navigation
fix(provider): handle nullable trace collection results - #4219
Merged
Merged
Conversation
BREAKING CHANGE: trace lookup methods return Option to distinguish missing data from empty results. Co-authored-by: Derek Cofausper <[email protected]>
decofe
requested review from
DaniPopes,
grandizzy,
klkvr,
mattsse and
onbjerg
as code owners
September 22, 2026 13:55
decofe
added this pull request to stack #4222
September 22, 2026 13:56
decofe
removed this pull request from stack #4222
September 22, 2026 14:00
Clarify client-specific missing-block errors and keep trace_get and individual replay changes in their independent PRs. Co-authored-by: Derek Cofausper <[email protected]>
Co-authored-by: Derek Cofausper <[email protected]>
DaniPopes
approved these changes
Sep 22, 2026
Co-authored-by: Derek Cofausper <[email protected]>
Co-authored-by: Derek Cofausper <[email protected]>
mattsse
reviewed
Sep 22, 2026
mattsse
left a comment
Member
There was a problem hiding this comment.
these are breaking, i think from user pov, non option is actually more user friendly here
This was referenced Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Trace collection methods reject successful JSON-RPC
nullresponses. Banteg's H06 report distinguishes missing data from empty results and unavailable history.Solution
Return
Option<Vec<_>>fromtrace_transaction,trace_block, andtrace_replay_block_transactions. Preserve[]asSome(vec![])and propagate RPC errors unchanged. Document that some nodes, including Reth's currenttrace_blockhandler, error on missing blocks rather than returningnull.Breaking change: callers must handle
Optionafter awaiting these three methods. This PR targetsmainand has no PR dependencies. Individual replay andtrace_getare handled in #4221 and #4220.Validation
Two provider regression tests cover null versus empty results and unchanged error codes across all three methods. Nightly formatting passes. No node-backed tests were run.
PR Checklist
Prompted by: @DaniPopes