Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing error: wallet birthday ealrier than prune data #1542

Closed
aglkm opened this issue Nov 21, 2024 · 2 comments
Closed

Confusing error: wallet birthday ealrier than prune data #1542

aglkm opened this issue Nov 21, 2024 · 2 comments

Comments

@aglkm
Copy link

aglkm commented Nov 21, 2024

I switched to pruned bitcoin node recently and got this error after trying to use my wallet.
I was surprised that it was an issue, since I thought Sparrow should work fine with pruned node, just older transaction history won't be scanned. So I decided to revert back to full node.
Then I decided to google a bit and found out I could ignore the error and continue using pruned node with sparrow as is.
So the error confused me in a way that I thought that was indeed an error and sparrow can't continue to work, but it appears I could ignore it.

I would suggest to make it clear that this is not an error, but a warning instead and add more explanations so the users can understand that they still can continue using the wallet with pruned mode node.

@craigraw
Copy link
Collaborator

Then I decided to google a bit and found out I could ignore the error and continue using pruned node with sparrow as is.

I'm not sure where you read this, but it's not applicable to your situation. Yes, you can prune blocks if Bitcoin Core has already scanned them for transactions for a particular loaded wallet. But if you create a new wallet with a birthdate (or set an existing wallet's birthdate) before the oldest pruned date, you'll get the message you describe.

In order to build wallet history/balance, Bitcoin Core must scan the unpruned blockchain from the birth date of the wallet (the date of the first transaction into the wallet) to the present day. If it cannot do so, there may be information missing, and the wallet balance is not reliable.

@aglkm
Copy link
Author

aglkm commented Nov 25, 2024

That was an old wallet synced with the full node.
Then I decided to switch my node to prune mode and loading this wallet got me the error.

That's a surprise for me that a wallet can't work with the pruned node, because I thought that pruned node keeps full UTXO set and should be able to build the wallet's balance.
I found a very similar question about connecting wallet to a pruned node:
https://bitcoin.stackexchange.com/questions/111758/connecting-a-wallet-to-a-pruned-node

I see there the following comment, seems there's a workaround...:
It sounds to me like the user was connecting their Sparrow Wallet to their own local pruned node. Assuming that they trust the node because they have synced it themselves, a thin client could theoretically use dumptxoutset and then scan that, couldn’t they? –
Murch
Commented Jan 30, 2023 at 19:24

Another similar question:
https://bitcoin.stackexchange.com/questions/121849/loading-wallet-produces-last-wallet-synchronisation-goes-beyond-pruned-data-af

With the 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.

So, I understand now that the wallet can't work with the pruned node if this node syncing with the network separately from the wallet.
But if the wallet is always loaded during the node syncing, then it should work.

These nuances are new for me.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants