Skip to content

Adjusting execution reverted code. Fixes #9329#9428

Merged
mrzeszutko merged 7 commits into
masterfrom
feature/adjust-error-codes-to-geth
Oct 13, 2025
Merged

Adjusting execution reverted code. Fixes #9329#9428
mrzeszutko merged 7 commits into
masterfrom
feature/adjust-error-codes-to-geth

Conversation

@mrzeszutko

@mrzeszutko mrzeszutko commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

Fixes #9329

Changes

Adjusted jsonRPC responses to match the responses expected in the following hive tests:

  • eth_call/call-revert-abi-error
  • eth_call/call-revert-abi-panic
  • eth_estimateGas/estimate-failed-call

Added a new ErrorCode ExecutionReverted = 3
Added data property for errors returned by eth_estimateGas - had to introduce additional version of ResultWrapper that allows to specify a different data type for error responses.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

I adjusted the existing tests and run hive tests locally to check if the failing test cases pass.

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

For eth_call and eth_estimateGas the api returns error code = 3 when execution is reverted.

Comment thread src/Nethermind/Nethermind.Evm/ByteCodeBuilder.cs Outdated

@deffrian deffrian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we need to adjust scripts/known-failing-hive-tests.txt

Comment thread src/Nethermind/Nethermind.Evm/ByteCodeBuilder.cs Outdated
Comment thread src/Nethermind/Nethermind.Evm/ByteCodeBuilder.cs Outdated
Comment thread src/Nethermind/Nethermind.JsonRpc/ResultWrapper.cs
@mrzeszutko mrzeszutko requested a review from rubo as a code owner October 9, 2025 14:29
@mrzeszutko mrzeszutko requested review from a team, LukaszRozmej, MarekM25 and deffrian October 9, 2025 14:29
@mrzeszutko mrzeszutko merged commit 5286eea into master Oct 13, 2025
80 checks passed
@mrzeszutko mrzeszutko deleted the feature/adjust-error-codes-to-geth branch October 13, 2025 15:10
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.

Adjusting error codes (start with execution reverted) of eth_calls to geth

5 participants