Wallet is Berkeley DB only — descriptor + SQLite wallets would retire the db-4.8.30 build ritual #41
Labels
No labels
do-not-open-till-X-Day
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SubGeniusFinance/dobbscoin-source#41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Roadmap section 4 (forum topic 24, msg 67), filed so it is tracked rather than prose.
Where we are
The wallet is
CWalletDBover Berkeley DB and nothing else.src/db.cpp+src/walletdb.cpp;configure.ac:522checks forlibdb_cxxwhenever the walletis enabled. There is no SQLite backend anywhere in the tree — the only
sqlitehits under
src/are LevelDB's own benchmark files.The cost is documented in our own build instructions:
doc/build-unix.md:155tells the builder to fetch
db-4.8.30.NC.tar.gzfrom Oracle and compile itstatically, because a distro BDB will produce a wallet other builds cannot open.
That single dependency is the most fragile part of building (BOB).
What Core did
migratewalletlegacy → descriptor (0.24)The storage change is the one that matters here: descriptor wallets on SQLite mean
BDB exists only to open historical
wallet.datfiles, and a build that does notneed to open them does not need BDB at all.
Why this is separable
This has no consensus surface. It does not depend on the SegWit question in
section 3, and legacy descriptors work fine on a chain with no witness structure.
It can proceed on its own track at any time.
The real decision
Not whether, but what happens to existing
wallet.datholders. Options:migratewallet.Nothing in this issue proposes one. The point of filing is that the BDB ritual is
a recurring tax on every build and every new contributor, and it is currently
nobody's task.
Note
Any wallet-storage work should first make the encrypt-wallet round-trip test
runnable. It needs
db_dumpfrom the BDB build, and a BDB compiled only forlinking does not provide it. That test is the one gate that would catch a
wallet-format regression, and it is currently easy to skip.
Recon before starting this, because the two halves are very different sizes.
The descriptor half is a port of Core 0.15 through 0.24 into a tree with no HD, no descriptor and no
PSBT code at all. The build-dependency half does not require it:
CWalletDBis the only subclass ofCDB,CDBalready reads and writes byte blobs, and BDB leaks outsidedb.cpp/db.hin threeplaces only (
Dbc*cursors at 3 sites inwalletdb.cpp,Dbtat 2, and a version string ininit.cppandqt/rpcconsole.cpp).Filed as its own issue so the chore is not blocked behind the rewrite. This one keeps the descriptor
question.
One correction: the closing Note above is out of date.
db_dumpis available from a BDB built withits utilities, and the encrypt-wallet round trip ran twice as a release gate for v0.13.8, so that
prerequisite is already met.