I have a node synched in normal mode up until number=5143444

Node started with

geth --datadir "./"
--maxpeers 100 
--maxpendpeers 10 

I'm trying to test the geth traces (compared to parity traces) but it seems I cannot get old transactions.

I've tried running trace on a recent transaction and it works

> debug.traceTransaction("0x59ae735c0291ec79460968d01dbd5b4adf007571bfaa308b8ab1005bb5e3f500")
  failed: false,
  gas: 21000,
  returnValue: "",
  structLogs: []

But if I try running trace on an older transaction (from block 1580796), I get this

> debug.traceTransaction("0x8e5b38db03e0941677ba65275d78fe18df999c11a7be1921831082121ae73390")
Error: required historical state unavailable
    at web3.js:3143:20
    at web3.js:6347:15
    at web3.js:5081:36
    at <anonymous>:1:1

I know with parity I need to specifically set tracing and archive on:


And this creates a HUGE database. Is there something similar for geth? The command line options don't seem to have anything about this


In order to have available all of the information you need to sync your node with --syncmode full

  • Hi there, I tried the following command but still got the same error: geth --cache=1024 --rpc --rpcapi "eth,net,web3,debug" console --syncmode full. Any idea on that? – lllllllllllll Nov 28 '18 at 16:52
  • Was the node fully synchronized when you tried it? – Daniel Luca CleanUnicorn Nov 29 '18 at 10:05
  • Yes, I use eth.syncing to check the current block, then check a block that is order than the current one. – lllllllllllll Nov 29 '18 at 10:16

You must set gcmode=archive when start geth.

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.