Feat: Allow using txindex with pruning #35240

issue cen1 opened this issue on May 7, 2026
  1. cen1 commented at 8:10 PM on May 7, 2026: none

    Please describe the feature you'd like to see added.

    Use case: I run an indexer but only care about blocks 30 days and newer.

    I need to use -txindex but can't use pruning because they are incompatible and node refuses to start if both are set.

    Except.. they are not really as far as I can understand. AI explained it like this:

    • txindex is a pointer to a raw block in file
    • pruning deletes the whole file
    • thus there is a fundamental issue that we end up with pointers pointing to deleted data

    But for my use case this is completely irrelevant. Indexer will initially index the 30 days, then index from tip. Blocks older than 30 days will never be accessed again so the fact that the underlying file was deleted and txindex gracefully fails is completely fine.

    So it seems to me the enforcement is essentially artificial and this could be allowed for people who want it and understand the consequences. Obviously can't change the current behavior but could hide it under extra force flag.

    Hopefully the information is correct, otherwise I'd gladly be educated.

  2. cen1 added the label Feature on May 7, 2026
  3. maflcko commented at 6:34 AM on May 8, 2026: member

    If you are only interested in a small subset of transaction ids that map to a block hash, you can just keep track of them in a wallet, or externally. Then, use the getrawtransaction block hash option.

  4. cen1 commented at 9:08 PM on May 8, 2026: none

    I'll look into it, ty.

  5. marshalokos commented at 10:45 AM on May 10, 2026: none

    I'm not interested in a small transaction so can you fix it for a better one

  6. marshalokos commented at 12:33 AM on May 11, 2026: none

    I want to see the balance and functionality

Labels

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

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