Author

Topic: Back to libdb 4.8 from 5.1? (kubuntu 13.10 ) Why? (Read 2406 times)

member
Activity: 80
Merit: 10
December 23, 2013, 11:02:48 AM
#8
BTW, why are we stuck at libdb4.8? Is it somehow more secure, stable, faster... better looking?

I'm not sure, but I can make an educated guess and say it's probably this backwards-compatibility issue. I think (but don't quote me on this...) a switch to 5.1 may be possible, but not worth the time to do extensive testing with, as hopefully we won't have BDB around too much longer (there are talks of alternatives going on in the dev channel, etc). I also know that versions of BDB after 5.1 are released under the AGPL, which isn't considered an acceptable license for inclusion in the software because it would forbid any changes to the code without publishing the code, meaning that proprietary patches or tweaks would be impossible.
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
Thank you michagogo. I'll give it a try.

BTW, why are we stuck at libdb4.8? Is it somehow more secure, stable, faster... better looking?
member
Activity: 80
Merit: 10
You guys released the previous version with a newer libdb and now this? It makes no sense at all.
Damn...

You misunderstand. The Bitcoin core developers didn't release the previous version with a newer libdb. All release binaries are built with version 4.8. Ubuntu's built-in software sources don't give you the release binaries that come from the core dev team, they give you binaries built by Ubuntu. Ubuntu takes the code and builds the package, with their own changes. One of those changes is that they build with BDB version 5.1, because version 4.8 isn't available in their sources. When you add the PPA, which is the supported method of installing on Ubuntu, the PPA provides BDB 4.8, which is the recommended version of BDB. I haven't personally used db-util myself, but you should be able to downgrade the wallet by doing something like this, after backing your wallet up somewhere safe:

Code:
sudo apt-get install db4.8-util db5.1-util
mv wallet.dat wallet.dat.5.1
db5.1_dump wallet.dat.5.1 | db4.8_load wallet.dat

Note that, again, this is just my guess as to how it would work -- I haven't personally used the tools. And make sure to back your wallet up before you do anything!
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
You guys released the previous version with a newer libdb and now this? It makes no sense at all.
Damn...
member
Activity: 80
Merit: 10
I have used the client before and sent and received coin, so rm is not an option.

Should I just remove the ppa and go back to previous version (one that uses newer libdb) or will there be a update that actually uses current libdb?

There won't be an update to use 5.1, but you can downgrade the wallet manually. First, make sure to back it up somewhere safe. You can use db_dump and db_load from dbutils for 5.1 and 4.8, respectively.
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
I have used the client before and sent and received coin, so rm is not an option.

Should I just remove the ppa and go back to previous version (one that uses newer libdb) or will there be a update that actually uses current libdb?
member
Activity: 80
Merit: 10
Correct. BDB is not backwards-compatible. That is why all release binaries, as well as the PPA, build with BDB 4.8. Ubuntu, unfortunately, doesn't ship BDB 4.8, so they change it to build with 5.1. In Bitcoin-Qt/bitcoind, BDB is used for the wallet. Any wallet from an earlier BDB version opened by a newer one is automatically upgraded. This means that any wallet created or opened by a binary built with BDB 5.1 cannot be opened with a binary built with BDB 4.8, which is the majority of the binaries out there. If you've used Bitcoin-Qt with BDB 5.1, your wallet won't be compatible with a 4.8 version, which breaks portability. If you haven't used the wallet yet, neither received bitcoins nor given anyone any address to send bitcoins, you can just rm ~/.bitcoin/wallet.dat.
legendary
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
Before I added ppa:bitcoin/bitcoin,  only bitcoin-qt vesrsion 0.8.5-1 was available so I installed it and libdb 5.1 was pulled in and installed.
After adding ppa:bitcoin/bitcoin, and updating to bitcoin-qt_0.8.6-saucy1_amd64, libdb 4.8 gets pulled in and installed. mmm.. why?

Looks like 5.1 is out and we are back to 4.8...

Code:
$ apt-get install bitcoind
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libdb5.1++
Use 'apt-get autoremove' to remove it.
The following packages will be upgraded:
  bitcoind
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 971 kB of archives.
After this operation, 42,0 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu/ saucy/main bitcoind amd64 0.8.6-saucy1 [971 kB]
Fetched 971 kB in 0s (1 440 kB/s)
(Reading database ... 162689 files and directories currently installed.)
Preparing to replace bitcoind 0.8.5-1 (using .../bitcoind_0.8.6-saucy1_amd64.deb) ...
Unpacking replacement bitcoind ...
Processing triggers for man-db ...
Setting up bitcoind (0.8.6-saucy1) ...

I have not started bitcoin-qt because I am not sure, what is going to happen because previous version used newer libdb.
If I recall, db is not backward compatible.

Jump to: