Pruned node: (Re)download of pruned block #19312

issue prusnak opened this issue on June 17, 2020
  1. prusnak commented at 6:03 PM on June 17, 2020: contributor

    Now, when a pruned block is requested via getblock the answer is:

    error code: -1
    error message:
    Block not available (pruned data)
    

    Would it make sense to add a possibility to (re)download the block so a pruned node can give a meaningful answer in this case as well?

    I can imagine two options on how to implement this: a) automatic - the block is redownloaded automatically when getblock on a pruned block is requested b) manual - new method downloadblock which will redownload the block and make it available to getblock again

    The size of the LRU cache for (re)downloaded blocks could be controlled via prunecache=X in bitcoin.conf or we can decide that the node will use up to e.g. 10% of prune capacity for these older blocks.

  2. prusnak added the label Feature on Jun 17, 2020
  3. mahnunchik commented at 7:04 PM on March 26, 2021: none
  4. prusnak cross-referenced this on Mar 26, 2021 from issue rpc: getblockfrompeer by Sjors
  5. prusnak commented at 11:40 PM on January 20, 2022: contributor

    This was more or less implemented in https://github.com/bitcoin/bitcoin/pull/20295

  6. prusnak closed this on Jan 20, 2022

  7. bitcoin locked this on Jan 20, 2023

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-05-19 06:53 UTC