Author

Topic: [10 btc reward] protocol, wallet and client version mismatch errors (Read 2759 times)

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
He meant 0.3.25
BTW pywallet now works with last wallet versions
full member
Activity: 205
Merit: 100
ok, pywallet works well to get the privkeys from wallet a, but unfortunately it is not designed to work with wallets with versions later than 32500, so when I try to import into a new wallet, the wallet gets corrupted.

So, I am very close, and I like this bulk import/export method because I can prune this giant wallet I have, but I am at a loss how to import the addresses.  The new client has the importprivkey function, but it takes 1-2 minutes per address to import.

Does anyone know a way to import privkeys into a wallet quickly?

What did you mean by versions later than 32500?
newbie
Activity: 17
Merit: 0
that part of the solution was actually on these forums:

https://bitcointalksearch.org/topic/m.1065765
legendary
Activity: 1358
Merit: 1002
yay!  Shocked Thanks!

Maybe you could post the hack you used, in the Open Source spirit, you know Tongue, so it can help other users who face the same problem now or in the future. That would be really great.

Here's my address: 1PKyq6aMKcCwn8cmb9Jc5SkNydLsQb5n7K
newbie
Activity: 17
Merit: 0
found and confirmed a hack that takes the import time down to 6 seconds per key.

psy please provide an address for your 10 btc reward for helping me find pywallet.
newbie
Activity: 17
Merit: 0
ok, pywallet works well to get the privkeys from wallet a, but unfortunately it is not designed to work with wallets with versions later than 32500, so when I try to import into a new wallet, the wallet gets corrupted.

So, I am very close, and I like this bulk import/export method because I can prune this giant wallet I have, but I am at a loss how to import the addresses.  The new client has the importprivkey function, but it takes 1-2 minutes per address to import.

Does anyone know a way to import privkeys into a wallet quickly?
newbie
Activity: 17
Merit: 0
I think pywallet plus some scripting will do the trick.  I'll check back in here when/if I get it to work and hit you guys up for payment addresses for the bounty.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
...
Code:
Bitcoin: wallet.dat corrupt, salvage failed

...

First of all try running the wallet A with "-detachdb=1", as psy suggested, and then stop it so you have a consistent database file (wallet) before you copy it over.

If it doesn't work you can use the db4.8_dump and db4.8_load utilities to recover it completely. You may need to install db4.8-util package first.

Code:
db4.8_dump -p wallet.dat >wallet.txt

Import the purged dump again:

Code:
db4.8_load -f wallet.txt wallet.dat.new

Replace wallet.dat with wallet.dat.new, and start bitcoin.
newbie
Activity: 24
Merit: 0
A 1 gb wallet? Yikes! Dare I ask how and why?
legendary
Activity: 1358
Merit: 1002
ok, im looking into pywallet.

pywallet will only help you to retrieve/dump your private keys in bulk. You'll still need to find a way to import them on a new wallet, beacuse AFAIK pywallet only let's you import 1 private key at a time.

BTW, could you do one small thing, just to troubleshoot?
Can you rename your wallet a and let the 0.6.1 client create a new wallet.dat and try running that newly created wallet on the 0.7.2 client, just to see if it works?
Or maybe you already did that Smiley
newbie
Activity: 17
Merit: 0
ok, im looking into pywallet.
sr. member
Activity: 322
Merit: 250
The other way with the program that exports the keys so do it i guess, but still didnt find the name of it, im sure it here in the forum though

pywallet

Yup thats it, i really hope that if the way you previously said does not work pywallet will, split reward Cheesy
legendary
Activity: 1358
Merit: 1002
The other way with the program that exports the keys so do it i guess, but still didnt find the name of it, im sure it here in the forum though

pywallet
sr. member
Activity: 322
Merit: 250
nethead, blockchain.info My Wallet has a limit of 400 private keys in each wallet. That's probably an important detail to keep in mind.
I would need 10 or more My Wallet accounts to be able to import my 15MB wallet.dat with 4000+ addresses.
OP says his wallet.dat is 1GB in size.

Didnt know that, and didnt see the 1gb part, sorry from my side.
The other way with the program that exports the keys so do it i guess, but still didnt find the name of it, im sure it here in the forum though
kjj
legendary
Activity: 1302
Merit: 1026
The stop RPC command can also take an optional argument to force (or prevent) a full database detach.

Code:
bitcoind stop true
legendary
Activity: 1358
Merit: 1002
nethead, blockchain.info My Wallet has a limit of 400 private keys in each wallet. That's probably an important detail to keep in mind.
I would need 10 or more My Wallet accounts to be able to import my 15MB wallet.dat with 4000+ addresses.
OP says his wallet.dat is 1GB in size.
sr. member
Activity: 322
Merit: 250
Ideas i got:

1. import your wallet.dat to blockchain, and extract it from there (maybe it will fix it)
2. There is a program somewhere around here, that extracts the private keys from the wallet.dat file (and then you import them to the other wallet)
3. I tried googling how to get private keys from old wallet, and got manyyy results, i think you will too  Tongue


Hope i helped a little, and even a little part of those 10 btc would make me very happy Smiley

(im trying to find the program name)


EDIT: blockchain.info can also hand you your private keys after you imported the wallet.dat
see https://blockchain.info/wallet/import-wallet

legendary
Activity: 1358
Merit: 1002
Yup, that would be it.

Also: Read my edit above.
newbie
Activity: 17
Merit: 0
Start bitcoind with
Code:
bitcoind -detachdb=1
and after shut it down as usual.


Let me make sure I have this straight.  I start wallet a with bitcoind -detachdb=1, then stop it with bitcoind stop, then take the wallet.dat for wallet a and try to run the latest client with it?
legendary
Activity: 1358
Merit: 1002
Start bitcoind with
Code:
bitcoind -detachdb=1
and after shut it down as usual.


EDIT: Reading further I found that the wallet.dat is always detached at shutdown.

newbie
Activity: 17
Merit: 0
On the options window there is a checkbox with that text. Check it. Close the client. It will take a few minutes to completely close while it detaches the DB's.

I'm using the headless client on a server, so there must be a flag or something.  I usually shutdown by doing
Code:
bitcoind stop
legendary
Activity: 1358
Merit: 1002
On the options window there is a checkbox with that text. Check it. Close the client. It will take a few minutes to completely close while it detaches the DB's.

Your best option will be to probably copy the entire bitcoin data dir to the new location, instead of copying just the wallet.dat.
Don't forget to backup any data before replacing it. <--- can't be said enough times Smiley
newbie
Activity: 17
Merit: 0
Try to detach databases on shutdown and then replace the wallet.
You have to do that when upgrading from 0.6.x to 0.7.x

Not sure if you should also copy the blockchain data, to make it think you are upgrading.

BTW, this is a wild guess Grin

a wild guess is better than none.  how do I "detach databases on shutdown"?
legendary
Activity: 1358
Merit: 1002
Try to detach databases on shutdown and then replace the wallet.
You have to do that when upgrading from 0.6.x to 0.7.x

Not sure if you should also copy the blockchain data, to make it think you are upgrading.

BTW, this is a wild guess Grin
newbie
Activity: 17
Merit: 0
I am running 2 bitcoind instances on ubuntu 12.04.1 LTS server, wallet a and wallet b.  The version info from getinfo() for wallet a is
Code:
    "version" : 60300,
    "protocolversion" : 60001,
    "walletversion" : 60000,

The version info from getinfo() for wallet b is
Code:
    "version" : 70200,
    "protocolversion" : 60002,
    "walletversion" : 60000,

If I try to export wallet.dat from wallet a, put it in an empty .bitcoin directory and run it with the latest client version (7.0.2) I get the following error
Code:
Bitcoin: wallet.dat corrupt, salvage failed

Obviously wallet b will run with the latest client as seen in the version output.  This leads me to believe that the issue is the protocol version.  For some reason 60001 is incompatible with the latest client, and 60002 is.

So, here is the 10 btc question:
How can I get wallet a to run on the latest client?  It doesn't work for me to just transfer the balance to a new wallet, because I need the addresses in wallet a.  Also, wallet a has a bunch of addys.  It's around 1 gb in size.

First person to post a solution that I can get to work wins the 10 btc.  Thanks in advance!
Jump to: