This guide explains Bitcoin Core reindex-chainstate 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 0.13.0 split reindexing into block-file discovery and validation phases and introduced reindex-chainstate for rebuilding the UTXO database while retaining the existing block index. It is useful when block files and their index are considered sound but chainstate needs reconstruction or benchmarking.
- Why it matters: reindex-chainstate is a focused UTXO reconstruction tool introduced in Core 0.13. It is safest after diagnosis, with enough block history, independent wallet protection and readiness checks that prevent incomplete nodes serving production.
- Current position: Bitcoin Core 0.13.0 split reindexing into block-file discovery and validation phases and introduced reindex-chainstate for rebuilding the UTXO database while retaining the existing block index.
Bitcoin Core reindex-chainstate in simple English
Bitcoin Core reindex-chainstate: Unlike full reindex, reindex-chainstate does not rebuild the block index from raw blk files. It uses the known block catalogue and replays blocks to create chainstate.
Simple example
A node operator is checking Bitcoin Core reindex-chainstate. Health checks must use validation progress, best header, best block and chainwork instead of treating a running process or responsive RPC as service readiness.
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.
- UTXO:
- An unspent transaction output: a piece of bitcoin that can be used as an input to a later transaction.
- Node:
- A computer running Bitcoin software that checks data and communicates with other peers.
What is reused
Unlike full reindex, reindex-chainstate does not rebuild the block index from raw blk files. It uses the known block catalogue and replays blocks to create chainstate. The distinction saves the discovery phase but assumes that retained index and block-file mapping are usable.
What is rebuilt
Chainstate represents the current unspent transaction output set and is derived by connecting the selected valid chain. Rebuilding repeats transaction and script validation according to release settings, subject to supported shortcuts. It does not reconstruct private keys, labels or missing wallet metadata.
Diagnosis before action
Database corruption, changed validation settings or a controlled benchmark may justify the operation. Wrong datadir, disk exhaustion, missing pruned blocks, permissions, failing hardware or wallet errors require other responses. Preserve exact startup errors and storage health evidence before replacing state.
Pruning implications
A pruned node may not retain all historical blocks needed for a complete local replay. Version-specific startup logic may redownload data or reject the requested path. Estimate peak block, undo, index, chainstate and temporary storage rather than final pruned size, and keep an independent recovery node.
Two-phase operator visibility
Core 0.13 distinguished reindexing blocks on disk from processing blocks on disk. Reindex-chainstate focuses on processing the known blocks. Health checks must use validation progress, best header, best block and chainwork instead of treating a running process or responsive RPC as service readiness.
Wallet and service boundaries
The rebuild does not require overwriting wallet.dat. Stop wallets, pools, deposit monitors and template services from acting on an incomplete node. Preserve wallet backups separately and ensure failover cannot become a competing writer while the primary rebuilds.
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 reindex-chainstate?
Bitcoin Core reindex-chainstate: Unlike full reindex, reindex-chainstate does not rebuild the block index from raw blk files.
For Bitcoin Core reindex-chainstate, what should a beginner know about what is reused?
Unlike full reindex, reindex-chainstate does not rebuild the block index from raw blk files.
For Bitcoin Core reindex-chainstate, what should a beginner know about what is rebuilt?
Chainstate represents the current unspent transaction output set and is derived by connecting the selected valid chain.
For Bitcoin Core reindex-chainstate, what should a beginner know about diagnosis before action?
Database corruption, changed validation settings or a controlled benchmark may justify the operation.
Conclusion
reindex-chainstate is a focused UTXO reconstruction tool introduced in Core 0.13. It is safest after diagnosis, with enough block history, independent wallet protection and readiness checks that prevent incomplete nodes serving production.
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.