This guide explains Bitcoin Core txindex in plain English. It focuses on what the subject is, why it matters and what a beginner should remember.
TL;DR
- What it is: Bitcoin Core txindex maintains a database mapping every known confirmed transaction identifier to its block location, enabling arbitrary historical getrawtransaction lookups. A normal full node still validates every block without this index.
- Why it matters: txindex is an optional application index, not a requirement for full validation. Enable it only for show historical-query needs, with planned reindexing, storage, RPC security and recovery evidence.
- Current position: Bitcoin Core txindex maintains a database mapping every known confirmed transaction identifier to its block location, enabling arbitrary historical getrawtransaction lookups.
Bitcoin Core txindex in simple English
Bitcoin Core txindex: Without txindex, Core can answer for mempool transactions and transactions whose block context is supplied or otherwise available through wallet and recent-state paths, depending on release.
Simple example
A node operator is checking Bitcoin Core txindex. It does not improve consensus validation and should not be enabled merely because the node is called full.
Key terms in plain English
- Bitcoin Core:
- Widely used software that validates Bitcoin and can provide wallet, network and operator tools.
- RPC:
- A command that software sends to a node to request information or a local action.
- Consensus:
- The shared rules full nodes use to decide whether blocks and transactions are valid.
- Mempool:
- A node’s changing local collection of valid, unconfirmed transactions.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
What the index adds
Without txindex, Core can answer for mempool transactions and transactions whose block context is supplied or otherwise available through wallet and recent-state paths, depending on release. Txindex adds a global historical lookup map. It does not improve consensus validation and should not be enabled merely because the node is called full.
Application requirements
Explorers, audit tools and legacy services may request arbitrary transaction IDs without block hashes. Wallets and mining template software often do not need a global index. Capture real RPC calls and retention requirements before accepting the operational cost.
Enablement requires reindex
Core 0.12 detected a changed txindex state and required reindex to rebuild the database. Adding the flag is therefore not an instant feature toggle. Plan validation time, peak disk, maintenance and application unavailability, and verify completion before sending historical queries.
Pruning incompatibility
The 0.12 option explicitly rejected txindex with prune mode because indexed locations would refer to removed block data. Later capabilities must be checked by version. Do not promise both minimal storage and universal historical retrieval without a separate archival service and explicit interface.
Storage and performance
The index consumes extra database space and writes during sync and block connection. Query workloads add random reads and RPC response cost. Benchmark on representative storage with the same cache and concurrent services, then monitor latency, compaction, free space and shutdown duration.
Security and data exposure
Arbitrary transaction lookup can expand what an RPC client can enumerate. Bitcoin data is public, but internal access patterns, wallet association and query logs can be sensitive. Keep RPC private, authenticate clients, rate-limit at an appropriate layer and sanitise support evidence.
How specialists test it
Developers test the proposal with made-up data on an isolated test network. They check normal cases and deliberately invalid cases. Different implementations should reach the same result before anyone relies on the proposal.
Frequently asked questions
What is the main point of Bitcoin Core txindex?
Bitcoin Core txindex: Without txindex, Core can answer for mempool transactions and transactions whose block context is supplied or otherwise available through wallet and recent-state paths, depending on release.
For Bitcoin Core txindex, what should a beginner know about what the index adds?
Without txindex, Core can answer for mempool transactions and transactions whose block context is supplied or otherwise available through wallet and recent-state paths, depending on release.
For Bitcoin Core txindex, what should a beginner know about application requirements?
Explorers, audit tools and legacy services may request arbitrary transaction IDs without block hashes.
For Bitcoin Core txindex, what should a beginner know about enablement requires reindex?
Core 0.12 detected a changed txindex state and required reindex to rebuild the database.
Conclusion
txindex is an optional application index, not a requirement for full validation. Enable it only for show historical-query needs, with planned reindexing, storage, RPC security and recovery evidence.
Primary sources
Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.
Join the ASIC Mining Discussion
Members can read and join the discussion
Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.
Membership helps us protect the discussion from spam and keep answers useful.