fix: Eth JSON-RPC API: eth_getTransactionByHash should return nil when not found #9932
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.
Related Issues
Hardhat users are having troubles deploying contracts to Wallaby via Hardhat.
The problem was introduced in 20f27af. That commit introduced the ability to resolve transactions pending in the mpool, but incorrectly returned an error when the transaction was not found. Eth clients expect a nil here, and Hardhat will send a tx and then poll the endpoint. But it will fail if an error is returned.
And one would think: if Wallaby users are deploying via Glif endpoints, then surely the Glif endpoint should be able to find the transaction within its mpool, right? Where this likely goes sideways is with load balancing.
Proposed Changes
Return nil from
eth_getTransactionByHash
when not found.Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps