-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update eth_call error message #8129
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Karim Taam <[email protected]>
Signed-off-by: Karim Taam <[email protected]>
The changes in the evm module seem orthogonal to this PR. Can they be put in a separate PR? Segregation like this helps immensity when doing "code spelunking" as it removes false-positive rat-holes when bug hunting. |
The changes to the EVM are necessary for the PR, as they enable displaying the invalid opcode in the eth_call response, which was the initial goal but I can create two PRs if you really think it's better @shemnon ? |
Signed-off-by: Karim Taam <[email protected]>
Signed-off-by: Karim Taam <[email protected]>
Signed-off-by: Karim Taam <[email protected]>
RPC and EVM are uncoupled systems. I would prefer two PRs. Perhaps the RPC changes and then the EVM changes on top of them. |
PR description
This allows changing the error message during an eth_call by displaying only the error message itself if available, instead of showing the name in the enum. It also makes it possible to display the invalid opcode in case of an invalid operation and more information in case of error (see tests modifications).
Before :
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"Transaction processing could not be completed due to an exception"}}
After :
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"Transaction processing could not be completed due to an exception (invalid opcode: 0xaa)"}}
you will be able to see more info after an eth_call:
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests