Skip to content

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

Transaction Index (txindex)

Network & Protocol

Definition

The transaction index, enabled with -txindex=1, is an optional LevelDB database that records where every transaction lives inside the block files on disk. By default Bitcoin Core only indexes blocks and the unspent-output set, so it can validate the chain and track your own coins without ever needing to find an arbitrary historical transaction by its ID. The txindex adds that capability: with it built, a node can answer getrawtransaction for any transaction ever confirmed, not just unspent or wallet-relevant ones.

What it stores and where

The index lives at indexes/txindex/ and maps each transaction ID to the block file and byte offset where that transaction is stored. It does not duplicate transaction data; it is a pointer table over the existing blk*.dat files. Building it requires reading the whole chain once, which adds time and a few gigabytes, and once enabled it must be kept on for the node to maintain it.

Who needs it

Block explorers, accounting and analytics tools, Lightning implementations that look up funding transactions, and electrum-style servers generally require txindex because they must resolve transactions outside any single wallet. A node that simply guards your own coins does not need it. Note that txindex is unavailable on a pruned node, because pruning deletes the old block files the index would point into.

For other optional indexes, see the coinstats index and the block filter index.

In Simple Terms

The transaction index, enabled with -txindex=1, is an optional LevelDB database that records where every transaction lives inside the block files on disk. By default…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Mining Glossary

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Compare Miners