-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
eth_call revert error code for Execution Errors #21886
Comments
For the In your testcase, is there a concrete revert reason available? If so but Geth returns nothing, please open an issue! |
I'm not sure I understand the reply, I'm asking specifically about the "code" -32015 vs -32000 for an execution error. When a revert occures, the response is an error, which contains an error code, and if you're trying to determine "did the node error out on this request? Or was this a genuine reply?" then the error code matters. I'm not the developer of the linked |
Yeah it's true in Geth the generic error code So here we return the concrete the revert reason. Developers can distinguish the error types via it? |
That would be fine if all of the clients were doing the same thing, but they're not. The code is different, as is the "message" and when dealing with APIs parsing a string message with a regex or whatever is far less ideal than checking the error code. |
It looks like maybe that error code improvement proposal would solve the problem (eventually?) I don't know, I'm really just playing middleman here between client implementations and tools. |
Looks very strange to me -- it adds another layer of error codes inside the error codes. I think it would be more realistic to come to consensus about which JSON-RPC error codes in the "reserved space" of |
It needs standartisation - ideally as an EIP. Then be added to tests. |
In comparing a revert error from an
eth_call
between nodes, I noticed that Geth returns a generic(?) error code during a revert. Where as Nethermind returns a specific error code, and I THINK Parity/OpenEthereum is also returning the same error code as Nethermind. I'm wondering why Geth doesn't?The Parity/OpenEthereum line referencing the specific error code is here (I think):
https://github.com/openethereum/openethereum/blob/main/rpc/src/v1/helpers/errors.rs#L41
The Nethermind line is here (I think):
https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Nethermind.JsonRpc/ErrorType.cs#L91
The Geth errors.go file does not seem to have a similar error code, so I get the generic -32000:
https://github.com/ethereum/go-ethereum/blob/master/rpc/errors.go
Unfortunately, I was given this curl command from someone else while investigating an error and OpenEthereum doesn't seem to like it, so I only have outputs from Geth and Nethermind, I only looked at OpenEthereum code to see if I could find a reference to that specific error code, and I could. I cannot with Geth searching github.
Here's a sample POST body
Here's the result from Geth, as you can see it's a generic error code:
Here's the result from Nethermind:
While Google searching, I did find a stackexchange referencing the same 32015 error code, from Infura, on Kovan, so I'm guessing that Parity/OE would agree on the error code if I could query it 😄
Anyway, should the error code be 32015 for a revert of this nature?
The text was updated successfully, but these errors were encountered: