namecoin / namecoin-core

Namecoin full node + wallet based on the current Bitcoin Core codebase.
https://www.namecoin.org/
MIT License
463 stars 146 forks source link

How to migrate old wallets? #14

Closed rnhmjoj closed 6 years ago

rnhmjoj commented 9 years ago

Old wallets from the previous versions on namecoin appear corrupted. Is there a way to use the wallets or import the data? See my question here

phelix commented 9 years ago

As far as I know the wallet format stayed the same. A copy of the file worked for me after a normal start.

JeremyRand commented 9 years ago

@rnhmjoj Which OS are you on, and is your previous Namecoin version compiled by you, or from an official package?

rnhmjoj commented 9 years ago

It was OSX, compiled by me. I'm also using the very same wallet on another machine that runs the AUR package namecoin-core 0.3.80.

JeremyRand commented 9 years ago

@rnhmjoj Has that wallet ever been used on an unofficial Namecoin release (e.g. self-compiled) which was built with a current version of BDB (or more recent than the version used in official Namecoin releases)? If so, BDB will silently upgrade the database format, and it will appear to work until you use it with an older version of BDB (such as the official Namecoin releases), at which point you will get a corrupt wallet error.

rnhmjoj commented 9 years ago

Yes, that must be it. Sometimes I had to recompile namecoin (I think I've always used the latest tag) because berkley db has been updated by homebrew.

JeremyRand commented 9 years ago

@rnhmjoj Ok, yeah, that'll be it. Sorry you ran into trouble with this -- we probably should document more clearly that newer BDB versions will break things. (The same thing will happen with Bitcoin, as far as I know.)