-
Notifications
You must be signed in to change notification settings - Fork 680
Ganache v7.0.0: Javascript traces inside revert message #2133
Comments
Thanks for opening this. We'll look in to a solution for this ASAP. |
My hunch is that this is due to a change in the way Ganache v7 handles See this issue #1496 for more why this change was made. That said, after reviewing the above issue, I think we may need to rethink the data we are return, as we don't currently align with geth here, so you still won't be able to switch your testing infra back and forth between Ganache in geth, which was the main reason for the alignment. Geth returns Now there were reasons (mainly legacy reasons) we didn't completely align with Geth, but I'm thinking we should reevaluate those and treat this as a bug, as the intent was to align with Geth. The change we made won't actually help you simplify your testing code at all here, which was really the point! A fix will likely take some time (more than just a few days) as we'll likely need to fully understand the ramifications of this change within Truffle, and put the proper changes in place there, as well. Of course, I could be wrong about this hunch and we'll need to investigate further. Though if I am wrong, I think Ganache should still explore the alignment path I described above. As a temporary workaround you could change: if "error" in response_data and "data" in response_data["error"]:
error_data = response_data["error"]["data"]
elif "result" in response_data: # Ganache-cli
error_data = response_data["result"] to something like: if "error" in response_data and "data" in response_data["error"]:
if "result" in response_data["error"]["data"]:
# TODO: remove this Ganache-specific code once https://github.com/trufflesuite/ganache/issues/2133 is resolved
error_data = response_data["error"]["data"]["result"] # Ganache v7.0.0
else
error_data = response_data["error"]["data"]
elif "error" in response_data: # Ganache-cli v6
error_data = response_data["result"] |
Hi @davidmurdoch, thanks for the quick answer and for taking the time to go into our code and provide a custom solution! That fixed one of our issues! We will keep working on it as soon as |
Here is our It is currently a "Priority 2" issue which will be worked after these "Priority 1" issues are resolved: priority1 🚨 |
Thank you very much for all the feedback |
@Uxio0 Looks like we'll align fully with geth here, so you can expect 7.0.1 release fixing this issue later this week! |
Awesome, so fast! |
We are using ganache to test Gnosis Safe, and we are trying to update from v6 to v7, and we detected a weird behaviour. Even if
--chain.vmErrorsOnRPCResponse false
, when having arevert
message there are Javascript traces in there that prevent the parsing of the revert error:It's not easily reproducible as it involves deploying the Safe contracts https://github.com/gnosis/gnosis-py/runs/4897023415?check_suite_focus=true#step:10:370
Same behaviour and more easily reproducible when setting a low
maxFeePerGas
:The text was updated successfully, but these errors were encountered: