Allow index in pruned mode (e.g. -blockfilterindex) #15867

issue MarcoFalke openend this issue on April 22, 2019
  1. MarcoFalke commented at 1:22 pm on April 22, 2019: member

    Indexes can be turned off an on between restarts and they are initially synced on their own thread.

    Both are a potential reason they could “lag behind” and thus they appear incompatible with pruned mode. However, if they only lag by MIN_BLOCKS_TO_KEEP, we could allow them to catch up on startup. If they lag behind by more, the background thread might just fetch the blocks from the network?

    See also #14121 (review)

    Motivation to maintain indexes in pruned mode is that they can be serve to other peers (p2p), or over rpc, or even be used by the own wallet.

  2. MarcoFalke added the label UTXO Db and Indexes on Apr 22, 2019
  3. MarcoFalke added the label Brainstorming on Apr 22, 2019
  4. MarcoFalke added the label P2P on Apr 22, 2019
  5. jonasschnelli commented at 7:25 am on April 29, 2019: contributor

    Maybe also introduce a function that pauses IBD/catch-up in case an index gets close to lagging > MIN_BLOCKS_TO_KEEP.

    That functionality could also be useful for external listeners (ZMQ, RPC),… things like lightning daemons (if external applications would have an option to report back their sync state/hash of sync-tip).

  6. pstratem commented at 1:05 pm on June 6, 2019: contributor
    how does the wallet deal with falling behind in pruned mode?
  7. jonasschnelli commented at 1:38 pm on June 6, 2019: contributor

    how does the wallet deal with falling behind in pruned mode?

    This is not part of this PR. But I have a branch (you can search for it) where the wallet would request the blocks filtered out and are not available on disk (due to pruning) from the p2p network.

    If you meant to ask how wallets deal with that situation in the current master, they would just fail to load (can lead to shutdown during init) if they fall behind prune depth.

  8. pstratem commented at 6:05 pm on June 8, 2019: contributor
    @jonasschnelli yeah, i’m suggesting looking at how the wallet handles this for an idea of how to do so with the filters
  9. prusnak commented at 7:58 am on June 18, 2020: contributor
    It makes sense for a pruned node to have the blockfilterindex available for non-pruned blocks.
  10. MarcoFalke commented at 8:57 am on February 18, 2021: member
  11. MarcoFalke closed this on Feb 18, 2021

  12. DrahtBot locked this on Aug 18, 2022

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: 2024-11-17 18:12 UTC

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