pruneblockchain should be able to increase the size of pruned blockchain #24286

issue prusnak opened this issue on February 7, 2022
  1. prusnak commented at 3:00 PM on February 7, 2022: contributor

    Is it possible to update pruneblockchain command so it can also increase the size of pruned blockchain?

    It seems to me that now it is only able to decrease it:

    bitcoin@server:~$ bitcoin-cli pruneblockchain 650000
    error code: -8
    error message:
    Blockchain is shorter than the attempted prune height.
    
  2. prusnak added the label Feature on Feb 7, 2022
  3. carnhofdaki commented at 3:03 PM on February 7, 2022: contributor

    One can set higher -prune=### parameter and wait until the extra blocks get mined/downloaded. It is quite hard to un-prune without doing IBD (from the genesis block).

  4. prusnak commented at 3:05 PM on February 7, 2022: contributor

    It is quite hard to un-prune without doing IBD (from the genesis block).

    Should be much easier now that #20295 rpc: getblockfrompeer has been merged

  5. bitcoin deleted a comment on Feb 9, 2022
  6. pinheadmz commented at 2:28 PM on March 22, 2023: member

    I think both this issue and #19807 can be closed simply because after we erase undo data, there is no way to recover it without re-syncing from genesis.

    If a user wants to keep more data on disk like @carnhofdaki said, you can increase the -prune value and wait for it to fill up with new blocks.

    If a user just wants pre-prune block data for wallet rescans, I think using neutrino filters and getblockfrompeer would be a cool feature, see https://github.com/bitcoin/bitcoin/issues/21267

  7. furszy commented at 2:40 PM on March 22, 2023: member

    If a user just wants pre-prune block data for wallet rescans, I think using neutrino filters and getblockfrompeer would be a cool feature, see #21267

    yeah @pinheadmz, I would say to unify all this issues into a single one. So can send progress updates and we can make reviewers calls if the sub-projects require review.

  8. pinheadmz commented at 7:58 PM on March 23, 2023: member

    Ok, closing this for now as duplicate of #19807 which has a bit more active discussion. Will try to close that one as well in favor of #21267 if OP agrees. @prusnak please feel free to comment if you think we need to keep this one open as well.

  9. pinheadmz closed this on Mar 23, 2023

  10. prusnak commented at 8:08 PM on March 23, 2023: contributor

    Ack

  11. bitcoin locked this on Mar 22, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me