<p>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.</p>

CC BY-SA 4.0
2024-02-12T23:12:16.790Z
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
CC BY-SA 4.0
2024-02-19T20:34:47.460Z
Still looking good a week later when auto-loading wallets from the conf
Shovas
CC BY-SA 4.0
2024-02-12T23:06:55.123Z
2024-02-12T23:06:55.123Z
Ava Chow
<p>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.</p>
<p>Like the following question, I am running into &quot;last wallet synchronisation goes beyond pruned data&quot; every few days on a linux Bitcoin Core pruned node</p>
<p><a href="https://bitcoin.stackexchange.com/questions/102200/wallet-loading-failed-prune-last-wallet-synchronisation-goes-beyond-pruned-dat/102411#102411?newreg=f61d762e0f49491aa15e74726a51185d">Wallet loading failed: Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex</a></p>
<p>bitcoin.conf:</p>
<pre><code>prune=550
listen=1
maxconnections=10
blocksonly=1
maxmempool=5
dbcache=4
debug=prune
</code></pre>
<p>It's possible I <code>kill</code>'d it improperly and it's also possible it had an unclean shutdown from an oom kill.</p>
<p>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.</p>
<p>I tried reindexing, as the error suggested, and it wiped all my blockchain data and started downloading everything from 2009.</p>
<p>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.</p>
<p>As suggested on the web, the &quot;rescan&quot; (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 (&quot;Can't rescan beyond pruned data. Use RPC call getblockchaininfo to determine your pruned height.&quot;) 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.</p>
<p>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.</p>
<p>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.</p>

<bitcoin-core><wallet><linux>
Loading wallet produces "last wallet synchronisation goes beyond pruned data" after a few days on a pruned bitcoin core node
Shovas
# Loading wallet produces "last wallet synchronisation goes beyond pruned data" after a few days on a pruned bitcoin core node

(Asked by: username_0 on 2024-02-12)

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](https://bitcoin.stackexchange.com/questions/102200/wallet-loading-failed-prune-last-wallet-synchronisation-goes-beyond-pruned-dat/102411#102411?newreg=f61d762e0f49491aa15e74726a51185d)

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.

**Tags:** bitcoin-core, wallet, linux


---

## 1 answers

### Answer by username_1 on 2024-02-12. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: 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."  
> **username_0**: Still looking good a week later when auto-loading wallets from the conf  

---

