AFAIK Geth preserves states for the last 128 blocks by default. I would like to keep states for, say 10000 blocks (not turning myself into archive node). Is it possible?

  • 128? I thought it was 1,000 . – Nulik Jun 8 '18 at 13:34
  • Ethereum team has not yet solved the problem of pruning the state, once you sync your node, it will become an archival node from the block you joined the network – Nulik Jun 8 '18 at 13:35
  • Is there a way to become full archive node (sync with all previous blocks as well) ? – Red Wojak Jun 13 '18 at 8:51
  • you have to use geth 1.8 , pruning (supposedly) is now working in this version, but I didn't try it. – Nulik Jun 13 '18 at 23:32

Try to modify the line number 60 in core/blockchain.go , by setting this constant:

triesInMemory       = 128

to 10,000

And... God bless you.

If it doesn't work, let me know.

| improve this answer | |

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.