Repository navigation
fix(provider): accept nullable raw debug results - #4223
Merged
Merged
Conversation
BREAKING CHANGE: raw debug transaction and receipt lookups return Option. Document and test geth empty-byte responses without normalizing errors. Co-authored-by: Derek Cofausper <[email protected]>
decofe
requested review from
DaniPopes,
grandizzy,
klkvr,
mattsse and
onbjerg
as code owners
September 22, 2026 14:04
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.
also api breaking, and imo non option is more userfriendly
This was referenced Sep 22, 2026
decofe
added a commit
that referenced
this pull request
Sep 22, 2026
Preserve null raw debug transaction and receipt results as None while keeping empty values and RPC errors unchanged. Document and test raw eth result compatibility. Co-authored-by: DaniPopes <[email protected]> Co-authored-by: Derek Cofausper <[email protected]>
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
Alloy rejects
nullfromdebug_getRawTransactionanddebug_getRawReceipts. Reth's raw transaction handler returns an optional result, and geth's raw receipt handler can return null for a missing block number.Solution
Return
Option<Bytes>andOption<Vec<Bytes>>respectively, preserving empty successful values and RPC errors. Document geth's"0x"absence convention in debug and eth raw-transaction lookups: it remainsSome(Bytes::new()); no new normalization is introduced.debug_traceTransactionretains its error behavior.Breaking change: callers of these two debug methods must handle
Option. This PR targetsmainindependently.Validation
Three provider tests cover null, empty, and nonempty raw values; unsupported-method, missing-data, indexing, and unavailable-history errors; and the unchanged debug tracing error path. Nightly formatting and provider clippy pass (existing unrelated warnings). No node-backed tests were run.
PR Checklist
Prompted by: @DaniPopes