You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Hi hebasto, a work around would be to put a bitcoin.conf file in /Volumes/Drive/Bitcoin with prune=0 BEFORE mounting your external drive, that way if it hasn't been mounted Bitcoin Core will not try to prune. This file will be buried and ignored after your external drive mounts.
Another work around would be adding -prune=0 to whatever method you are launching Bitcoin, be that command line or a .desktop file.
The file that remembers where your custom datadir is $HOME/.config/Bitcoin/Bitcoin-Qt.conf on linux.
Setting prune=0 in there however will be ignored on first launch, unfortunately this is probably a bug, since it DOESN'T ignore the datadir= entry.
The Welcome GUI overrides everything except the bitcoin.conf of the chosen datadir and the command line parameters. But it doesn't read the bitcoin.conf to know the prune setting to use until after the datadir is selected.
So the checkbox about pruning in that welcome screen will ONLY reflect the command line -prune=0 option given to bitcoin-qt.
You might also make the mount point read only after putting a bitcoin.conf in there then bitcoin will error out if your External Storage has not been mounted.
Letting Bitcoin-Qt search for bitcoin.conf in $XDG_CONFIG_HOME/Bitcoin and reading it from your internal drive if present would resolve this issue. As is, bitcoin.conf is not read until after that choosedatadir window is dismissed. bitcoin/bitcoin#16733
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
:Moved from bitcoin/bitcoin#19291.
The text was updated successfully, but these errors were encountered: