0

I am trying to use the debug.traceTransaction API but got the following error:

>debug.traceTransaction("0x3684f071b34da1116282ee88a106a8f2a266d273ef7d8964957f65128fb58d77")

Error: transaction 3684f071b34da1116282ee88a106a8f2a266d273ef7d8964957f65128fb58d77 not found
    at web3.js:3143:20
    at web3.js:6347:15
    at web3.js:5081:36
    at <anonymous>:1:1

This transaction seems legit via the etherscan.io, and I am also syncing with the main network with the following command:

geth --cache=1024 --rpc --rpcapi "eth,net,web3,debug" console

Currently the progress is:

> eth.syncing
{
  currentBlock: 694850,
  highestBlock: 6788672,
  knownStates: 906699,
  pulledStates: 890731,
  startingBlock: 571445
}

Is it because on my local machine I haven't "synced" that block? Thanks.

1

Is it because on my local machine I haven't "synced" that block? Thanks.

Yes. It looks like you've synced up to block 694850, but the transaction you're looking for occurs in block 2469395. You'll have to wait until you've caught up to at least that block number.

  • Aha, I see the logic here. I was expecting the API can somehow extract the trace info via network.. But seems that it will be stored locally first. – lllllllllllll Nov 28 '18 at 14:51
  • But the problem is that even if I have pulled the node (I even add a new option --syncmode full), I always get error msg as : Error: required historical state unavailable. – lllllllllllll Nov 28 '18 at 15:05
  • Although the msg can be acquired via the web interface: etherscan.io/… – lllllllllllll Nov 28 '18 at 15:06
  • I'm not sure what you mean by "pulled the node." But you should be able to get the trace from your local geth node once it's been synchronized there. You might instead just want to connect to an existing public node (like Infura) and get it from them? – smarx Nov 28 '18 at 17:54
  • What I mean is that once I have synced that "block", I should be able to get traces of each transaction within that block. But it still doesn't work and show the error msg as Error: required historical state unavailable. – lllllllllllll Nov 28 '18 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.