[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#578157: and another!



On Fri, Jan 07, 2011 at 12:06:37PM -0500, micah anderson wrote:
On Fri, 7 Jan 2011 17:02:20 +0100, Jonas Smedegaard <dr@jones.dk> wrote:
On Fri, Jan 07, 2011 at 10:39:11AM -0500, micah anderson wrote:
>I noticed that you are build-depending on libdb4.7++, I dont know >that much about the bdb madness, but I do know that the bitcoin that >I compiled from source was compiled against libdb4.8++ and when I >try and install your packaged version, it can't read the wallet >database.
>
>Is there any specific reason you went with 4.7 instead of 4.8,

Yes.

src/build-unix.txt includes this note:

>You need Berkeley DB 4.7. Don't use 4.8, the database/log0000* >files are incompatible.

This is interesting... I am using DB 4.8 just fine. I suspect that this build-unix.txt is out of date, or just wrong. The database/log0000 files are just transaction logs, and while it is true that they are incompatible, this is normal for ABI differences between berkeley db versions.



Helmuth Grohne, showing up on IRC just before I released the packaging, claims this might actually be a reason to run away screaming from Bitcoin, as it indicates a disastrous design flaw in relying on the network API on the internal BDB format of (little-endian!) v4.7.

talking about irc gave me an idea. I stopped over to #bitcoin-dev, and asked them what the deal was:
[IRC conversation snipped]
so it seems there is no particular reason to use 4.7, its just what their pre-compiled binary versions use, and the only reason that they dont move to 4.8 is because nobody has bothered to try it on mac and windows.

As a test, I backed up my .bitcoin/ and then ran your version, with libdb4.7++ and start it up. It creates a wallet and I let it download all the current blocks. I then stop it, run a self-compiled bitcoin, linked against libdb4.8++, it converts the database to 4.8 format, and things continue to work as normal.

Thanks a lot for your investigation!

So what really is the issue here is that _at_ _each_ _runtime_ _environment_ are the db files incompatible.

I know that problem already from Netatalk, which also until recently did not support seemless upgrading.

I'll immediately rebuild using a newer bdb, and also throw in a README based on that used in netatalk until recently - and would appreciate if you could verify if manual upgrading/downgrading works using that - to prepare for future version bumps.


 - Jonas

--
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: Digital signature


Reply to: