eth_sendRawTransaction: expect -32602 for malformed-RLP decode failures#576
Draft
manusw7 wants to merge 1 commit into
Draft
eth_sendRawTransaction: expect -32602 for malformed-RLP decode failures#576manusw7 wants to merge 1 commit into
manusw7 wants to merge 1 commit into
Conversation
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.
What
Change the expected error
codefrom-32000to-32602on the foureth_sendRawTransactionfixtures that submit undecodable payloads. Error messages are unchanged.integration/mainnet/eth_sendRawTransaction/test_01.json(truncated long-RLP tx)integration/mainnet/eth_sendRawTransaction/test_02.json(0xd4, truncated short-list)integration/mainnet/eth_sendRawTransaction/test_03.json(0xd4)integration/arb-sepolia/eth_sendRawTransaction/test_01.json(0xdeadbeef)Why
A malformed/undecodable raw transaction is a parameter-decode failure, which per JSON-RPC 2.0 is
-32602(invalid params), not-32000. Clients currently diverge on the decode class; these PRs align it to-32602:eth_sendRawTransaction: RLP decode failure returns wrong JSON-RPC error code NethermindEth/nethermind#11921Merge gates (why this is a draft)
-32602and not a future catalog code.-32602, flipping these shared fixtures turns the daily geth comparison runs red.RPC_VERSIONto the tag cut here.This PR's own CI will be red against geth for reason (2) — that's expected.