Bitcoin built with a newer Berkeley Database incompatible with a older wallet?

0

Is a Bitcoin client built with a newer Berkeley Database incompatible with a wallet file from a older client? Or is it that a wallet made from a newer Berkeley Database not compatible with an older client?

EDIT: What I'm trying to figure out... If I have a wallet from years ago and I import it into a newer client that was built with a different Berkeley database unknowingly would I have any issues?

RansuDoragon

Posted 2018-10-02T16:10:40.050

Reputation: 3

Answers

2

You can always open a wallet.dat file created with an older BDB using software using a newer BDB. However, when doing so, the file will be upgraded and not be compatible anymore with the older BDB version that created it. This is even the case for minor version upgrades (4.7 vs 4.8 for example).

Bitcoin Core release binaries have used BDB 4.8 since release 0.4 (September 2011), but self-compiled versions or versions shipped with Linux distributions may use other BDB versions.

Pieter Wuille

Posted 2018-10-02T16:10:40.050

Reputation: 54 032

This is what I wondering. Thanks for answering. I just wanted to be sure that opening a file from years ago with a newer client wasn't going to break the wallet file.RansuDoragon 2018-12-08T16:07:01.920

0

Newer BerkeleyDB databases are not backwards compatible.

Details: https://github.com/bitcoin/bitcoin/issues/6253 https://github.com/bitcoin/bitcoin/issues/3686#issuecomment-74836708

Especially:

BDB is very painful to upgrade. My impression is that it was designed for setups where a database upgrade only happened with professional supervision. In particular, the write log files created for durability were sometimes not readable by later versions. This is the reason why Bitcoin Core releases have for years stuck with BDB 4.8 for the wallet.

https://bitcoin.stackexchange.com/a/51446

MCCCS

Posted 2018-10-02T16:10:40.050

Reputation: 5 827

What I'm trying to figure out... If I have a wallet from years ago and I import it into a newer client that was built with a different Berkeley database unknowingly would I have any issues?RansuDoragon 2018-10-02T16:22:26.283

I'd suggest creating a backup of the wallet. It might or might not work, it's impossible to know without experimenting. However, all (most? I'm sure that it is since 0.8.0, and 100% the same major release, 4) Bitcoin Core versions use the same version of Berkeley DB.MCCCS 2018-10-02T16:29:19.483

I use Arch Linux and I'm only now noticing the official package they have is built with the newest DB they have. I may have deleted old wallets I thought were empty. It did display a wallet address.RansuDoragon 2018-10-02T16:32:43.003

@RansuDoragon You can build Bitcoin Core from depends. It downloads the dependencies with preferred versions automatically using scripts. Here are the instructions: https://github.com/bitcoin/bitcoin/tree/master/depends

MCCCS 2018-10-03T16:01:32.217