Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: oleh_13 on February 18, 2018, 01:27:32 AM



Title: Importing wallet.dat
Post by: oleh_13 on February 18, 2018, 01:27:32 AM
Hi everyone.

I need your help. My friend died in a car accident a month ago. Before that, he traded cryptocurrencies a lot. His wife asked if I can help to restore access to his wallets and withdraw all funds. So she gave me a flash drive. I found private keys for eth, xem, and other currencies. But there was also a file called 'wallet.dat' on his computer, but I don't know for what exactly it is. I have never encountered with bitcoin and other cryptocurrencies before, but I have some experience in IT, so I tried to help her.

I googled and found that this file contains private keys and other info, so I need to import this into a wallet and that's it. But I don't even know if it is bitcoin or litecoin or etc. I tried electrum, but it says "Cannot load wallet: 'utf-8' codec can't decode byte 0xe8 in position 52: invalid continuation byte". I've also tried bitcoin-qt, but it also fails:"wallet.dat corrupt, salvage failed".

Also I found a python script called pywallet.py(https://github.com/jackjack-jj/pywallet) and tried to run it, but it throws an exception:
bsddb.db.DBInvalidArgError: (22, 'Invalid argument -- BDB1009 ./wallet.dat: unsupported btree version: 10')

`file wallet.dat` returns "wallet.dat: Berkeley DB (Btree, version 10, native byte-order)"

I don't know what I can do with this file. Is it corrupted? Or I am trying to import it in a wrong way? I really appreciate any help you can provide.


Title: Re: Importing wallet.dat
Post by: achow101 on February 18, 2018, 02:21:58 AM
wallet.dat is the wallet file for wallets based on Bitcoin Core. Typically it refers to a Bitcoin Core wallet, but other coins that have clients based on Bitcoin Core will also create wallet.dat files. There's a good chance that it is for Bitcoin Core.

If the wallet cannot be opened in Bitcoin Core, it may be corrupted as is indicated by Bitcoin Core. You can try starting Bitcoin Core with the -salvagewallet option in order to attempt a wallet recovery. You should of course make a backup of the file before actually doing that.


Title: Re: Importing wallet.dat
Post by: oleh_13 on February 18, 2018, 02:47:09 AM
I tried to run it with -salvagewallet option, but client window just closes after launch and in db.log there is a message "path/to/wallet/wallet.dat: unsupported btree version: 10".


Title: Re: Importing wallet.dat
Post by: achow101 on February 18, 2018, 03:41:09 AM
I tried to run it with -salvagewallet option, but client window just closes after launch and in db.log there is a message "path/to/wallet/wallet.dat: unsupported btree version: 10".
How old is this wallet.dat file? What's the creation date?

A long time ago, the wallet.dat format was changed so very old wallets are not compatible with modern versions of Bitcoin Core. I suspect that is what you are running into here.


Title: Re: Importing wallet.dat
Post by: Foxpup on February 18, 2018, 03:50:36 AM
There's a good chance that it is for Bitcoin Core.
If it was, it was compiled with --with-incompatible-bdb, because BDB 4.8 uses Btree version 9, not version 10, hence the error. (I don't know if any altcoins are still using BDB 4.8; if not, it might be an altcoin wallet.)


Title: Re: Importing wallet.dat
Post by: achow101 on February 18, 2018, 04:35:32 AM
If it was, it was compiled with --with-incompatible-bdb, because BDB 4.8 uses Btree version 9, not version 10, hence the error. (I don't know if any altcoins are still using BDB 4.8; if not, it might be an altcoin wallet.)
Ah, I didn't know what the version BDB 4.8 was. If version 10 is for a more recent version of BDB, then he's probably using an altcoin, not Bitcoin. I doubt he would have compiled Bitcoin Core himself.


Title: Re: Importing wallet.dat
Post by: oleh_13 on February 18, 2018, 01:49:42 PM
I tried to run "strings wallet.dat" and I found there a string "name"EKZfyZF3SohMjXXXXXXXXXXXXsbAcqEM7" which looked like an address. So I googled it and it appears to be Espers address. Then I installed Espers wallet and imported this wallet.dat. But it still shows the same error "salvage failed"


Title: Re: Importing wallet.dat
Post by: cannycassiopeia on February 18, 2018, 03:20:37 PM
I tried to run "strings wallet.dat" and I found there a string "name"EKZfyZF3SohMjXXXXXXXXXXXXsbAcqEM7" which looked like an address. So I googled it and it appears to be Espers address. Then I installed Espers wallet and imported this wallet.dat. But it still shows the same error "salvage failed"

It is Espers. What you have there might be Version 1, it won't work with V2.  Download ESP1 Client for Windows, I don't know exact link. If you want ESP2, you need to swap it through Novaexchange.

If it's a hassle, you can try to sell it at Yobit. I think they still use ver 1.  ;D


Title: Re: Importing wallet.dat
Post by: teddy5145 on February 19, 2018, 12:33:48 AM
I tried to run "strings wallet.dat" and I found there a string "name"EKZfyZF3SohMjXXXXXXXXXXXXsbAcqEM7" which looked like an address. So I googled it and it appears to be Espers address. Then I installed Espers wallet and imported this wallet.dat. But it still shows the same error "salvage failed"

It is Espers. What you have there might be Version 1, it won't work with V2.  Download ESP1 Client for Windows, I don't know exact link. If you want ESP2, you need to swap it through Novaexchange.

If it's a hassle, you can try to sell it at Yobit. I think they still use ver 1.  ;D
Do not use Yobit or Bittrex, they are one of the worst exchange right now, your account might get locked up instantly after deposit.
For now, better to find and download Espers wallet v1 as Canny says and make sure it is not a fake malware wallet, if you can't find it try to contact the devs and explain your story, they might have it on their archive.
https://espers.io/

after successfully accessing the coin you can find exchanges here
https://bitcointalk.org/index.php?board=223.0

Sorry for your loss buddy, that's rough  :-\