A hidden Bitcoin node database just shrank by 40 GB, but only if runners rebuild it

fiverr
Bybit


Bitcoin Core has merged a redesign of its optional transaction index that cut about 40 GB from the database in one contributor’s mainnet test. Operators using -txindex retain their existing indexes through an upgrade; capturing the full saving requires recreating the database.

Pull request #35531, merged into Bitcoin Core’s master branch on Aug. 15, reduced the author’s rebuilt mainnet txindex from about 66 GB to 26 GB. The roughly 61% reduction is confined to this optional index. Bitcoin’s blockchain and the rest of a node’s data directory remain outside the measurement.

Infographic comparing an old 66 GB Bitcoin Core txindex with a compact 26 GB txindex in one contributor's mainnet benchmark, showing 40 GB saved and rebuild time falling from 1 hour 50 minutes to 1 hour 19 minutes.Infographic comparing an old 66 GB Bitcoin Core txindex with a compact 26 GB txindex in one contributor's mainnet benchmark, showing 40 GB saved and rebuild time falling from 1 hour 50 minutes to 1 hour 19 minutes.

The code is merged upstream. Stable binaries follow a separate release process, and Bitcoin Core’s release index leaves the first version containing the change unspecified. Operators will need the migration notes for the release that ships it.

coinbase

Related Reading

Bitcoin Core considers dropping encrypted routing support as poor node health exposes users to eclipse attacks

How the smaller index works

Bitcoin Core’s -txindex option maintains a database for retrieving transactions by their full transaction ID. The old format stored each 32-byte transaction ID as a database key alongside transaction disk-position data.