debug_traceTransaction sometimes returns no trace steps when on a forked chain
See original GitHub issueExpected Behavior
The debug_traceTransaction
method should consistently return trace steps.
Current Behavior
Sometimes, when running on a forked chain, the debug_traceTransaction
method returns an empty list of trace steps, even though the actual list of trace steps was nonempty. This seems to happen both for transactions before and after the fork. For a fixed transaction though, within a single Ganache instance, it seems to either always happen or never happen.
Steps to Reproduce (for bugs)
Unfortunately, I can’t consistently reproduce this problem. Start Ganache with a forked chain and try debugging some transactions from before the fork, or make some transactions after the fork and try debugging those. Sometimes it’ll happen, sometimes it won’t.
For what it’s worth, though, if you want to try it with a transaction from before the fork, one particular transaction I encountered the error with is transaction 0x6a86b051ad13bcf8a4ebfc33f6ccdacced818bd2de3149e7566e9f55cc0fab64
on the Goerli testnet. Note that sometimes when I’ve started Ganache this transaction will return no trace steps, while other times it works fine. However, as mentioned above, within a single instance of Ganache it seems to either work or fail consistently.
Context
I was trying to debug transactions on a forked chain. Not sure what more there is to say about that. I personally was trying to do this as a test of the debugger, but from what I hear this is indeed something actual users do with our debugger.
Your Environment
- Version used: Ganache CLI v6.8.2 (ganache-core: 2.9.2)
- Operating System and version: Release Linux Mint 19.1 Tessa 64-bit
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
I was using the debugger. Initially this caused errors but I later altered the debugger to simply warn you rather than causing errors when this occurs. The reason I say there were no trace steps was because
trace.steps
, where we store them, was equal to[]
when inspected. (I didn’t actually inspect the raw RPC return, but if the trace result were entirely absent rather than being present but empty, this would cause other debugger errors, so I think we can rule that out even though I didn’t directly inspect it.)For repro steps, you can just use
truffle debug <txHash>
, assuming you can find a transaction where this occurs. If the trace steps are empty the debugger will (now) warn you about this on startup.OK, I’ll let you know if I see this again!