Wallet Architecture
Wallet Backup and Recovery
What a backup has to preserve
A complete backup preserves two things: the secret material that produces the keys, and the description of the scripts those keys control. The first is usually a seed phrase encoded under BIP 39. The second is a descriptor, or the information needed to reconstruct one. A backup that carries only the first is a backup of the keys, not of the wallet, and whether it is sufficient depends entirely on whether the restoring software can guess the second.
For a simple single-key wallet following a standard path, the guess is usually correct and the seed alone is enough. The restoring software tries the common conventions, finds the addresses, and the balance appears. That success is what makes the assumption so widespread. It is also what makes the failure so surprising when it happens, because the same procedure that worked for one wallet produces an empty result for another.
The cases where the guess fails are not exotic. A multisig wallet needs the other participants' public keys and the threshold, none of which is in the seed. A wallet using a non-standard derivation path needs that path. A wallet with a timelocked recovery branch needs the descriptor that names it. In each case the seed is correct and the funds are recoverable, but the backup is incomplete.
How a restore actually proceeds
A restore reconstructs the wallet by deriving keys from the seed and then scanning the chain for outputs that match the scripts those keys control. The scan is what produces the balance, and it is why the descriptor matters: the wallet can only find outputs whose scripts it knows how to build. If the descriptor is wrong or incomplete, the scan looks in the wrong place and finds nothing.
The scan also has to decide how far along each branch to look. A wallet that has issued a thousand receiving addresses needs the restore to check at least that many, and the convention is to scan until a run of unused addresses is found. A restore that stops too early will miss funds received at a later address, which is another way a correct seed can produce an incomplete result.
This is why the descriptor and the derivation path, covered on the descriptor page and the derivation page, are treated as part of the backup rather than as implementation details. They are the information that turns a set of keys into a wallet that can find its own funds.
The failure modes
The first failure mode is an incomplete backup: the seed is preserved but the descriptor is not, and the restore cannot find the scripts. The second is a mistyped backup: a single wrong word in a seed phrase produces a valid but different wallet, and the checksum on a descriptor exists to catch the equivalent error there. The third is an untested backup, which is the most common of all — a backup that has never been used to perform a restore is a backup whose sufficiency is unknown.
The remedy for the first two is to preserve the descriptor alongside the seed and to verify both by transcription. The remedy for the third is to perform a restore on a spare device before relying on the backup, which is the only way to discover that the backup is incomplete while the funds are still accessible. A backup that has been tested is worth considerably more than one that has not.
There is also a failure mode that no backup can address: a seed that is stored where someone else can read it. A backup is a secret, and the same property that makes it sufficient to restore the wallet makes it sufficient to steal it. The custody arrangements that manage that risk are covered on the self-custody page.
Sources and references
The description of the seed encoding, the descriptor requirement and the restore procedure is taken from the relevant BIPs and the Bitcoin Core documentation. No specific wallet is endorsed.
- The mnemonic seed encoding. Bitcoin, BIP 39: Mnemonic Code for Generating Deterministic Keys: defines the word list, the checksum and the seed derivation that a phrase-based backup relies on.
- The descriptor a restore needs. Bitcoin Core, Support for Output Descriptors in Bitcoin Core: documents the complete script description that a restore requires alongside the seed.
- The key hierarchy a restore reconstructs. Bitcoin, BIP 32: Hierarchical Deterministic Wallets: defines the tree that a restore walks to regenerate every key the wallet used.
Related reading
- Wallet ArchitectureHow a wallet is built: key derivation, descriptors, signing models and recovery.
- HD Wallets & DerivationHow one seed produces a tree of keys, and what a derivation path actually selects.
- Output DescriptorsHow a wallet describes the scripts it can spend, and why descriptors replaced ad-hoc import formats.
- Watch-Only WalletsHow a wallet can track balances and build transactions while holding no spending key.
- HomeThe state of Bitcoin, in reference form.
- MarketThe largest assets by market capitalisation, with Bitcoin given the lead.