Title: [GUIDE] Simple wallet recovery using bitcointools Post by: Matt Corallo on June 02, 2011, 02:39:54 PM THIS THREAD IS VERY OUT-OF-DATE AND SAYS SOME THINGS THAT AREN'T TRUE ANYMORE. IT APPEARS THAT FOLLOWING IT HAS CAUSED SOME USERS TO HAVE INCREASED DIFFICULTY RECOVERING THEIR WALLETS, SO PLEASE DONT DO THIS UNTIL (IF) THIS THREAD IS UPDATED
So, you open Bitcoin to check on your Bitcoins and to your dismay it won't open. Now what? You probably see errors like Quote EXCEPTION: NSt8ios_base7failureE Don't worry, your keys are almost always still there, they are just hiding, I'm gonna help you find themCDataStream::read() : end of data bitcoin in AppInit() Prerequisites: A willingness to open your Terminal application, Python Methodology: Usually when a wallet gets corrupted, its not the private keys that get corrupted but some setting, transaction or public key. In order to get Bitcoin to open and allow you to access your Bitcoins, we will use bitcointools' fixwallet.py to delete settings, accounts, public keys, and transactions and see if we can get you access to your private keys to spend your coins again. Notes:
Guide:
Comments, suggestions, sticky? Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: RaTTuS on June 05, 2011, 11:44:54 PM OK I'm not panicking too much yet but .....
my machine [windows vista 64] rebooted - as requested but when bitcoins loaded it errored with this exception ... I've fixed my wallet with fixwallet.py and copied the wallet.new.dat over the old one [I've still got copies] I've run bitcoin -rescan and i'm left with all my transactions ok but 0 connections , 0 blocks , 7 transactions and balance 0.00 so for some reason I'm not connection to the network ? only one comment - add a pay address in your sig ;) Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: Matt Corallo on June 05, 2011, 11:51:41 PM The second step will delete your addr.dat too, so making new connections after that could take quite some time. There is a fix in the pipeline hopefully to come out very soon, but until then, I recommend forwarding your ports and trying -dnsseed or -addnode=(the ip of a known-up fallback node)
Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: RaTTuS on June 05, 2011, 11:56:22 PM yeah I've seen some other reported problems about connections....
I've added a couple of the backup ones and things are progressings [3 connections now and 200k blocks], when it all settings down and I have BTC available I'll smudge some over to you .... 8) Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: RaTTuS on June 06, 2011, 05:24:34 AM ;D
recovered now, and I've sent a small donation [though not from this address] ::) Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: mewantsbitcoins on June 06, 2011, 05:26:22 AM Thanks Matt
Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: nazgulnarsil on June 30, 2011, 06:09:21 AM when I type dbdump.py or anything else I get an error that says "no module named bsddb.db" is there a bunch of setup I have to do that I'm neglecting? I downloaded python and put all the bitcoin tools in my bitcoin folder.
Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: Matt Corallo on June 30, 2011, 11:22:56 AM when I type dbdump.py or anything else I get an error that says "no module named bsddb.db" is there a bunch of setup I have to do that I'm neglecting? I downloaded python and put all the bitcoin tools in my bitcoin folder. You are gonna need the bsddb python plugin which you can probably get from http://www.jcea.es/programacion/pybsddb.htm (http://www.jcea.es/programacion/pybsddb.htm)Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: nazgulnarsil on June 30, 2011, 06:40:10 PM switching to py 2.7 fixed that. Now I don't know how to install the pycrypt library.
reading this: http://docs.python.org/install/index.html but a little lost as to where the relevant info is. Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: arnoldrimmer on July 11, 2011, 05:59:29 AM Do I need to intall Pyton?? How is that a simple guide?
I deletet everything exept the wallet.dat now I see all my Keys but my account i on 0.0 Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: Matt Corallo on July 11, 2011, 10:11:01 AM Do I need to intall Pyton?? How is that a simple guide? Well it was more targeted towards Linux/Unix users where python is pretty much part of a base install on every distro.I deletet everything exept the wallet.dat now I see all my Keys but my account i on 0.0 That said, if you install python you should be able to follow pretty cleanly on Windows as well. If you deleted everything except wallet.dat and your client is showing 0 balance, wait for it to redownload the blockchain, as the 0 balance is to be expected. Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: joulesbeef on July 21, 2011, 11:33:57 PM when i do this ./dbdump.py --wallet
i get this :( Code: D:\Users\joulesbeef\Downloads\gavinandresen-bitcointools-294c080\gavinandresen-b Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: joulesbeef on July 22, 2011, 08:25:05 PM ok. i've managed to get dbdump to produce something that looks hopeful
Quote PubKey 04ef...1f37 : PriKey 3082...1f37 PubKey 04f0...db99 : PriKey 3082...db99 PubKey 04f0...9954 : PriKey 3082...9954 PubKey 04f0...998b : PriKey 3082...998b PubKey 04f0...ea42 : PriKey 3082...ea42 PubKey 04f1...6a44 : PriKey 3082...6a44 PubKey 04f1...9187 : PriKey 3082...9187 PubKey 04f1...2f2a : PriKey 3082...2f2a PubKey 04f5...e867 : PriKey 3082...e867 PubKey 04f5...0ce2 : PriKey 3082...0ce2 PubKey 04f6...8b0b : PriKey 3082...8b0b PubKey 04f8...d789 : PriKey 3082...d789 PubKey 04f8...e93f : PriKey 3082...e93f PubKey 04f9...e1d5 : PriKey 3082...e1d5 PubKey 04fa...4a0f : PriKey 3082...4a0f PubKey 04fa...125f : PriKey 3082...125f PubKey 04fa...1d60 : PriKey 3082...1d60 PubKey 04fa...06cc : PriKey 3082...06cc PubKey 04fd...b76f : PriKey 3082...b76f ADDRESS 1PqphMPWGU73WY6mAEPwqJoAWAsbizve1L : Change Pool key 2: (Time: Fri Jul 22 16:18:22 2011) Change Pool key 3: (Time: Fri Jul 22 16:18:23 2011) but when i do a fixwallet and replae the wallet and run bitcoin it starts up but my wallet is empty and no addys or nothing. any help? Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: Matt Corallo on July 22, 2011, 08:29:12 PM Thats the entire output? Thats only 19 private keys, there should be >100 at all times. Its possible you might have lost some of your keys. Yes, if you fixwallet the wallet and replace with that you will only have the address 1PqphMPWGU73WY6mAEPwqJoAWAsbizve1L, which is not the default key, so will just be another one in your address book. If there are transactions to any of the private keys there, they will be found if you do a -rescan or as you download the block chain.
Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: joulesbeef on July 22, 2011, 08:38:09 PM Quote Thats the entire output? nope the list was way long.. goes past the buffer of xp's command prompt and I only coppied a portion of what it outputted Quote If there are transactions to any of the private keys there, they will be found if you do a -rescan or as you download the block chain. launched with bitcoin -rescan so i guess i just wait and pray.. it isnt much but i'd still like to get it back . thanks for the help Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: joulesbeef on July 24, 2011, 02:11:34 AM It worked.. there were only 0.9 coins in there .. i thought 3 but it was a good learning experience.
Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: RevolutionMaster on July 30, 2011, 09:37:52 PM This worked well for me, and I recovered 3 bitcoins with the -notxes flag on the git pull. Thanks OP!
Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: Sy on May 07, 2013, 07:34:07 AM Still working, fixed my chncoin wallet :)
Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: FalconFour on May 09, 2013, 06:15:31 PM Yeah, this doesn't seem to work. All I get is this:
Code: falcon@ubuntu:~/bitcointools$ ./fixwallet.py I don't have Bitcoin installed in my Linux VM, so I made a ".bitcoin" folder and placed the corrupt wallet.dat (112kb and full of binary data similar to my working wallet.dat) inside in order to run these tools. I can't seem to get any of this to work. Nothing wants to touch this database file. Since it's all proprietary binary data, it's now stuck inside this corrupt database file. This begs the question of exactly how hard could it have possibly been to simply make the wallet - an extremely important and valuable file - as an open XML file or something actually extensible and manageable instead of this gibberish binary Berkeley DB format? So still, nothing. The file doesn't even appear corrupt, and yet, it won't even load... The file is from a very old and forgotten Bitcoin wallet (an earlier Bitcoin-QT on Windows) that turns out to have had some coins left in it. Not sure what version. edit: Turns out, the file was opened+saved in Notepad, completely corrupting the binary data - replacing 0x00 with 0x20 all throughout the file. That's completely unacceptable if the wallet file can be irreparably corrupted that easily by someone. I'm working with a hex editor now to replace 0x20 with 0x00 and rescuing the stragglers (where it should've actually been 0x20 - an ASCII space (" ") character). So far so good - this time, the debug log file reports it found 130-something records. So we'll see... edit: there was a backup, so yay. all is well. ^_^ Title: Re: [GUIDE] Simple wallet recovery using bitcointools Post by: edgar on January 31, 2016, 04:52:41 AM if anyone is able to add an updated step-by-step walkthrough of this process it may be appreciated.
i have downloaded python 2.7, pywallet, twisted 11.0, zope interface 4.1.3 and bitcointools-master. all but pywallet are in the site-packages folder (pywallet is in the Scripts folder) assuming this is all correct i am unable to 'cd into the bitcointools directory' |