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

Pruning keeps getting reenabled #709

Open
hebasto opened this issue Feb 7, 2023 · 0 comments
Open

Pruning keeps getting reenabled #709

hebasto opened this issue Feb 7, 2023 · 0 comments
Labels
Bug Something isn't working

Comments

@hebasto
Copy link
Member

hebasto commented Feb 7, 2023

Expected behavior

I want my Bitcoin Core node to never prune the blockchain.

Actual behavior

Occasionally, Bitcoin Core will enable the pruning option. This causes it to prune the blockchain, and forces me to resync when I disable it. I started seeing this in 0.19 and it still persists in 0.20. It may also be related to my moving to a new computer which upgraded me to Catalina. I'm not really sure.

To reproduce

I think it might be related to the fact that my data directory is on an external hard drive. If I start Bitcoin Core before mounting in the drive, it will popup the dialog as if it is my first time starting Bitcoin Core, asking me where to store the block chain. In the dialog, the datadir location is defaulted to put it in the location where my external hard drive mount would be, like /Volumes/Drive/Bitcoin. If I then mount the drive and choose next in the dialog, the sync works, but pruning is enabled and it immediately prunes the blockchain. I can go into the settings at this point and uncheck pruning, but at that point, it requires a full resync. And it ends up being enabled again the next time I start Bitcoin Core. Needless to say, this is extremely annoying and makes Bitcoin Core almost unusable for me.

I even tried setting prune=0 in my bitcoin.conf file, which is on the external drive, but it has no effect.

I suspect what is happening is that pruning is enabled by default, and since it can't find my datadir when it launches, Bitcoin Core thinks that it is doing a fresh sync and sets it to true. This setting is then not updated, even from the bitcoin.conf (which itself lives on the external drive) once that datadir is loaded. The fact that it remembers where the datadir is implies that some settings are stored locally, though I can't really tell where. Is it possible for me to store my no-prune setting locally as well?

Note that I used to do this exact workflow of opening Bitcoin Core before mounting my drive all the time in previous node versions and macOS versions, and it never enabled pruning on me.

(as an aside, I feel like Bitcoin Core should be smart enough to recognize that a datadir in /Volumes on macOS is an external drive, even when it doesn't currently exist).

System information

Bitcoin Core 0.20.0 macOS GUI version. Downloaded from https://bitcoincore.org/.

macOS Catalina 10.15.5.

Contents of /Volume/Drive/Bitcoin/bitcoin.conf:

server=1
dbcache=4096
rpcport=8332
prune=0

Moved from bitcoin/bitcoin#19291.

@hebasto hebasto added the Bug Something isn't working label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant