Pages:
Author

Topic: Recovering old wallet.dat (Read 939 times)

legendary
Activity: 2604
Merit: 2353
August 25, 2020, 08:37:51 AM
#43
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
Yes you're right it works...  Wink
But the adresses are all in legacy format while I have legacy and bech32 adresses in my wallet.
The private keys seem to be the same at least, so how can I display the adresses in the bech32 format please?
Choose BIP141 at the derivation path part, choose P2WPKH.
Yes this way I find them. ✔️

I'm assuming your wallet isn't using BIP84 since it's generating both? If it doesn't work out for you, try BIP84.
I don't know, it's just the bitcoincore wallet
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
August 25, 2020, 08:13:10 AM
#42
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
Yes you're right it works...  Wink
But the adresses are all in legacy format while I have legacy and bech32 adresses in my wallet.
The private keys seem to be the same at least, so how can I display the adresses in the bech32 format please?
Choose BIP141 at the derivation path part, choose P2WPKH.

I'm assuming your wallet isn't using BIP84 since it's generating both? If it doesn't work out for you, try BIP84.
legendary
Activity: 2604
Merit: 2353
August 25, 2020, 08:02:55 AM
#41
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
Yes you're right it works...  Wink
But the adresses are all in legacy format while I have legacy and bech32 adresses in my wallet.
The private keys seem to be the same at least, so how can I display the adresses in the bech32 format please?
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
August 25, 2020, 07:32:34 AM
#40
Huh
Where exactly please?
In which field?
Are you sure about that?
Yes. You can enter the master private key at: https://iancoleman.io/bip39/.

Scroll to BIP32 root key and paste your xpriv there. After that, scroll a bit further to change your derivation path to suit your needs.
legendary
Activity: 2604
Merit: 2353
August 25, 2020, 07:13:20 AM
#39
the master private key could be entered at iancoleman.io  
Huh
Where exactly please?
In which field?
Are you sure about that?
newbie
Activity: 13
Merit: 1
April 29, 2020, 05:18:10 PM
#38
Sorry about the radio silence, pandemic and school have been a bit distracting. I'll probably delete the block chain since I wont be needing it and use pywallet to try and extract the privkeys. Thank you all for the advice, I'll come back with the outcome.
newbie
Activity: 1
Merit: 0
April 19, 2020, 06:12:19 AM
#37
I've had success recovering old wallets using a combination of PhotoRec and Pywallet
Seems like you already have the wallet.dat, but if you are not sure if you have the correct one you can use PhotoRec to search the disk for wallets.

Then use Pywallet

1. Backup your wallet

2.
Code:
pywallet.py --dumpwallet --datadir c:\  --wallet=wallet.dat --recover --recov_device=C:\\wallet.dat --recov_size=416Gio --recov_outputdir=c:\

3. You might need to rename the output file as 'wallet.dat'

4. Place the new wallet in your bitcoin datadirectory

5. Start Bitcoin-QT with the --rescan flag



HCP
legendary
Activity: 2086
Merit: 4361
April 18, 2020, 11:57:43 PM
#36
Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was new to this machine. Does the dump keys command take data from all wallets directories or only the ones that have successfully been opened?

Since I was never able to open the wallet or even load it, I suspected that the key dump didnt even include it, but to be fair I have no idea how this all works.
Bitcoin Core only works on ONE wallet file at a time (unless you explicitly tell it otherwise)... generally, and by default, this will be whatever file is called wallet.dat in Bitcoin Core's "datadir"... just having your "old" wallet file in the directory is not enough, unless it is actually called wallet.dat

So, if Bitcoin Core never successfully opened the wallet.dat file... then there is simply no way it could have dumped the keys out.

If you are unable to open the "old" wallet.dat with Bitcoin Core... it crashes or gives and error... then try nc50lc's suggestion of the --salvagewallet command. If that doesn't work either... then your last resort is probably going to be attempting to dump the keys using PyWallet.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 18, 2020, 09:22:25 PM
#35
Since I was never able to open the wallet or even load it, I suspected that the key dump didnt even include it, but to be fair I have no idea how this all works.
Since there are a bunch of corrupted data in your block files,
try to run Bitcoin Core with a fresh data directory containing a new copy of your old wallet.dat, then open core while offline.
Create a folder to any directory other than the default, then set that temporarily in a bitcoin.conf file inside '%appdata%\bitcoin' folder.

Example (Windows):
  • Create a folder name "bitcoin_temp" to "D" drive.
  • Paste the copy of your wallet.dat inside that folder.
  • Open %appdata% (Win+R, type  %appdata%) then open Bitcoin folder.
  • Create a bitcoin.conf file inside, new->text doc->rename including the extension from "New Text Document.txt" into "bitcoin.conf".
  • Open it using a text editor and type datadir=D:\bitcoin_temp
  • Disable your internet and open Bitcoin-qt, then do the dumpwallet command.
Change the data directory depending where you created the folder.

If the wallet turned out corrupted, start bitcoin-qt with --salvagewallet.
  • Create a shortcut of bitcoin-qt, right-click the shortcut and select properties.
  • In the "target" add --salvagewallet at the end and apply/ok.
  • it should look like this: "C:\Program Files\Bitcoin\bitcoin-qt.exe" --salvagewallet
  • Then open Bitcoin Core using that shortcut.
newbie
Activity: 13
Merit: 1
April 18, 2020, 03:59:37 PM
#34
Personally, I suspect that this is not in fact an "old" wallet at all... but is in fact an empty wallet.dat that was generated fairly recently (within the last 3 years or so).

Its possible that the keys I extracted were of the blank wallets I created when first messing around with Bitcoin core before making this post. Hence why I asked a bit about how it extracts the private keys.

Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was new to this machine. Does the dump keys command take data from all wallets directories or only the ones that have successfully been opened?

Since I was never able to open the wallet or even load it, I suspected that the key dump didnt even include it, but to be fair I have no idea how this all works.
HCP
legendary
Activity: 2086
Merit: 4361
April 16, 2020, 09:29:49 PM
#33
Looking at the dump again, trying not to dox myself, I see the extended private master key and then the plethora of addresses and private keys before them, as well as an hdseed=1, reserve=1 and hdkeypath=m/0... on each line. My keys all start with K or L, don't see any 5's and my addresses all start with 3. The other problem I'm seeing is how ill copy and paste over 4000 strings into Electrum.
The wallet was made around 2012, and could have been used up until around 2015, which is when my brother gave me the laptop.

These two pieces of this puzzle just don't really fit together... "3"-type addresses are "P2SH" addresses and prior to SegWit being introduced were mainly used for "Multi Signature" addresses. However, Bitcoin Core did not produce these address types by default... indeed, creating MultiSig addresses in a Bitcoin Core wallet was a very manual task!

Also, HD wallet functionality was only introduced in Bitcoin Core v0.13.0... which was released on 23 August 2016!!! Shocked

So quite why a Bitcoin Core wallet.dat made in 2012 would have "3" addresses and an "hdseed" in it is very confusing. Huh NOTE that it is not possible to upgrade an "old" wallet to be "HD". You had to create a brand new "HD" wallet file.


Personally, I suspect that this is not in fact an "old" wallet at all... but is in fact an empty wallet.dat that was generated fairly recently (within the last 3 years or so).
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
April 16, 2020, 06:58:37 PM
#32
~snip~

Did you just paste the private keys to Electrum?

You mentioned earlier that the addresses of your backup start from "3" Am I right?

You need to add "P2WPKH-P2SH" when importing it to Electrum so that it will show the same addresses on Electrum.

Here's the sample:



The XXX must be your private keys.

Ow, it seems someone already mentions this.

Anyway, if you have the list of all 2000 addresses you can use the public key and check them if those addresses have balances.

You can use this tool https://bitcoin-wall.com/check/
Paste all addresses to check each address so that you can find which address that has balance before you import it to Electrum.

The alternative for bulk balance check http://www.homebitcoin.com/easybalance/
newbie
Activity: 13
Merit: 1
April 16, 2020, 06:11:43 PM
#31
What do you mean "identical"? Same addresses?

You've mentioned that it's an old wallet, how old is that exactly? wallet.dat older than 2017 can't have SegWit addresses.
And you should be informed that Altcoin wallet.dat might work when imported to Bitcoin Core but obviously won't have any balance or history.

Identical just as in, after importing all the keys, none of the tabs changed except for the addresses tab. I'll leave Electrum open for a while, to let it sync. The wallet was made around 2012, and could have been used up until around 2015, which is when my brother gave me the laptop.

Electrum shows what appear to be all 2000 "receiving" addresses in the appropriate tab and the green network icon. If these are the keys from the old wallet.dat then it is showing 0 transactions and balance for all balances.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 13, 2020, 09:13:26 PM
#30
Few side notes, In the keys dump file there is also 2000 strings, all starting with 0014, next to unique addresses.

Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was entirely new. Does the dump keys command take data from all wallets or only the open ones?
1. It must be your addresses' "redeem script" since those are P2SH-P2WPKH addresses.

2. Core should keep the old addresses even after changing the hdseed (like changed passphrase, sethdseed command, etc).
Newer keys/addresses however will have an issue with old backups if the wallet had changed the hdseed after that backup.

Awesome sauce, So i found a way in notepad++ and imported every single (2000) private keys into Electrum, but balance is empty and no history has shown. Matter of fact, Electrum looks identical, other than the fact that its a new wallet.
2000 addresses will take a while to update the history and balance, is Electrum properly connected (Green circle at the lower-right?).

What do you mean "identical"? Same addresses?

You've mentioned that it's an old wallet, how old is that exactly? wallet.dat older than 2017 can't have SegWit addresses.
And you should be informed that Altcoin wallet.dat might work when imported to Bitcoin Core but obviously won't have any balance or history.
newbie
Activity: 13
Merit: 1
April 13, 2020, 06:59:16 PM
#29
Then create an imported wallet to Electrum using "Import Bitcoin addresses or private keys" and paste them like this:
Take note that Electrum might need a few seconds to sync, minutes if it's your first time using it.

Awesome sauce, So i found a way in notepad++ and imported every single (2000) private keys into Electrum, but balance is empty and no history has shown. Matter of fact, Electrum looks identical, other than the fact that its a new wallet.

Few side notes, In the keys dump file there is also 2000 strings, all starting with 0014, next to unique addresses.

Another clarification just for my own sake of knowledge, does the key dump from Core actually contain the old wallet data?  I had the Wallet file in the bitcoin wallet directory but was never able to actually open it in btc, and the bitcoin core install was entirely new. Does the dump keys command take data from all wallets or only the open ones?
HCP
legendary
Activity: 2086
Merit: 4361
April 12, 2020, 08:50:39 PM
#28
The advantage of using IanColeman's tool is that you can easily export a CSV file with the private keys in derivation path order... which also means (with a small amount of text manipulation in something like Notepad++) you can easily create a list of keys in the appriopriate format to import into Electrum.

dumpwallet while useful, outputs keys in a very 'random' order. Undecided
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
April 12, 2020, 08:35:12 PM
#27
the master private key could be entered at iancoleman.io  
There's no point in doing that since he already got the list of private keys and addresses just below the "extended private masterkey".
iancoleman's BIP39 tool will just derive the same list (change have different derivation path)
unless he changed the passphrase before which created a bunch of different set of keys/addresses.

What he need now is to find which addresses have a balance.
copper member
Activity: 1652
Merit: 1325
I'm sometimes known as "miniadmin"
April 12, 2020, 06:38:33 PM
#26
---

My bad... I had never heard about the service itself, the domain name sounded sketchy, and I've had enough BS for the day. Sorry for not checking all the facts before replying; I just read "private key, enter, website" and kinda triggered
HCP
legendary
Activity: 2086
Merit: 4361
April 12, 2020, 03:58:21 PM
#25
the master private key could be entered at iancoleman.io 

LOL, NEVER EVER enter any private key anywhere. Even less, in a service no one has ever heard of. Be safe out there,
What do you mean a service no one has ever heard of? Huh

Ian Coleman's BIP39 Mnemonic Code Converter is one of the most widely used/known websites for dealing with BIP39 mnemonics and/or master private keys: https://iancoleman.io/bip39/

It is 100% opensource and can even be downloaded and used completely offline. It's a very handy resource for wallet/private key recovery. But yes, I would not recommend using the online version of this for anything other than testing "dummy" mnemonics/private keys.
copper member
Activity: 1652
Merit: 1325
I'm sometimes known as "miniadmin"
April 12, 2020, 10:52:27 AM
#24
the master private key could be entered at iancoleman.io 

LOL, NEVER EVER enter any private key anywhere. Even less, in a service no one has ever heard of. Be safe out there,
Pages:
Jump to: