Skip to content

eth_sendRawTransaction: expect -32602 for malformed-RLP decode failures#576

Draft
manusw7 wants to merge 1 commit into
erigontech:mainfrom
manusw7:sendrawtransaction-invalid-params-32602
Draft

eth_sendRawTransaction: expect -32602 for malformed-RLP decode failures#576
manusw7 wants to merge 1 commit into
erigontech:mainfrom
manusw7:sendrawtransaction-invalid-params-32602

Conversation

@manusw7

@manusw7 manusw7 commented Jun 14, 2026

Copy link
Copy Markdown

What

Change the expected error code from -32000 to -32602 on the four eth_sendRawTransaction fixtures 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:

Merge gates (why this is a draft)

  1. Pending RPC Standards call confirmation (RPC Standards # 28, June 15, 2026, 15:00 UTC ethereum/pm#2120) that decode-failure on submit methods is -32602 and not a future catalog code.
  2. Must not merge until internal/ethapi: return InvalidParams for malformed sendRawTransaction RLP ethereum/go-ethereum#35129 lands — until canonical geth emits -32602, flipping these shared fixtures turns the daily geth comparison runs red.
  3. Pairs with rpc/jsonrpc: return InvalidParams for malformed sendRawTransaction RLP erigon#21701, which bumps RPC_VERSION to the tag cut here.

This PR's own CI will be red against geth for reason (2) — that's expected.

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.

1 participant