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?
Try to modify the line number 60 in core/blockchain.go , by setting this constant:
triesInMemory = 128
And... God bless you.
If it doesn't work, let me know.