2

I am running private geth node and I am wondering if there is any way to find the root cause of transaction exception. When I send the transaction, all I can see is:

transaction failed [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ]

And when I run the same transaction in hardhat network, I get more details:

VM Exception while processing transaction: reverted with panic code 0x11 (Arithmetic operation underflowed or overflowed outside of an unchecked block)

Is it possible to get the same info from my geth node?

ekimpl
  • 449
  • 6
  • 11

1 Answers1

2
  • The revert reason is extracted using transaction replay, see the example implementation. This sets requirements for what data your node must store in order to be able to replay the transaction. See your node configuration and detailed use case for further diagnosis.

  • Your node must support EIP-140 and EIP-838. This has been case for many years now so it is unlikely your node does not support this.

  • Unless a smart contract explicitly reverts, the default reverts (payable function called with value, math errors) JSON-RPC error messages depend on the node type and may vary across different nodes

  • Hardhat is internally using Ganache simulated node, not GoEtheruem

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
  • 1
    Hi Mikko, Using the links you provided, I have replayed the transaction, but it seems unhandled exception in the transaction cannot be handled that way. There is no result to parse for the reason code it seems. It works very nice however for manual reverts. The lesson I learned is that ganache or hardhat have better error handling and I should develop/check the erros there. Also using remix or truffle to debug helps as well. Thanks for help. – ekimpl Jan 10 '23 at 15:36