Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
I operate a full node on an embedded system with datadir being on a local SSD but the blocks are stored on an external USB-HDD, which is often referred to be a well balanced compromise of speedy chainstate tracking and heavy blockchain data.
When setting up new nodes I usually build bitcoind from source and for a quick upstart I use to attach the USB-HDD containing the blocks to it, which saves the system from the initial blockchain download.
This particular time I needed an UI version and after running into dependency issues for compiling, I installed the current (v27.0.0) snap for Ubuntu. To reuse the existing blocks, I symlinked ~/snap/bitcoin-core/common/.bitcoin/blocks
to the mounted blocks directory and allowed snap to use external mounts with snap connect bitcoin-core:removable-media
.
bitcoin-core.qt starts, re-scans the blocks and then prunes my mounted blocks directory.
If bitcoin-core assumes pruning to be enabled by default, at least it should have asked for confirmation to delete blocks it did not download.
Expected behaviour
bitcoin-core should track which blocks it actually downloaded and only prune those. Blocks that were provided externally should not be deleted or at least should require a user’s confirmation.
Steps to reproduce
- have an external HDD containing full blockchain
- install snap of latest bitcoin-core (here: v27.0.0)
- allow snap using external HDD with
snap connect bitcoin-core:removable-media
- symlink
~/snap/bitcoin-core/common/.bitcoin/blocks
to the mounted blocks directory - run bitcoin-core.qt
- observe that blocks are pruned on external HDD
Relevant log output
No response
How did you obtain Bitcoin Core
Package manager
What version of Bitcoin Core are you using?
v27.0.0
Operating system and version
Ubuntu 24.04 LTS
Machine specifications
No response