Page MenuHomePhabricator

Use SQLite for descriptor wallets
AbandonedPublic

Authored by PiRK on Nov 26 2021, 15:03.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

Commit https://github.com/bitcoin/bitcoin/pull/19077/commits/9af5de3798c49f86f27bb79396e075fb8c1b2381

Use SQLite for descriptor wallets

MakeWalletDatabase no longer has a default DatabaseFormat. Instead
callers, like CWallet::Create, need to specify the database type to
create if the file does not exist. If it exists and NONE is given, then
CreateWalletDatabase will try to autodetect the type.

Commit https://github.com/bitcoin/bitcoin/pull/19077/commits/9b78f3ce8ed1867c37f6b9fff98f74582d44b789

walletutil: Wallets can also be sqlite

Detect and open sqlite wallets

This is a backport of core#19077 [23 & 24/26]
It also includes a change to wallet_descriptor.py from core#20125 and a change from core#20365 to tool_wallet.py, because the commits activation --descriptors for these two functional tests were intentionaly backported out of order to improve the sqlite test coverage.

Depends on D10573

Test Plan

ninja all check-all

The SQLite wallets are now tested in various functional tests supporting the --descriptors option.

Event Timeline

PiRK requested review of this revision.Nov 26 2021, 15:03
deadalnix requested changes to this revision.Nov 26 2021, 16:47
deadalnix added a subscriber: deadalnix.

So the goal here is to create wallet, using sqllite, with zero test by default?

Is that a joke?

This revision now requires changes to proceed.Nov 26 2021, 16:47

Squash with D10567, so that creating and opening sqlite descriptor wallets happens in the same commit, and is immediately coverd by functional tests.

Update the summary, dependency and test plan.

PiRK planned changes to this revision.Dec 1 2021, 09:57
PiRK edited the summary of this revision. (Show Details)
PiRK edited the test plan for this revision. (Show Details)

There is still a problem with the dependency cycle in phabricator that I need to solve. This now depends on D10571

PiRK requested review of this revision.Dec 1 2021, 10:15
PiRK edited the summary of this revision. (Show Details)

manually fixed the dependency stack via the the phabricator interface

deadalnix requested changes to this revision.Dec 14 2021, 17:01

Where is this tested?

This revision now requires changes to proceed.Dec 14 2021, 17:01
PiRK edited the summary of this revision. (Show Details)
PiRK edited the test plan for this revision. (Show Details)

Rebase on D10576 to have at least one test be explicitely affected by the database switch. Update wallet_descriptor.py accordingly, to check the database format for descriptor wallets is now "sqlite".

Under the hood, all functional tests running with --descriptors (see list in test_runner.py) will test sqlite operations from this point forward.

PiRK edited the summary of this revision. (Show Details)

Rebase and include a necessary change from core#20365 to tool_wallet.py (because the test was intentionaly enabled for descriptor wallet in D10672 to improve sqlite test coverage on activation)

Update commit sequence number after moving D10573 before this commit (for additional sqlite test coverage).

deadalnix requested changes to this revision.Dec 20 2021, 15:59

Clearing my queue.

This revision now requires changes to proceed.Dec 20 2021, 15:59