txospenderindex: disable bloom filters to optimize disk usage #35568

pull andrewtoth wants to merge 1 commits into bitcoin:master from andrewtoth:txospenderindex-disable-bloom changing 5 files +9 −6
  1. andrewtoth commented at 2:34 PM on June 19, 2026: contributor

    LevelDB bloom filters are only consulted on Get point reads. This can be verified in https://github.com/bitcoin/bitcoin/blob/master/src/leveldb/table/table.cc#L224-L228. InternalGet is the only place that consults the filter, and it is only reached via a Get or Exists point read. The filters are never consulted for iterator seeks with an iterator created via NewIterator. txospenderindex only reads via iterator seeks, so building them is wasted effort and space.

    For a db as large as txospenderindex, this results in measurable performance and disk usage. On master, a full sync took 2h46m, and the resulting db was 94.5 GB. On this branch, a full sync took 2h32m, and the resulting db was 90 GB. So this is a sync speedup of 14 minutes, and a disk space reduction of 4.5 GB.

  2. DrahtBot commented at 2:34 PM on June 19, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35568.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35531 (txindex: use 5-byte siphash keys to optimize disk usage by andrewtoth)
    • #34132 (coins: drop error catcher, centralize fatal read handling by l0rinc)
    • #33324 (blocks: add -reobfuscate-blocks argument to enable (de)obfuscating existing blocks by l0rinc)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. txospenderindex: disable bloom filters to optimize disk usage
    LevelDB bloom filters are only consulted on Get point reads.
    They are not consulted for iterator seeks.
    txospenderindex only reads via iterator seeks, so building
    them is wasted effort and space.
    74dfc8ec49
  4. andrewtoth force-pushed on Jun 19, 2026
  5. sedited approved
  6. sedited commented at 7:12 PM on June 19, 2026: contributor

    Nice find, ACK 74dfc8ec49c7bb480dac0c785cc2aae1a5e3ca30


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-06-20 23:51 UTC

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