Retire the db-4.8.30 build dependency without porting descriptor wallets #44

Open
opened 2026-09-18 23:48:26 +00:00 by btcbob · 0 comments
Owner

Split out of #41, which bundles two jobs of very different size.

The chore

doc/build-unix.md:155 tells every builder to fetch db-4.8.30.NC.tar.gz from Oracle and compile
it statically, because a distro BDB produces a wallet other builds cannot open. That single
dependency is the most fragile part of building (BOB), and it is a tax on every new build host and
every new contributor.

Why it does not need descriptor wallets

#41 proposes retiring it by adopting descriptor wallets on SQLite. That means porting HD wallets
(Core 0.15), descriptors (0.17 - 0.21), PSBT (0.17), the SQLite backend (0.23) and migratewallet
(0.24) into a tree that has none of the scaffolding: there is no CHDChain, no descriptor code and
no PSBT anywhere under src/.

The build dependency can go without any of that, by replacing the storage engine underneath
CWalletDB and keeping every existing record type exactly as it is. The surface is small:

  • CWalletDB is the only subclass of CDB.
  • CDB::Read / Write / Erase / Exists already serialize through CDataStream to byte blobs,
    so a table of key/value BLOBs is a direct substitution.
  • BDB leaks outside src/db.cpp and src/db.h in three places only: Dbc* cursors at 3 sites in
    walletdb.cpp, Dbt at 2 sites in its salvage path, and a version string printed by init.cpp
    and qt/rpcconsole.cpp.

src/db.cpp is 454 lines and src/db.h is 312.

What is genuinely open

The same question #41 raises: an existing wallet.dat still has to be read by something. So the
dependency moves to a one-time converter rather than disappearing, and the decision is whether that
converter ships in the wallet, ships separately, or the old format is simply supported read-only for
a transition window.

Notes

  • No consensus surface.
  • The encrypt-wallet round-trip check is the gate that would catch a wallet-format regression here,
    and it is runnable today: it needs db_dump, which a BDB built with its utilities provides. It
    ran twice as a release gate for v0.13.8.
  • The descriptor question is not resolved by this issue and stays in #41.
Split out of #41, which bundles two jobs of very different size. ### The chore `doc/build-unix.md:155` tells every builder to fetch `db-4.8.30.NC.tar.gz` from Oracle and compile it statically, because a distro BDB produces a wallet other builds cannot open. That single dependency is the most fragile part of building (BOB), and it is a tax on every new build host and every new contributor. ### Why it does not need descriptor wallets #41 proposes retiring it by adopting descriptor wallets on SQLite. That means porting HD wallets (Core 0.15), descriptors (0.17 - 0.21), PSBT (0.17), the SQLite backend (0.23) and `migratewallet` (0.24) into a tree that has none of the scaffolding: there is no `CHDChain`, no descriptor code and no PSBT anywhere under `src/`. The build dependency can go without any of that, by replacing the storage engine underneath `CWalletDB` and keeping every existing record type exactly as it is. The surface is small: - `CWalletDB` is the **only** subclass of `CDB`. - `CDB::Read` / `Write` / `Erase` / `Exists` already serialize through `CDataStream` to byte blobs, so a table of key/value BLOBs is a direct substitution. - BDB leaks outside `src/db.cpp` and `src/db.h` in three places only: `Dbc*` cursors at 3 sites in `walletdb.cpp`, `Dbt` at 2 sites in its salvage path, and a version string printed by `init.cpp` and `qt/rpcconsole.cpp`. `src/db.cpp` is 454 lines and `src/db.h` is 312. ### What is genuinely open The same question #41 raises: an existing `wallet.dat` still has to be read by something. So the dependency moves to a one-time converter rather than disappearing, and the decision is whether that converter ships in the wallet, ships separately, or the old format is simply supported read-only for a transition window. ### Notes - No consensus surface. - The encrypt-wallet round-trip check is the gate that would catch a wallet-format regression here, and it is runnable today: it needs `db_dump`, which a BDB built with its utilities provides. It ran twice as a release gate for v0.13.8. - The descriptor question is not resolved by this issue and stays in #41.
btcbob referenced this issue from a commit 2026-09-25 13:07:06 +00:00
btcbob referenced this issue from a commit 2026-09-25 23:11:44 +00:00
btcbob referenced this issue from a commit 2026-09-26 01:31:01 +00:00
btcbob referenced this issue from a commit 2026-09-26 02:42:16 +00:00
btcbob referenced this issue from a commit 2026-09-26 02:49:35 +00:00
btcbob referenced this issue from a commit 2026-09-26 04:49:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SubGeniusFinance/dobbscoin-source#44
No description provided.