You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, we only have a single custom error code: when eth_call or eth_estimateGas hits a revert, Geth returns error code 3
I have added a hive test to check this behavior and while other clients including Nethermind catch the revert and return an error, we do not all agree on the code in this situation
As a first step, I propose we come up with a list of error situations
Then we can assign the codes and add rpc-compat tests
Here I'm adding a new helper function that extracts the revert reason of
a contract call. Unfortunately, this aspect of the API is underspecified.
See these spec issues for more detail:
- ethereum/execution-apis#232
- ethereum/execution-apis#463
- ethereum/execution-apis#523
The function added here only works with Geth-like servers that return
error code `3`. We will not be able to support all possible servers.
However, if there is a specific server implementation that makes it
possible to extract the same info, we could add it in the same function
as well.
---------
Co-authored-by: Marius van der Wijden <[email protected]>
Like seen in this issue, there is no standard error code response for such errors.
My opinion is that depending on strings is futile. and we should possibly try to depend on error codes for tx failure errors instead.
Geth implementation:
https://github.com/ethereum/go-ethereum/blob/master/core/error.go
and here
https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction.go
and here
https://github.com/ethereum/go-ethereum/blob/master/core/txpool/errors.go
Neth implementation:
https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Nethermind.TxPool/AcceptTxResult.cs
and possibly other places as well.
The text was updated successfully, but these errors were encountered: