3

How do I run a pruned Bitcoin Core node on linux indefinitely without running into this wallet error? I know it's possible from the Bitcoin Core app on Windows but I'm not sure how to achieve it on linux.

Like the following question, I am running into "last wallet synchronisation goes beyond pruned data" every few days on a linux Bitcoin Core pruned node

Wallet loading failed: Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex

bitcoin.conf:

prune=550
listen=1
maxconnections=10
blocksonly=1
maxmempool=5
dbcache=4
debug=prune

It's possible I kill'd it improperly and it's also possible it had an unclean shutdown from an oom kill.

Still, I would think something as important as a wallet would have a sensible recovery mode that didn't involve downloading the whole blockchain when you really just maybe need the few most recent gigabytes.

I tried reindexing, as the error suggested, and it wiped all my blockchain data and started downloading everything from 2009.

Luckily I had made a backup of the blockchain data and I knew I could get a copy from around the wallet creation time from github blockchain downloads.

As suggested on the web, the "rescan" (now rescanblockchain) is supposed to be used in this situation but when trying it wouldn't let me specify a blockheight earlier then the data I had ("Can't rescan beyond pruned data. Use RPC call getblockchaininfo to determine your pruned height.") The whole point as a user is to go out on the blockchain and download only what's needed to bring my wallet up to date so this error seems to defeat the purpose of my situation.

To sum up, based on my experience with the Bitcoin Core Windows app, I know it's possible to run a pruned node indefinitely but I'm not clear how this is achieved with the linux version.

Theory 240212: I've been letting Bitcoin Core run without having the wallet loaded and after some time it prunes out old data but it hasn't updated the wallet so when I next load the wallet the data from which the wallet could sync is no longer available. Experiment: Always load wallet when Bitcoin Core is running. Result: I included wallet=wallet in the confs to ensure wallets were always loaded when running the node and it's been more than a week and wallets are still operating correctly in pruned mode.

1 Answer 1

2

As the error message says, the blocks that the wallet needs to rescan are no longer known by your node as they have been pruned away. There are only two ways to avoid this error: turn off pruning, or keep the wallet loaded. The wallet can only receive information about blocks if it is actually loaded, just being on disk in the data directory will not magically update its contents with transactions from new blocks, it needs to be loaded.

2
  • I believe you are right about this and will mark your response as the answer when I confirm with my node: "or keep the wallet loaded. The wallet can only receive information about blocks if it is actually loaded, just being on disk in the data directory will not magically update its contents with transactions from new blocks, it needs to be loaded."
    – Shovas
    Feb 12 at 23:12
  • Still looking good a week later when auto-loading wallets from the conf
    – Shovas
    Feb 19 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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