Loading market data...

Bitcoin Core Cuts Optional Transaction Index Size by 61%

Bitcoin Core Cuts Optional Transaction Index Size by 61%

Bitcoin Core merged a redesign of its optional transaction index that slashes the database size by about 40 GB — from roughly 66 GB to 26 GB on a mainnet test, a 61% reduction. The change, merged via pull request #35531 on Aug. 15, applies only to the -txindex database, not the blockchain or other node data.

A leaner index

The txindex lets operators look up any transaction by its full ID without scanning the entire chain. For those who run it, the storage bill has been a real burden. The new format packs the data much tighter: a 5-byte salted SipHash prefix paired with a 6-byte suffix for block sequence and offset, plus full transaction ID verification to prevent collisions. It's a more compact layout, and it shows.

But the saving doesn't come automatically. To capture the full 40 GB reduction, operators have to recreate the index. Existing indexes remain readable, but they keep the larger footprint. And downgrading to an older Bitcoin Core version after rebuilding would require yet another rebuild — the compact format isn't readable by previous releases.

The rebuild tradeoff

That one-time rebuild isn't a free ride, but the numbers look favorable. In the contributor's test, rebuilding the index took 1 hour 19 minutes, down from 1 hour 50 minutes with the old format. Lookups, meanwhile, stayed fast at about 0.2 milliseconds. So you end up with a smaller database and faster rebuilds, at the cost of a maintenance window and a commitment to stay on the current software.

Why the size matters

Bitcoin's full node data is already large, and the optional txindex adds another layer for anyone who wants fast transaction-by-ID queries. That database isn't needed to validate blocks, but it's a common fixture for exchanges, block explorers, and other services. Cutting it by more than half changes the storage math for those operators — especially on machines where every gigabyte counts.

The change is now in Bitcoin Core's master branch, so it'll ride into the next release. Operators who want the savings will need to plan a reindex when they upgrade. For everyone else, the index stays the same — just bigger than it has to be.