Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Kansattica on May 16, 2012, 09:48:41 PM



Title: Broken wallet.dat?
Post by: Kansattica on May 16, 2012, 09:48:41 PM
So, a while back (three months ago, I would guess), I kinda dropped out of Bitcoin due to an incident with a scammer I won't go into. Anyways, I recently tried to get back into the Bitcoin game. I tried to open up my old Bitcoin client, and, well, it wouldn't open. So, I updated my bitcoin client, and it always crashes as it loads the block chain with my old wallet.dat. When I try and load a fresh install, it works fine. But every time I try to load in my old wallet.dat, it crashes on me. This has happened on three separate computers now. I know the wallet.dat is intact, as I can get the private keys with pywallet and load them into blockchain.info, but I kinda want to use the client again. Is the newer version of Bitcoin not working with my Wallet.dat? Is there a way I can upconvert it?


Title: Re: Broken wallet.dat?
Post by: DeathAndTaxes on May 16, 2012, 09:54:27 PM
The wallet.dat may be corrupt even if the private keys are recoverable.

How many private keys are we talking about.  A dozen? Or a couple thousands?

Assumming it is a small number you have two options

a) you could export the keys and create tx sending the funds from old key to a new address (in your new empty wallet).
b) you could import the private keys into your new wallet using the command line using the importprivkey API call.


Title: Re: Broken wallet.dat?
Post by: bulanula on May 16, 2012, 09:57:04 PM
Where is the loss ???

More value for my BTC !

;D

If you fail to read that newer versions may corrupt your wallet so you should backup it then good on ya !


Title: Re: Broken wallet.dat?
Post by: Kansattica on May 16, 2012, 09:57:20 PM
The wallet.dat may be corrupt even if the private keys are recoverable.

How many private keys are we talking about.  A dozen? Or a couple thousands?

Assumming it is a small number you have two options

a) you could export the keys and create tx sending the funds from old key to a new address (in your new empty wallet).
b) you could import the private keys into your new wallet using the command line using the importprivkey API call.

I'd say I have about a 30 or so private keys in there. I've copy-pasted a number of them into blockchain.info, but that's a long, boring process. Which of those would you recommend,  and how would I pull that off?


Title: Re: Broken wallet.dat?
Post by: Kitemike on May 16, 2012, 10:02:17 PM
Something similar happened to me a couple of days ago. I exited completely from my client, then I had to go to "%appdata%/bitcoin" in my windows explorer and delete everything except the wallet.dat

Started up the client again and all was good (after it re-downloaded the chain).



Title: Re: Broken wallet.dat?
Post by: Kansattica on May 16, 2012, 10:03:24 PM
Something similar happened to me a couple of days ago. I exited completely from my client, then I had to go to "%appdata%/bitcoin" in my windows explorer and delete everything except the wallet.dat

Started up the client again and all was good (after it re-downloaded the chain).



Was that a new installation?


Title: Re: Broken wallet.dat?
Post by: Pieter Wuille on May 16, 2012, 10:03:49 PM
What error does it die with? "Wallet corrupted" ? If so, recent versions introduced a more strict verification of the keys in the wallet, and cause an error rather than continuing and failing when trying to send a transaction.

For 0.7.0, I intend to add a 'recovery mode', that warns instead of fails; hopefully enough to send your funds elsewhere.


Title: Re: Broken wallet.dat?
Post by: Kitemike on May 16, 2012, 10:07:06 PM
No, it was originally version 6.0  and I tried installing 6.2 to fix the issue but that did not work.  I found the delete everything instructions while googleing.


Title: Re: Broken wallet.dat?
Post by: Kansattica on May 16, 2012, 10:07:23 PM
What error does it die with? "Wallet corrupted" ? If so, recent versions introduced a more strict verification of the keys in the wallet, and cause an error rather than continuing and failing when trying to send a transaction.

For 0.7.0, I intend to add a 'recovery mode', that warns instead of fails; hopefully enough to send your funds elsewhere.

http://imgur.com/HEHVW

There's the error it always comes  back with.


Title: Re: Broken wallet.dat?
Post by: Kansattica on May 16, 2012, 10:08:58 PM
No, it was originally version 6.0  and I tried installing 6.2 to fix the issue but that did not work.  I found the delete everything instructions while googleing.

I'll have to try that, then. Not like it could hurt anything.


Title: Re: Broken wallet.dat?
Post by: Kitemike on May 16, 2012, 10:15:10 PM
What error does it die with? "Wallet corrupted" ? If so, recent versions introduced a more strict verification of the keys in the wallet, and cause an error rather than continuing and failing when trying to send a transaction.

For 0.7.0, I intend to add a 'recovery mode', that warns instead of fails; hopefully enough to send your funds elsewhere.

http://imgur.com/HEHVW

There's the error it always comes  back with.

That was the same error screen I was dealing with.  Let me know if you it works for you and I'll let you know my obligatory charity address LOL


Title: Re: Broken wallet.dat?
Post by: Pieter Wuille on May 17, 2012, 10:01:51 AM
Ok, this should definitely not happen. Can you paste the contents of your debug.log file somewhere please?


Title: Re: Broken wallet.dat?
Post by: Kansattica on May 18, 2012, 12:54:34 AM
Ok, this should definitely not happen. Can you paste the contents of your debug.log file somewhere please?

The debug.log file is right here: http://pastebin.com/xxnZYV2R


Title: Re: Broken wallet.dat?
Post by: Kansattica on May 24, 2012, 06:52:26 PM
Bumping this because the problem persists.


Title: Re: Broken wallet.dat?
Post by: Kitemike on May 24, 2012, 09:01:23 PM
Can I assume that deleting everything except for your Wallet.dat file in the bitcoin data directory did not work?


Title: Re: Broken wallet.dat?
Post by: Kansattica on May 25, 2012, 01:28:29 AM
Can I assume that deleting everything except for your Wallet.dat file in the bitcoin data directory did not work?

Unfortunately not, but I might as well try that again.


Title: Re: Broken wallet.dat?
Post by: drakahn on May 25, 2012, 06:21:30 AM
just do the long boring process of importing private keys, then make a new wallet and send them all there, it may be a pain but at least its not a loss