On Fri, 7 Jan 2011 17:02:20 +0100, Jonas Smedegaard <d...@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: 11:46:01 < hacim> i noticed in src/build-unix.txt, it says to use Berkeley DB 4.7 11:46:10 < hacim> "You need Berkeley DB 4.7. Don't use 4.8, the database/log0000* files are incompatible" 11:46:15 < hacim> however, I'm using 4.8 just fine... 11:46:15 < ArtForz> yes, use bdb 4.7 11:46:33 < ArtForz> well, now your DB is auto-upgraded to 4.8 11:46:42 < hacim> the database/log0000* files are just transaction logs 11:46:51 < ArtForz> = 4.7 can't read it anymore 11:47:01 < hacim> they are of course incompatible with 4.7, this is the definition of the ABI change :) 11:47:13 < gavinandresen> As long as you don't reinstall a precompiled bitcoin you'll be fine. 11:47:23 < ArtForz> yep 11:48:03 < hacim> ok, so there is nothing about the 4.7 libraries, such as relying on the network API in the internal bdb format of little-endian 4.7? 11:48:10 < ArtForz> nope 11:48:29 < ArtForz> it's just that 4.8 isnt backwards compatible with 4.7 and binary builds use 4.7 11:48:31 < hacim> so, for new installs, why would one chose to use 4.7, when you will need to upgrade anyways? 11:48:48 < hacim> eventually those binary builds will need to use 4.8, and people will have to transition 11:48:54 < ArtForz> why? 11:49:04 < hacim> if the history of bdb is to be any indicator of the future... 11:49:13 < ArtForz> so far the binary builds are 4.7, so going to selfcompiled w/ 4.8 is a one-way street 11:49:14 < hacim> do you know anyone using bdb4.1? 11:49:52 < ArtForz> when binary build switches to 4.8, recommended version for compiling will switch to 4.8 (duh) 11:49:59 < hacim> why would anyone want to use 4.7 right now is beyond me 11:50:14 < ArtForz> no one WANTS to, everyone using a precompiled binary HAS to 11:50:20 < hacim> ArtForz: the 'binary build' meaning the binaries offered on the website? 11:50:56 < gavinandresen> hacim: you want to volunteer to organize an effort to make sure 4.8 is supported on windows mac and all the linux flavors people are using? 11:52:59 < hacim> gavinandresen: it works fine on three different linux flavors that I've tried this morning 11:53:07 < gavinandresen> hacim: or, to say it another way: bitcoin uses 4.7 because two years ago that is what Satoshi decided to use, and nobody has put in the effort needed to upgrade. It just hasn't been a priority. 11:53:32 < gavinandresen> hacim: great! so create a patch and recruit some people to see if it works on mac and windows. 11:53:32 < hacim> gavinandresen: it doesn't bother me that other people use 4.7 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. micah
pgpRk8yliHSoA.pgp
Description: PGP signature