Zcoin Blog

How to Upgrade Your Legacy Zcoin Wallet to a HD Wallet

By July 17, 2019 No Comments

When we upgraded our Bitcoin base from 0.8 to 0.13 in late 2017, our wallets also became hierarchical deterministic (HD) wallets. This means that all addresses generated in the wallet are based on one seed which they can be derived from. HD wallets are also a prerequisite for seed phrases which can be used as a wallet backup. The reason why Zcoin never had seed phrases is that it is challenging to make mints work with the HD wallet structure. We also didn’t feel like a backup is complete without the mints.

Starting from version, Sigma mints are now part of this structure. This means that you will not have to back up your wallet with every mint or spend which is a big step in terms of user-friendliness. If you have created your wallet on a 0.13.x version, there is nothing you need to do to enjoy these benefits. If you are, however, a long-time Zcoin user from way back before the 0.8 → 0.13 upgrade, you might have to upgrade your wallet to an HD wallet to be able to use the Sigma feature.

How to Upgrade

    1. Create a backup copy of your wallet.dat file. You can either do this via the menu (File > Backup wallet…) or directly copy the file from your data folder.
      Depending on your operating system (OS), the data folder can be found here:
      Linux: ~/.zcoin
      macOS: ~/Library/Application\ Support/zcoin/
      Windows: %appdata%\zcoin
      If you have trouble finding the folder on macOS, please check this guide.
    2. Go to the debug console (Help > Debug console…) and unlock your wallet with walletpassphrase “yourpassphrase” 120. Make sure to include the quotes in the command
    3. Now type dumpwallet /path/to/file.txt on Linux and macOS or something like dumpwallet c:\somefolder\wallet.txt on Windows and hit Enter. Carefully read the output of the command and copy the one-time authorization code (OTAC). This is part of our anti-scam feature which we introduced last year.
    4. Use the dumpwallet command to export all your private keys to a text file by typing dumpwallet /path/to/file.txt xXxXx (adjust according to OS). Instead of the xXxXx, place the OTAC which you have copied in step 3
    5. Close your wallet and delete or rename the wallet.dat file
    6. Open your wallet again. This will create a new wallet.dat file.
    7. Go back to the debug console and type importwallet /path/to/file.txt. This will trigger a rescan of your wallet which takes a while
    8. Now go to Settings > Encrypt wallet… and assign a new password to your wallet. To complete the encryption, your wallet has to be restarted. Once the wallet is restarted, you should see all your coins and be able to use the Sigma feature.

Having your private keys stored in plain text on your computer can be security risk. After you are done with the upgrade, please make sure to delete the text file with the wallet backup!