Post
Topic
Board Development & Technical Discussion
Merits 4 from 1 user
Re: Best practices for 2013 wallet
by
Forsyth Jones
on 18/04/2025, 21:00:27 UTC
⭐ Merited by vapourminer (4)
What does this do specifically? Because you mentioned it will be "loaded". What is loaded? I would imagine, this just loads the wallet normally, but there is an additional step here:
nc50lc is referring to the restoration of the wallet.dat file. Bitcoin Core has an option called restore wallet; when selecting the wallet.dat file, that same file will be copied into the "wallets" folder of Bitcoin Core. What is loaded is the wallet, in this case, your restored wallet.dat.

For the online laptop, importing the descriptors of the public keys of the addresses via importdescriptors is necessary for it to function as a watch-only wallet and signing PSBT transactions is more flexible in descriptor wallets. That's why nc50lc suggested that you create a new wallet without private keys (watch-only) based on descriptors.

If you don't use a descriptor wallet in the wallet.dat that will stay on the online laptop, it won't be possible to create PSBTs that communicate with the offline wallet.dat wallet (which must also be a descriptor wallet), because wallets with the same architecture (descriptor wallet) will have keys that communicate using the same derivation path as the wallet that will sign the transaction.

So I don't get it. What is loaded if the wallet requires that you export the keys? Why is this step necessary? The addresses are legacy addresses (p2pkh). I just don't understand what im doing there. I think im being confused. This is just to export the public keys to create a watch-only wallet on the online wallet im assuming? So this means that "File->Restore" is all I need to do to have the private keys ready.
The dumpwallet command will dump all the private keys and addresses (p2pkh) from the wallet.dat file to a new file that you specify as the destination path. Example:
Code:
dumpwallet "/home/Takuma_Sato/documents/bitcoin-core-wallet-backup-keys-2025-04-18.txt".

The line addresstype=legacy in the bitcoin.conf file keeps the address generation in the old format (p2pkh) and in the file dumped by dumpwallet, the addresses that you specified in addresstype=legacy/bech32/p2sh-segwit... will appear.

It will be used to import the keys into other wallets or use it to form descriptors to be imported into a descriptor-based wallet.dat, with or without redeem script (e.g., segwit or multisig addresses like p2wpkh-p2sh). It is a complete backup of all addresses contained in the wallet and obviously must be encrypted when you finish using it.

I may have been confused with the descriptor thing, which required some more convoluted migration process. Why are they going to force this? Why not just keep it backwards compatible? That just introduces extra steps to guarantee you eventually screw up. Also I don't need anything but legacy addresses, everything else for me is just clutter.
I'll leave that one for nc50lc or others to answer.