THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Bitcoin Pruned Node Recovery: Reindexing, Chainstate Rebuilds, and Redownloads

permalink THAMER
#bitcoin#node-recovery#pruning#reindex

A pruned Bitcoin Core node validates blockchain history while retaining only a managed subset of historical block and undo files. This saves disk space but changes the available recovery paths when a database becomes damaged or a wallet requires an old rescan. Recovery planning must distinguish the node's derived state from irreplaceable wallet secrets.

Diagnose before rebuilding

Start by checking the node logs, available disk space, filesystem health and the installed Bitcoin Core version. If RPC is available, getblockchaininfo reports synchronization and pruning information. A missing historical block on a pruned node is not by itself evidence of corruption. A wallet rescan failure can simply mean that the requested starting point precedes retained block data.

Stop the node cleanly before changing its data directory. Preserve wallet backups, descriptors and configuration separately. Do not delete files merely because their names appear related to a reported error. A database failure can originate from storage hardware or permissions, and rebuilding on a failing disk may reproduce the problem.

Reindex versus reindex-chainstate

The reindex startup option rebuilds the block index and chainstate using available block files and obtains missing blocks as required. The reindex-chainstate option rebuilds chainstate from indexed block data without rebuilding the entire block index. Both can be expensive operations, and their applicability depends on the data available and the installed release.

On a pruned node, historical block files may no longer exist. A complete chainstate rebuild from genesis cannot rely only on the recent files. Bitcoin Core may require a full reindex and redownload rather than permit a chainstate-only rebuild. Consult the release-specific startup help and error messages before choosing a recovery command.

Wallet recovery is separate

Restoring a wallet backup does not automatically make old blocks available for rescanning. A descriptor and its private keys can restore spending authority, but complete historical discovery may require a node with the relevant blocks. A UTXO-set scan can help locate currently unspent outputs matching known scripts; it cannot reconstruct all spent transactions or automatically discover every possible derivation index.

Recovery checklist

Keep verified wallet backups outside the node data directory. Confirm the correct network and data path before restarting. Allow enough storage and bandwidth for synchronization, and monitor the node until it reaches the expected tip. Verify wallet balances and known outpoints only after relevant discovery and reconciliation have completed. Never interpret an incomplete scan as proof that funds are absent.

Primary references

Bitcoin Core startup and initialization: https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp

Bitcoin Core documentation: https://github.com/bitcoin/bitcoin/tree/master/doc

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects