Merge bitcoin/bitcoin#35568: txospenderindex: disable bloom filters to optimize disk usage

6d0ea4cf5b doc: add release notes (Andrew Toth)
a2b1c86903 txospenderindex: disable bloom filters to optimize disk usage (Andrew Toth)

Pull request description:

  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 4h37m, and the resulting db was 85.0 GiB.
  On this branch, a full sync took 3h57m, and the resulting db was 80.9 GiB.
  So this is a sync speedup of 39 minutes (1.17x), and a disk space reduction of 4.2 GiB.

ACKs for top commit:
  l0rinc:
    ACK 6d0ea4cf5b
  sedited:
    Re-ACK 6d0ea4cf5b
  fjahr:
    Code review ACK 6d0ea4cf5b

Tree-SHA512: fb88b9f9a16ff31562d388e3fd9fd9590c7864dbe6093cd9430ecbce9cdc3f2a8d3fc612aade743d26ad4c6eca1e5dc9b3f1ca28d75caea1209e5c784895405d
This commit is contained in:
merge-script
2026-07-12 12:39:54 +02:00
7 changed files with 14 additions and 11 deletions

View File

@@ -1,9 +1,8 @@
Indexes
-------
- The transaction output spender index (`-txospenderindex`) now stores one byte
less per spender entry for newly indexed blocks. Existing indexes remain
compatible and no action is required. To apply the same saving to entries
indexed before upgrading, stop the node, delete the
- The transaction output spender index (`-txospenderindex`) now uses less disk
space. Existing indexes remain compatible and no action is required. To reclaim
the space for data indexed before upgrading, stop the node, delete the
`<datadir>/indexes/txospenderindex/` directory, and restart with
`-txospenderindex` enabled to rebuild it.
`-txospenderindex` enabled to rebuild it. (#35634, #35568)