question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

debug_traceTransaction sometimes returns no trace steps when on a forked chain

See original GitHub issue

Expected 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:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
haltman-atcommented, Aug 24, 2020

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.

0reactions
haltman-atcommented, Oct 26, 2020

OK, I’ll let you know if I see this again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trace API Endpoints - Alchemy Docs
Replays all transactions in a block returning the requested traces for each transaction. trace_replayTransaction, Traces a call without making the call, ...
Read more >
debug_traceTransaction RPC method - QuickNode
Debug Trace Transaction. Returns all traces of given transaction (Trace Mode required). Supported chains for debug_traceTransaction. ETH.
Read more >
Tracing EVM transactions - Chainstack Support
Basics. To trace a transaction on a Geth archive node, you must use the debug_traceTransaction method. You can run the tracing directly in...
Read more >
arXiv:2005.08278v2 [cs.CR] 23 Oct 2020 - BlockSec
trace transaction to replay arbitrary transactions in the exact manner as it was executed on the network. However, this method is not scalable....
Read more >
Official Go implementation of the Ethereum protocol
If you'd like to contribute to go-ethereum, please fork, fix, ... The command returns Error: The method eth_getCompilers does not exist/is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found