Migration to Descriptor Wallets

The technical support subforum.
Forum rules
Do you have trouble running Riecoin software? To integrate Riecoin software in your project? Not sure where to start for your next Riecoin project? Ask here!
Be sure to give details about your issues, and more importantly to have properly read the instructions! Do some investigation first, tell us what you have tried to do so far, show us your configuration files if applicable,...
Requests that show no effort from your side will get you a caution Image.
Post Reply
User avatar
Pttn
Forum Staff
Forum Staff
Posts: 222
Joined: 2021-02-18 21:32:13
Location: Switzerland
Miner Score: 54.969
Contact:

Migration to Descriptor Wallets

Post by Pttn »

If you used Riecoin Core up to and including 0.21, you certainly have Legacy Wallets (unless you explicitly created Descriptor Wallets on 0.21). These wallets are obsolete and their support will eventually be removed, so please move your funds from old wallets to Descriptor Wallets starting from now.

Here is a guide explaining how you can do this in Riecoin-Qt. You should be able to figure out if you are using command line, but you can still ask if unsure.

Firstly, check if you are not already using Descriptor Wallets. For this, you must use Use Riecoin Core 22.03 or more recent. In Windows > Console, type "getwalletinfo", and if you see the mentions ""format": "sqlite" and ""descriptors": true", you are good. Do that for all you wallets in the top left drop down list.

Otherwise, it means that you have a Legacy Wallet that should be moved. Here is one way to move funds to a Descriptor Wallet.

- Use Riecoin Core 22.03 or more recent;
- Go to File > Create Wallet;
- Give a name to the new wallet, leave the Disable Private Keys and Make Blank Wallet options unchecked;
- The new wallet will be created and you should be able to access it via the Overview page's top right Drop Down List (and you should also see your old wallet(s));
- Select your new wallet in the Drop Down List. You will see 0 RIC in this wallet, this is normal;
- Go to the "Receive" page and click on the "Create new receiving address" button. Copy-paste the new Riecoin address somewhere;
- Select an old wallet in the Drop Down List, and send all your coins to this new address. Repeat this with any wallet your had (you can of course also create more addresses or more Descriptor Wallets, just remember to not forget to select the correct wallet).

You now successfully moved your funds to a Descriptor Wallet. Be sure that you never use any address from old wallets again. Then, you can close old wallets by selecting them and doing File > Close Wallet, close Riecoin Core, and delete their files (be careful to not delete the wrong files).

If for some reason, you want to reuse an existing Bech32 address, this becomes a bit more complicated. You can dump the private key of an address from a Legacy Wallet by going to Windows > Console, choosing the right wallet in the top left Drop Down List, and executing the command

Code: Select all

dumpprivkey ric1...
with your Riecoin address. This will give you a string of 64 hexadecimal characters, which is your private key. If you instead get the message "This type of wallet does not support this command", then you are actually already using a Descriptor Wallet and don't have to do any migration (or you picked the wrong wallet in the Drop Down List).

Then, create if needed a new Descriptor Wallet, choose it in the console's Drop Down List, and get the Descriptor Checksum using

Code: Select all

getdescriptorinfo "wpkh(...)"
with your private key inside wpkh(...). Finally, take the Checksum from the "checksum" field (don't use the one in the "descriptor" field!) and import the private key to the Descriptor Wallet with

Code: Select all

importdescriptors '[{"desc": "wpkh(...)#checksum", "timestamp":0}]'
using your private key (and not the public descriptor shown in the getdescriptorinfo call). The wallet will rescan the blockchain for transactions, this can take some time. Be sure to check that the correct address has been imported in your Receiving Addresses.

In a Descriptor Wallet, you can retrieve your Private Descriptors by running

Code: Select all

listdescriptors true
And save them somewhere then reimport them if needed later with importdescriptors. listdescriptors/importdescriptors replace the old dumpprivkey/importprivkey commands.
Riecoin developer
Stelo.xyz pool operator
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest