[resolved] Decreds Disappeared After Recreating A Wallet

Discussion in 'Questions' started by chocanto, Feb 4, 2017.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. chocanto

    chocanto New Member

    Feb 4, 2017
    6
    0
    France
    Hello everyone !

    Something weird happened to me today. I had my wallet on a VPS that I didn't use anymore. So I've got the idea to "move" my wallet from my VPS to my PC by just recreating it from the seed.

    After the creation of my wallet from the existing seed, what a surprise, my balance show 0. Noting, nada.
    Worse, the first address of the wallet is not the same anymore.

    I thought that, using the same seed my addresses would be the same and that after the rescan my balance would be correct ?
    Is there anything I did not understand well ?

    Thank you for your help ! :)
     
  2. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    You are correct in assuming that the seed will create the same wallet... so something went wrong. Are you using the CLI tools or Paymetheus?
     
  3. chocanto

    chocanto New Member

    Feb 4, 2017
    6
    0
    France
    Well, I'm pleased to hear that. I'm not completely on the wrong side ^^
    So yes, I am using the CLI tools...
     
  4. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    Run dcrd and let it fully sync to the the latest block. Delete your wallet.db file which is in the hidden directory %APPDATA%\Local\dcrwallet\mainnet.

    Once dcrd is fully synced, create your wallet with the following command. (I'm not sure if the addridxscanlen is useful during wallet creation or only after it's created, but I use it every time I start dcrwallet):

    dcrwallet --addridxscanlen 50000 --create

    Verify you have entered your seed exactly the way you wrote it down. Once your wallet is created, start your wallet with the --addridxscanlen 50000 flag and let it scan through all the blocks.
     
  5. chocanto

    chocanto New Member

    Feb 4, 2017
    6
    0
    France
    #5 chocanto, Feb 5, 2017
    Last edited: Feb 5, 2017
    Thank you for your help.

    What I did :
    • I updated my dcrwallet binary (dcrd was 0.7.0-beta while dcrwallet was 0.7.0-alpha, could create problems)
    • I saw that dcrd complained about multiple block database, so I removed the "blocks_leveldb" one. In fact, it made dcrd process few blocks
    • After waited the full sync of dcrd, I deleted my wallet.db file then used "dcrwallet --addridxscanlen 50000 --create" to create a new wallet using my airdrop seed. Dcrwallet resynced the whole chain.
    • Launch dcrwallet with dcrwallet --addridxscanlen 50000

    This message displayed during the process :
    Code:
    Registering for transaction notifications for 42 address(es) and 0 output(s)
    But, using dcrctl, when I check my balance : 0
    Also when I try to see which address is being used :
    Code:
    > getaccountaddress default
    -4: there have not been any addresses used for this account
    I am starting to being scared ^^'

    PS : Also, for your information, this was my first address : DsesgHKTTcUxpjHNPGVCuHZwyv2aUEnUwvu
     
  6. chocanto

    chocanto New Member

    Feb 4, 2017
    6
    0
    France
    Ok so I remembered today that I had the brilliant idea to make a backup of my wallet.db before remove it.
    I restored it, launched my wallet and... surprise :
    While a simple getbalance give me :
    Also, my wallet is crying with this error (that is not returned when I create a new wallet from my seed) :
    Another thing that scares me :
    Nothing seems to be good right now...
     
  7. chocanto

    chocanto New Member

    Feb 4, 2017
    6
    0
    France
    Big news ! I managed to get my decreds back at home and to fix my corrupted wallet ! :D
    As it was pretty clear, my seed was not the correct one. I don't know what the **** I did, but the seed I have written down was completely different than my "real" seed. Maybe when creating the wallet on my VPS, who know.
    Well, so here is what I did :
    • I restored back my old corrupted wallet.db (the one that returned the "serialized extended key length is invalid" error)
    • After full sync of dcrd, I (temporarily) launched dcrwallet with the --unsafemainnet parameter
    • I executed
      to get my real seed from my corrupted wallet
    • (At this step I was felling very happy but also very dumb that my seed was incorrect. Note that this step is optional and highly depends of yourself)
    • I move the corrupted wallet.db to a backup and create a new wallet
    • During the creation, I used the seed returned from the getseed command
    • ...
    • Profit !
    Anyway, thank you David for your help ! May I reward you for it ? :)
     
  8. Shadowlance

    Shadowlance Full Member

    Jan 9, 2016
    220
    155
    Male
    Awesome, chocanto! Glad you got your coins back! Behold the power of backups :)
     
    chocanto likes this.
  9. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    Hey chocanto, I'm glad you got it working. You are very lucky to have found your old wallet file. If I recall correctly, the wallet.db file itself still contains your seed and would be vulnerable to exploiting the 'getseed' flag if someone had access to your computer. It must be a very old wallet file because I believe that feature was default very early on in Decred's development (need a fact check there).

    With that said, I would highly suggest you create a new wallet, write the seed and the hex key down on paper and keep it in a safe place, and then send all your coins to this new wallet.

    As for a reward, I will kindly refuse the offer but I thank you for your generosity!
     
    chocanto likes this.
  10. chocanto

    chocanto New Member

    Feb 4, 2017
    6
    0
    France
    @Shadowlance For every problem there is a backup solution... If a backup was done in time :p

    @David
    Yes it's true, but my wallet is secured with a passphrase, so even with access to my wallet.db nobody can get their hand on my seed without my passphrase (I hope).
    And also yes, it was a very old wallet (from the very beginning of decred development) and was the reason why I had a lot of errors when trying to do simple task (like create a new account for example).
    So I will follow your advise and move my funds to a new fresh wallet.

    I hope that this thread will help someone with the same problems as I encountered.
     

Share This Page