-
Notifications
You must be signed in to change notification settings - Fork 9
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
Geth reverts no longer being decoded. #1647
Comments
Taking a look. This is also a good opportunity to refactor the revert message detection into a shared crate I guess. |
Thanks! This helps a lot so I can look into the other Rinkeby issues we are seeing. |
Here is the JSON response if it helps: {"jsonrpc":"2.0","id":294,"error":{"code":3,"message":"execution reverted: SafeMath: subtraction overflow","data":"0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000"}} |
the response we used to get from openethereum in this case: {
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32015,
"message": "VM execution error.",
"data": "Reverted 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000"
},
} the response we get now {
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": 3,
"message": "execution reverted: SafeMath: subtraction overflow",
"data": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001e536166654d6174683a207375627472616374696f6e206f766572666c6f770000"
}
} I believe they are different because they come from different nodes as our staging environment used to only use openethereum and now also includes infura (which uses geth? https://github.com/ethereum/go-ethereum/blob/fba5a63afe0993da70896c763b4fdfa953e066ff/internal/ethapi/api.go#L893). In ethcontract we have node specific code for getting the revert reason and this code does not handle the new case. |
I think we have new OpenEthereum node versions since today, which is why it changed (just guessing, don't know for sure).
We already had code to handle Geth reverts in a hacky way (since the nodes behave differently when encountering reverts in an I imagine that the way Geth responds to But I completely agree that this should probably be fixed in |
Indeed this appears to be the case: It looks like Geth now distinguishes between success and failure for edit: Updated the issue title and description accordingly. |
Due to, recent updates, Geth revert messages aren't getting correctly decoded. This causes previously benign errors to no longer be considered benign and causes a bunch of alerts.
This is because Geth now distinguishes between success and reverts for
eth_call
s when it previously didn't.The text was updated successfully, but these errors were encountered: