3

I've kept the same config file and internal hard drive for my Bitcoin Core datadir for many years. I've updated to numerous new versions.

The other day, I reinstalled Windows on the system drive again. And thus reinstalled Bitcoin Core (v22.0.0) again. When it started up, I pointed it to the datadir on the other disk as usual.

Now I realize that it has deleted all of the blockchain data for the first time ever, leaving only 2 GB. It prunes by default to 2 GB now. And apparently, my config needed to have an explicit rule to tell it to not prune... which it of course didn't.

While I'm glad that I don't have to store all that stupid data anymore, it does make me question why they would enable this by default and actually delete existing data. Has pruning now reached such a level of stability that it's completely "safe" and there is no need to save the full blockchain anymore?

Or am I now running Bitcoin Core in "crippled mode"? Even though I did not actively set it to prune?

Randoll
  • 31
  • 1
  • Bitcoin Core will never prune on its own; it is not default. It must be configured, either through config file, command-lirn arguments, or the GUI settings window, to enable pruning. – Pieter Wuille Nov 29 '21 at 20:53
  • @PieterWuille No "prune" command in my config. – Randoll Nov 29 '21 at 21:04
  • 1
    Are you using `bitcoind` or `bitcoin-qt`? Have you checked the UI settings (they are separate from bitcoin.conf)? Is something about "prune" logged in debug.log? – Pieter Wuille Nov 29 '21 at 21:06
  • @PieterWuille `bitcoin-qt.exe`. Yes, the UI settings were and are set to prune at 2 GB, since that's now the default, but the bitcoin.conf is supposed to take precedence over the GUI settings. – Randoll Nov 29 '21 at 21:13
  • I thought GUI settings override bitcoin.conf, but I'm not entirely sure about that. Still, pruning is *not* the default as far as I know (it's not for me, in either bitcoind or bitcoin-qt, and I don't have any pruning related settings anywhere). – Pieter Wuille Nov 29 '21 at 21:34
  • @PieterWuille I don't know what to tell you. I have certainly not set up pruning in the GUI. – Randoll Nov 29 '21 at 21:38
  • I also don't know what to tell you, except that no, pruning is not on by default. – Pieter Wuille Nov 29 '21 at 21:39
  • @PieterWuille So I have a magical or compromised copy of Bitcoin Core, then? – Randoll Nov 29 '21 at 22:02
  • 2
    It appears I'm wrong. The "first run" dialog, when selecting a filesystem with less than a certain threshold available space, will suggest have pruning enabled by default. If you then click continue without turning it off, that becomes the saved GUI setting for Bitcoin-Qt. – Pieter Wuille Nov 29 '21 at 22:21

1 Answers1

2

This is a known issue and happened with me once: https://github.com/bitcoin-core/gui/issues/245

Pieter Wuille's last comment summarizes the issue:

The "first run" dialog, when selecting a filesystem with less than a certain threshold available space, will suggest have pruning enabled by default. If you then click continue without turning it off, that becomes the saved GUI setting for Bitcoin-Qt.

It would be resolved by a pull request in which settings for bitcoind and bitcoin-qt are unified. It can be helpful if you review, test and comment in the pull request as its lacking review and open since 2019.