Skip to content

error-groups: tx validation, execution and txpool error codes#823

Draft
s1na wants to merge 4 commits into
ethereum:mainfrom
s1na:worktree-error-catalog-research
Draft

error-groups: tx validation, execution and txpool error codes#823
s1na wants to merge 4 commits into
ethereum:mainfrom
s1na:worktree-error-catalog-research

Conversation

@s1na

@s1na s1na commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This is my attempt at refactoring error codes from #650, and based on the conversation in #817. The core of it is re-categorising "execution" and "gas" error groups. I am proposing separation by "tx-validation" and "runtime" errors. This allows the client to realize eth_sendTransaction failed and tx will not be propagated due to validation issue. A tx failing in runtime will be still included in the block.

Detail of changes and their rationale are:

  • Remove standard json-rpc errors. They are defined in the upstream spec, we shouldn't need to re-define them.
  • On the non-standard errors as specified in EIP-1474: I have kept -32000 and -32001 which are used in clients already. Let's add others on a need-basis.
  • ZK execution errors: seems like it should be standardised between L2s?
  • Re-categorise EVM related codes. New group for tx validation errors. The miner will not include a tx failing on any of these codes. New group for EVM runtime errors. That's revert 3, and the generic VM error -32015. Unfortunate they are not in a range.
  • Changed eth_simulateV1 to use the groups properly. One of the things we realized is that the validation errors and the "simulate-specific" codes cross-cut in the number range.

The "non-standard" codes -32002/-32003 are used as well. But unfortunately with different meanings: geth: timeout / response-too-large; reth/nethermind: transaction-rejected / resource-unavailable. This needs discussing.

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.

2 participants