Author Topic: Corrupted wallet.dat  (Read 16155 times)

0 Members and 1 Guest are viewing this topic.

Offline joele

  • Sr. Member
  • ****
  • Posts: 467
    • View Profile
Re: Corrupted wallet.dat
« Reply #16 on: November 13, 2013, 07:04:59 am »
Backup not only the wallet but also the private key.

To reveal your private key: dumpprivkey <address>

To import private key: importprivkey <privatekey>

Offline super3

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Corrupted wallet.dat
« Reply #15 on: November 13, 2013, 12:04:29 am »
If you want my help I can probably recover it. Send me a PM.

Offline gigawatt

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Corrupted wallet.dat
« Reply #14 on: November 12, 2013, 11:55:10 pm »
That really sucks :(
Private key export was also broken with the first version on git... so I didn't do it.
Any other way to extract the private key manually from wallet.dat, if I know the address?

Private key export worked fine.  It was private key import that was broken (it was looking for the wrong version bytes).

You might be able to use something like pywallet to extract your keys from it.
BTC: 1E2egHUcLDAmcxcqZqpL18TPLx9Xj1akcV
PTS: Pstkk1gZCxc4GEwS1eBAykYwVmcubU1P8L

Offline bytemaster

Re: Corrupted wallet.dat
« Reply #13 on: November 12, 2013, 08:30:33 pm »
I would love to know the root cause of this problem.  I have also seen it.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline Proto

  • Full Member
  • ***
  • Posts: 72
    • View Profile
Re: Corrupted wallet.dat
« Reply #12 on: November 12, 2013, 07:29:28 pm »
Starting the client with the salvagewallet option + using a backup helped. Thanks!

A remainder to anyone here: MAKE BACKUPS

Does salvagewallet reimport all key pairs, even the unnamed ones? Not that I get into trouble when I try to spend some of that PTS (change address)

Offline bobb

  • Full Member
  • ***
  • Posts: 67
    • View Profile
Re: Corrupted wallet.dat
« Reply #11 on: November 12, 2013, 07:18:03 pm »
my clients are linked against libdb_cxx-5.1.so.
But so is the qt-client which seem to work fine.

And yes I was able to revcover the PTS.

Offline Proto

  • Full Member
  • ***
  • Posts: 72
    • View Profile
Re: Corrupted wallet.dat
« Reply #10 on: November 12, 2013, 07:16:21 pm »
This happend to almost all of my protoshare-wallets, including the wallets on the miners.
I already started to dump the wallets using db_dump. 
Then I just tried the qt-client and the salvagewallet option.

Did you recover your PTS? What DB version are you using?

Offline bobb

  • Full Member
  • ***
  • Posts: 67
    • View Profile
Re: Corrupted wallet.dat
« Reply #9 on: November 12, 2013, 07:11:35 pm »
This happend to almost all of my protoshare-wallets, including the wallets on the miners.
I already started to dump the wallets using db_dump. 
Then I just tried the qt-client and the salvagewallet option.

Offline Proto

  • Full Member
  • ***
  • Posts: 72
    • View Profile
Re: Corrupted wallet.dat
« Reply #8 on: November 12, 2013, 07:07:29 pm »
Only difference between my miners and my client wallet is the db version used.

My miners use:
libdb_cxx-4.7.so => /usr/lib64/libdb_cxx-4.7.so

The problematic client is linked against:
libdb_cxx-5.3.so => /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so

To anyone with the same problem, please run ldd on your binary and report back what db version you used
« Last Edit: November 12, 2013, 07:09:15 pm by Proto »

Offline Proto

  • Full Member
  • ***
  • Posts: 72
    • View Profile
Re: Corrupted wallet.dat
« Reply #7 on: November 12, 2013, 07:03:12 pm »
Yes, I'm using the non qt-client. Nonetheless thanks, I will try loading my wallet.dat with a qt-client and report back. Have multiple backups, so I still have high hopes I didn't loose all that money. 
« Last Edit: November 16, 2013, 01:36:38 pm by Proto »

Offline alphaking

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Corrupted wallet.dat
« Reply #6 on: November 12, 2013, 07:01:29 pm »
*** System error: CDB() : can't open database file wallet.dat, error -30973

same problem!

Offline bobb

  • Full Member
  • ***
  • Posts: 67
    • View Profile
Re: Corrupted wallet.dat
« Reply #5 on: November 12, 2013, 06:58:24 pm »
Hey Proto,

the same happened to me on some wallets.
I guess you are using the non-qt client?

After _backing up the the wallet_ just try to open the wallet with the qt-client.
If this doesn't work try the -salvagewallet option.

If you have any questions feel free to pm me. I know the feeling when reading that message.

Offline Proto

  • Full Member
  • ***
  • Posts: 72
    • View Profile
Re: Corrupted wallet.dat
« Reply #4 on: November 12, 2013, 06:54:30 pm »
That really sucks :(
Private key export was also broken with the first version on git... so I didn't do it.
Any other way to extract the private key manually from wallet.dat, if I know the address?

Offline Proto

  • Full Member
  • ***
  • Posts: 72
    • View Profile
Re: Corrupted wallet.dat
« Reply #3 on: November 12, 2013, 06:52:42 pm »
I don't use binaries for new alt-coins... I'm compiling from newest git source.
I have deleted everything except my wallet.dat and try to redownload the blockchain currently. Did a git pull and complete recompile.
I get lots of warnings:

ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
ERROR: mempool transaction missing input
...


Then after a while, with my backup wallet.dat:


*** System error: CDB() : can't open database file wallet.dat, error -30973
Error: System error: CDB() : can't open database file wallet.dat, error -30973
Error: System error: CDB() : can't open database file wallet.dat, error -30973
ERROR: AcceptBlock() : AddToBlockIndex failed
ProcessBlock: ACCEPTED
CreateNewBlock(): total size 1000
bitcoind: main.cpp:1662: bool CBlock::ConnectBlock(CValidationState&, CBlockIndex*, CCoinsViewCache&, bool): Assertion `pindex->pprev == view.GetBestBlock()' failed.
Aborted (core dumped)

Offline Amazon

  • Hero Member
  • *****
  • Posts: 830
    • View Profile
    • Bitshares Forum
Re: Corrupted wallet.dat
« Reply #2 on: November 12, 2013, 06:44:08 pm »
Sorry to hear about this. Have you tried to use the wallet file on another machine? The 0.2.0 Linux binary has bug and bytemaster has been trying to fix it.
Forum Donation: PforumPLfVQXTi4QpQqKwoChXHkoHcxGuA