Bitcoin Forum
December 16, 2017, 09:33:05 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: [10 btc reward] protocol, wallet and client version mismatch errors  (Read 2625 times)
kohlanta
Newbie
*
Offline Offline

Activity: 17


View Profile
January 24, 2013, 10:55:31 PM
 #1

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!
1513416785
Hero Member
*
Offline Offline

Posts: 1513416785

View Profile Personal Message (Offline)

Ignore
1513416785
Reply with quote  #2

1513416785
Report to moderator
1513416785
Hero Member
*
Offline Offline

Posts: 1513416785

View Profile Personal Message (Offline)

Ignore
1513416785
Reply with quote  #2

1513416785
Report to moderator
1513416785
Hero Member
*
Offline Offline

Posts: 1513416785

View Profile Personal Message (Offline)

Ignore
1513416785
Reply with quote  #2

1513416785
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513416785
Hero Member
*
Offline Offline

Posts: 1513416785

View Profile Personal Message (Offline)

Ignore
1513416785
Reply with quote  #2

1513416785
Report to moderator
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
January 24, 2013, 11:04:11 PM
 #2

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

kohlanta
Newbie
*
Offline Offline

Activity: 17


View Profile
January 24, 2013, 11:06:57 PM
 #3

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"?
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
January 24, 2013, 11:10:14 PM
 #4

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

kohlanta
Newbie
*
Offline Offline

Activity: 17


View Profile
January 24, 2013, 11:15:55 PM
 #5

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
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
January 24, 2013, 11:17:12 PM
 #6

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.


kohlanta
Newbie
*
Offline Offline

Activity: 17


View Profile
January 24, 2013, 11:28:05 PM
 #7

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?
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
January 24, 2013, 11:33:28 PM
 #8

Yup, that would be it.

Also: Read my edit above.

nethead
Sr. Member
****
Offline Offline

Activity: 322



View Profile
January 24, 2013, 11:52:26 PM
 #9

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

Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
January 25, 2013, 12:00:53 AM
 #10

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.

kjj
Legendary
*
Offline Offline

Activity: 1302



View Profile
January 25, 2013, 12:02:25 AM
 #11

The stop RPC command can also take an optional argument to force (or prevent) a full database detach.

Code:
bitcoind stop true

p2pcoin: a USB/CD/PXE p2pool miner - 1N8ZXx2cuMzqBYSK72X4DAy1UdDbZQNPLf - todo
I routinely ignore posters with paid advertising in their sigs.  You should too.
nethead
Sr. Member
****
Offline Offline

Activity: 322



View Profile
January 25, 2013, 12:13:30 AM
 #12

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
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
January 25, 2013, 12:14:40 AM
 #13

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

nethead
Sr. Member
****
Offline Offline

Activity: 322



View Profile
January 25, 2013, 12:16:36 AM
 #14

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
kohlanta
Newbie
*
Offline Offline

Activity: 17


View Profile
January 25, 2013, 12:25:22 AM
 #15

ok, im looking into pywallet.
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1456



View Profile
January 25, 2013, 12:30:24 AM
 #16

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

bitfarmer
Newbie
*
Offline Offline

Activity: 24


View Profile
January 25, 2013, 01:25:55 AM
 #17

A 1 gb wallet? Yikes! Dare I ask how and why?
paraipan
Legendary
*
Offline Offline

Activity: 924


Firstbits: 1pirata


View Profile WWW
January 25, 2013, 01:28:42 AM
 #18

...
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.

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
kohlanta
Newbie
*
Offline Offline

Activity: 17


View Profile
January 25, 2013, 01:31:44 AM
 #19

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.
kohlanta
Newbie
*
Offline Offline

Activity: 17


View Profile
January 26, 2013, 01:10:24 AM
 #20

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?
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!