2

What's the best way to get the revert reason for a historical failed transaction using Web3.py and an Erigon archive node? The method shown in a recent article doesn't seem to work reliably.

So for example transaction 0x2b6e98bbecaf182c47ab21db7d379e216c3431c8e4ef5d13d9f6e390f1cc6e89 on Etherscan failed with reason "Fail with error 'Transaction too old'". But when I try replaying the transaction myself, I get the following:

{'code': -32000, 'message': 'insufficient funds for gas * price + value: address 0x3Ebf59161F2e3344d22FA9aE19aBE087AC11c6C1 have 4799611000000000 want 767628934000000000'}

It looks like perhaps it's replaying the transaction against the current state rather than the correct block height (12955068). I've tried supplying the correct block height both as a positional parameter (as in the example given in the article) and by using block_identifier as a keyword argument, but I get the same result. What's going on here?

pintail
  • 21
  • 1

0 Answers0