migratewallet RPC command. This process converts your existing wallet to use the modern descriptor format, enabling better organization, security, and compatibility with current features.
Why Migrate?
Migrating legacy wallets to descriptor wallets provides several benefits:- Better organization: Clear separation between different script types and purposes
- Improved compatibility: Better support for hardware wallets and external signers
- Access to new features: Native support for Taproot and other modern script types
- Standardized derivation: Uses BIP 44, 49, 84, and 86 standard derivation paths
- Future-proof: Descriptor wallets receive active development and new features
Before Migration
Create a Backup
Verify Wallet State
Check your wallet information before migration:- Current balance
- Number of transactions
- Whether the wallet is encrypted
- HD seed status
Migration Process
Themigratewallet RPC command handles the entire migration process:
What Happens During Migration
Automatic Backup Created
Bitcoin Core creates a backup of your original legacy wallet at
<wallet-name>-<timestamp>.legacy.bak in the wallet directory.Descriptor Wallet Created
A new descriptor wallet with the same name as your legacy wallet is created.
Keys and Scripts Migrated
All private keys and addresses from the legacy wallet are added to the new descriptor wallet using standard BIP derivation paths.
Migration Results
After migration, you may have up to three new wallets:Primary Descriptor Wallet
The main wallet with the same name as your legacy wallet:- Contains all your private keys
- Uses standard BIP 44/49/84/86 derivation paths
- Generates addresses using descriptor specifications
Watch-Only Wallet (if applicable)
<wallet-name>_watchonly:
- Contains all watch-only scripts from the legacy wallet
- Descriptor wallets separate watch-only from private keys
- Created only if legacy wallet had watch-only scripts
Solvables Wallet (if applicable)
<wallet-name>_solvables:
- Contains scripts the wallet knows about but doesn’t watch the corresponding P2(W)SH versions
- Relatively rare, only for specific legacy wallet configurations
Watch-Only-Only Migration
If your legacy wallet contained only watch-only scripts with no private keys:- Only the
<name>_watchonlywallet is created - The main descriptor wallet is not created
- The watch-only descriptor wallet will not have private keys enabled
After Migration
Verify Migration Success
Check that all wallets were created successfully:"format": "sqlite"(descriptor wallets use SQLite)- Balance matches pre-migration balance
- Transaction count is preserved
Create New Backups
Verify Address Generation
Generate a new address and verify it works:List Descriptors
View the descriptors now managing your wallet:- P2PKH (BIP 44) - Legacy addresses
- P2SH-P2WPKH (BIP 49) - Nested SegWit
- P2WPKH (BIP 84) - Native SegWit
- P2TR (BIP 86) - Taproot
Derivation Path Changes
Standard derivation paths used after migration:| Address Type | BIP | Derivation Path |
|---|---|---|
| P2PKH (Legacy) | 44 | m/44’/0’/0’ |
| P2SH-P2WPKH (Nested SegWit) | 49 | m/49’/0’/0’ |
| P2WPKH (Native SegWit) | 84 | m/84’/0’/0’ |
| P2TR (Taproot) | 86 | m/86’/0’/0’ |
Restoring Legacy Backup
If migration fails or produces unexpected results, restore from the automatic backup:Automatic Backup Location
The automatic backup is saved in your wallet directory:Restoration Process
Migration Edge Cases
Complex Script Configurations
If migration fails unexpectedly or seems incomplete:- Restore from backup
- Document your specific wallet configuration
- Report the issue on GitHub with details
- Consider manual migration for complex cases
Encrypted Wallets
Migration works with encrypted wallets:- The passphrase remains the same
- The new descriptor wallet uses the same encryption
- You’ll still need the passphrase for private key operations
Large Wallets
Migration of very large wallets (many keys/transactions) may take time:- Be patient and allow the process to complete
- Don’t interrupt the migration process
- The wallet remains accessible after migration
Best Practices
Testing Migration
For important wallets, consider testing migration first:Post-Migration Workflow
- Keep legacy backup: Retain the automatic backup for at least several months
- Create new backups: Backup all new descriptor wallets immediately
- Test transactions: Send a small test transaction to verify functionality
- Update documentation: Note that you’re now using descriptor wallets
- Monitor addresses: Verify that address generation works as expected
Migration Checklist
Before migrating:- Create manual backup of legacy wallet
- Verify current wallet balance and state
- Ensure Bitcoin Core is fully synced
- Note current wallet passphrase (if encrypted)
- Have sufficient disk space for new wallets
- Run
migratewalletcommand - Wait for process to complete
- Note any additional wallets created
- Verify migration success with
getwalletinfo - Check that balance matches pre-migration
- Create new backups of all descriptor wallets
- Test address generation
- Verify transaction history is intact
- Store legacy backup in secure location
Troubleshooting
Migration Fails
If migration fails:- Check error message for specific issues
- Verify wallet is not corrupted
- Ensure Bitcoin Core is updated to a recent version
- Try restarting Bitcoin Core and retrying
- Report unexpected failures on GitHub
Missing Funds After Migration
If funds appear missing:- Check all created wallets (main, watchonly, solvables)
- Wait for blockchain rescan to complete
- Verify transaction history is present
- Restore from backup if issues persist
Cannot Generate Addresses
If address generation fails:- Check that wallet is not watch-only unintentionally
- Verify wallet is unlocked (if encrypted)
- Use
listdescriptorsto confirm descriptors are present - Check for error messages indicating specific issues