Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Private key lost after wallet restore

See original GitHub issue


I re-installed my computer and now wanted to restore my DeFi wallet.

  • I installed DeFi App 2.1.4 and restored my wallet with my mnemonic seed (24 words) (working fine)
  • I waited until the wallet was fully synchronized (working fine)
  • My ETH (-Token) are all there
  • Now it shows only 13 DFI instead of ~1600.
  • The 1600 DFI are on this address 8F6jenzMBEsiogBmgB9AMDcQJ4EAvCRCns

If I type getaddressinfo 8F6jenzMBEsiogBmgB9AMDcQJ4EAvCRCns it shows: "ismine": false

The private key for the address 8F6jenzMBEsiogBmgB9AMDcQJ4EAvCRCns has not been generated while restoring the wallet.

Any idea what I can do?

  • I already re-installed DeFi App 2.1.4 and tried again, and also installed 2.1.3 and tried there, also no success.
  • I did not make any backup of the old DeFi wallet as only the mnemonic seed is needed to generate all private keys. Windows 10 Pro 2004 app.log binary.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (6 by maintainers)

github_iconTop GitHub Comments

PhilippRiethcommented, Jan 9, 2021

I can’t answer all your questions, but UTXO rescans/rebuilds the blockchain and searches for any transactions that contain addresses you own, so it can show you your full balance (Is this correct?).

As @izzycsy mentioned, it’s good practice to backup the seed + the do backup wallet as there could always be bugs in the code

Well, backup wallet is not a requirement, but sometimes you’ll never know what kind of bugs might happen, so I feel it’s sort of a safety net to do backups every now and then. Personally, I do so before I updating the app (eg. to v2.1.5).

The 24 words should be enough to backup, if the wallet works correctly.

@salomonkarsten I still recommend to do the getaddressinfo <your-address> "is mine": true/false check. This can always be done, even with a not fully synced blockchain. If it says true for all addresses, just wait until it’s fully synced and check with listaccounts {} true true true and gettokenbalances {} true true and getbalance your token/coin balances.

PhilippRiethcommented, Jan 9, 2021

Do you know the address on which your coins are on? If so, type getaddressinfo <your-address> in the CLI for each of your addresses and check if it says "ismine": false or "ismine": true.

  • If it says true, you still do have access to the coins on that address, and it just doesn’t display your funds correctly in the app
  • If it says false, you do not have the private key to the address anymore, thus you are not able to access funds on that address

Edit: if it says "ismine": true for your addresses, your problem is probably to related to the problem described in this issue.

It is not 100% clear yet if you are able to restore all private keys in the wallet.dat file with your 24 word seed.

Your 24 word seed is pretty much just one large private key, from which you are able to generate lots of child private keys (millions). For more info google Bitcoin HD-Wallet (BIP-32).

24 words -> extended private key -> lots of child private keys -> public key -> address (legacy or standard format, see DeFi wiki)

To me it seems like that not all private keys (addresses used) are generated via the extended private key. Private keys which are not generated via the extended private key (24 words) are only stored locally in the wallet.dat file.
That’s why that file currently more important than the 24 words.

With the extended private key you are able to restore some private keys (access to addresses). What the wallet restore progress does is, it generated ~2000 private keys + address (m/0'/0'/0' to m/0'/0'/999' and m/0'/1'/0' to m/0'/1'/999') from your extended private key (24 words), and stores them in your wallet.dat file. The wallet should then use only address from those that have been generated via the ext. priv. key.

It currently seems like that some addresses used by the app are not part of the 2000 generated ones from the ext. priv. key. That means, once you lose the wallet.dat file you won’t be able to restore the private keys for those addresses again.

I have no proof that my claim is true! I’m still testing and trying to replicate the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Private Key Recovery — How to Recover Your Funds If You ...
Once the recovery key and recovery seed have been securely stored, they are permanently deleted from the smartcard. In the event of wallet...
Read more >
How to Recover Your Wallet if Your Private ... - Cointelegraph
SovereignWallet uses zero-knowledge encryption to enable its users to recover their private keys by downloading the app on another smartphone ...
Read more >
So You Lost Your Private Keys... Now What? | Enjin Blog
Lost private keys are a nightmare scenario in blockchain, stripping you of your ability to import or restore your wallet onto new devices...
Read more >
What do I do if I lost my Private Key?
Please take note that if a private key is lost, there is no way to either recover it or to regenerate it. However,...
Read more >
How to Recover Your Funds If You Lose Your Bitcoin Wallet
First, you'll need to import the private key into a wallet such as Electrum, after which you can send the coins to your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found