Skip to content

Conversation

@luke-jr
Copy link
Member

@luke-jr luke-jr commented Oct 15, 2020

As a new requirement, sqlite support should be optional. This PR aims to be only minimum/blocker changes for 0.21.

Potential follow-up PRs after this:

  • Make BDB support optional
  • Nicer error messages when user tries to load an unsupported wallet
  • Don't compile descriptor wallet code if sqlite disabled

Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK.

Sqlite is already optional in depends using NO_SQLITE=1, but configure will still look for it (without this PR).

I prefer to disable the creation of descriptor wallets if this flag is used (createwallet RPC and gui). That gives us the flexibility to use native Sqlite stuff for those wallets in the future, without having to worry about BDB upgrade paths.

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 15, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@laanwj
Copy link
Member

laanwj commented Oct 15, 2020

Make BDB support optional

Making bdb optional would be more interesting looking forward. But no problem with this either, concept ACK.

@laanwj laanwj added this to the 0.21.0 milestone Oct 15, 2020
@luke-jr
Copy link
Member Author

luke-jr commented Oct 15, 2020

Improved configure help per request, and added nicer behaviour in RPC/GUI around descriptor wallet stuff.

(A future PR can remove descriptor wallet code entirely if desired.)

@Sjors
Copy link
Member

Sjors commented Oct 16, 2020

tACK f9b93a0 on macOS (though I couldn't test the scenario of not having a sqlite library at all on the system)

@hebasto
Copy link
Member

hebasto commented Oct 18, 2020

Concept ACK.

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK, looks good.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach ACK f9b93a0053476055759124160efa87978d6b635f

@luke-jr
Copy link
Member Author

luke-jr commented Oct 20, 2020

Assert added, checkbox forced off, and help message made to match others

@jonasschnelli
Copy link
Contributor

Concept ACK – however, I agree with @laanwj that making BerkleyDB optional could be more interesting for many users.

@luke-jr
Copy link
Member Author

luke-jr commented Oct 20, 2020

@jonasschnelli I don't disagree, it's just outside the scope of this PR. Hopefully once it's merged, someone (maybe me) will extend it to BDB and we can discuss if it belongs in 0.21 or 0.22. :)

@jonasschnelli
Copy link
Contributor

Would detecting an sqlite wallet (look for the sqlite magic) make sense to give more specific errors in case someone tries to load a sqlite wallet with a non-sqlite-supporting bitcoind/qt? (could be a follow up PR is complicated).

Current error in the deamon...

2020-10-20T14:17:40Z Error: "/tmp/dummy/regtest/wallets/test/wallet.dat" corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup.
Error: "/tmp/dummy/regtest/wallets/test/wallet.dat" corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup.

and the GUI:
Bildschirmfoto 2020-10-20 um 16 19 34

@jonasschnelli
Copy link
Contributor

Tested ACK bbb42a6

@luke-jr
Copy link
Member Author

luke-jr commented Oct 20, 2020

@jonasschnelli Added nicer error messages to the possible followup list

@achow101
Copy link
Member

ACK bbb42a6

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK bbb42a6, tested on Linux Mint 20 (x86_64, Qt 5.12.8).

Also tested with uninstalled libsqlite3-dev package.

@Sjors
Copy link
Member

Sjors commented Oct 21, 2020

re-utACK bbb42a6

@DrahtBot
Copy link
Contributor

Gitian builds

File commit f5bd46a
(master)
commit 6ffb6bb81f42731dfdf4b5d0cbb30a6674841ab3
(master and this pull)
bitcoin-core-linux-0.21-res.yml d1971dabc444008d... 0798c203b6e09a05...
bitcoin-core-osx-0.21-res.yml de235a951f7a465e... a94f4cc48a9f1586...
bitcoin-core-win-0.21-res.yml f75ce7b9355d334c... dad19f4859e2f299...
*-aarch64-linux-gnu-debug.tar.gz 6ed9c70434fc7fc2... 58b346b18dd66f04...
*-aarch64-linux-gnu.tar.gz 3af5f18ffa364c24... 304668f0ebf061c7...
*-arm-linux-gnueabihf-debug.tar.gz 098fc410215e7c42... 766fa391cdcc9bf7...
*-arm-linux-gnueabihf.tar.gz 3f2c975b713698b2... 6343eb5496bf9006...
*-osx-unsigned.dmg 012c0dc0e1b3f2ec... 697b8c30db7cef8c...
*-osx64.tar.gz 6409b02ac19538f2... 8a03777c8d930f6f...
*-riscv64-linux-gnu-debug.tar.gz 6da1f76714b4dbfe... e1db67a1c0303b33...
*-riscv64-linux-gnu.tar.gz a90367c39515c3b4... e81e39272fb13dcc...
*-win64-debug.zip 453e395581992f20... dcc41a9e711c3444...
*-win64-setup-unsigned.exe 8b50662e73d518ea... aac04da6aebe94f0...
*-win64.zip aa74cb3b0978fb5a... cf2ea51afa26683c...
*-x86_64-linux-gnu-debug.tar.gz 7e318d3ab76e48eb... ce3626928a07add9...
*-x86_64-linux-gnu.tar.gz 6447ef245d9ee8f6... 4200ff1531fdffb0...
*.tar.gz 8bce7f0b98fd7610... f3498bf706a94c51...
linux-build.log 3c348dc643432917... e56cf9dad51226b2...
osx-build.log 083ca63c793f3b21... efc09f7607615616...
win-build.log 72ceb0afecdf12df... 7f66e15bea4fbcc6...
bitcoin-core-linux-0.21-res.yml.diff bf7e89aa937f8ecf...
bitcoin-core-osx-0.21-res.yml.diff d8f55dc5197610b0...
bitcoin-core-win-0.21-res.yml.diff 79ef4c9af9a45be7...
linux-build.log.diff 96380729f01a98c7...
osx-build.log.diff 8999f097f0fa0113...
win-build.log.diff 10e85d6d03b33e8f...

@DrahtBot
Copy link
Contributor

Guix builds

File commit 9af7c19
(master)
commit 7599eeae0e860fe281987ae2059a240de8169777
(master and this pull)
*-aarch64-linux-gnu-debug.tar.gz a0883e94fe7d7b45... 0a1e730bd2d66545...
*-aarch64-linux-gnu.tar.gz f515a87f3d749152... 545103eda676c9d5...
*-arm-linux-gnueabihf-debug.tar.gz 200e141a7d2c4169... 75ea40a17872c596...
*-arm-linux-gnueabihf.tar.gz a9f0d5752bab18d4... e550ac81679954d5...
*-riscv64-linux-gnu-debug.tar.gz 862c0b91637b1d13... 84c2da6f70a1c479...
*-riscv64-linux-gnu.tar.gz b7ddd167f9c6089c... d2270388bd4aeba0...
*-win-unsigned.tar.gz d9fd15e501580e57... 8e71354ee506a29e...
*-win64-debug.zip 65810928272e2290... d8aa8c3210ab0446...
*-win64-setup-unsigned.exe 95eeb02773751b70... c0bb2c8c61f27617...
*-win64.zip 39e8e65f96ba0048... 4b68399bc9c1c889...
*-x86_64-linux-gnu-debug.tar.gz 5dc4fdbe449bd036... 5365546fff5c13b0...
*-x86_64-linux-gnu.tar.gz 3949c68642f0c01a... b936ca945ddc5a0d...
*.tar.gz 333868caaa79db4d... 067248d9cc59d710...
guix_build.log 33920a430da60d00... 0ed036c5f20963a3...
guix_build.log.diff f3a4bd03af9d9f2a...

@laanwj laanwj changed the title Make sqlite support optional (compile-time) build: Make sqlite support optional (compile-time) Oct 29, 2020
@laanwj laanwj merged commit f3727fd into bitcoin:master Oct 29, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 29, 2020
bbb42a6 RPC: createwallet: Nicer error message if descriptor wallet requested and sqlite support not compiled in (Luke Dashjr)
6608fec GUI: Create Wallet: Nicely disable descriptor wallet checkbox if sqlite support not compiled in (Luke Dashjr)
7b54d76 Make sqlite support optional (compile-time) (Luke Dashjr)

Pull request description:

  As a new requirement, sqlite support should be optional. This PR aims to be only minimum/blocker changes for 0.21.

  Potential follow-up PRs after this:
  * Make BDB support optional
  * Nicer error messages when user tries to load an unsupported wallet
  * Don't compile descriptor wallet code if sqlite disabled

ACKs for top commit:
  jonasschnelli:
    Tested ACK bbb42a6
  achow101:
    ACK bbb42a6
  Sjors:
    re-utACK bbb42a6
  hebasto:
    ACK bbb42a6, tested on Linux Mint 20 (x86_64, Qt 5.12.8).

Tree-SHA512: 500209dd1971310fab8ae51543343ce0ba91f088ccccff6109b4cc27547cd5532289dca6cb7dac2a7d7c59cdf3c8f5aacc31e9b0f912e38cea52ec26b97100bd
meshcollider added a commit that referenced this pull request Nov 1, 2020
7411876 Ensure a legacy wallet for BDB format check (Andrew Chow)
5866403 Skip --descriptor tests if sqlite is not compiled (Andrew Chow)

Pull request description:

  #20156 allows sqlite to not be compiled by configuring `--without-sqlite`. However doing so and then running the test runner will result in all of the `--descriptor` tests to fail. We should be skipping those tests if sqlite was not compiled.

ACKs for top commit:
  practicalswift:
    ACK 7411876: patch looks correct
  Sjors:
    tACK 7411876
  ryanofsky:
    Code review ACK 7411876
  hebasto:
    ACK 7411876, tested on Linux Mint 20 (x86_64), tests pass for binaries compiled with:

Tree-SHA512: 1d635a66d2b7bb865300144dfefcfdaf86133aaaa020c8f440a471476ac1205d32f2df704906ce6c2ea48ddf791c3c95055f6291340b4f7b353c1b02cab5cabe
laanwj added a commit that referenced this pull request Nov 23, 2020
d52f502 Fix mock SQLiteDatabases (Andrew Chow)
99309ab Allow disabling BDB in configure with --without-bdb (Andrew Chow)
ee47f11 GUI: Force descriptor wallets when BDB is not compiled (Andrew Chow)
71e40b3 RPC: Require descriptors=True for createwallet when BDB is not compiled (Andrew Chow)
6ebc41b Enforce salvage is only for BDB wallets (Andrew Chow)
a58b719 Do not compile BDB things when USE_BDB is defined (Andrew Chow)
b33af48 Include wallet/bdb.h where it is actually being used (Andrew Chow)

Pull request description:

  Adds a `--without-bdb` option to `configure` which disables the compilation of the BDB stuff. Legacy wallets will not be created when BDB is not compiled. A legacy-sqlite wallet can be loaded, but we will not create them.

  Based on #20156 to resolve the situation where both `--without-sqlite` and `--without-bdb` are provided. In that case, the wallet is disabled and `--disable-wallet` is effectively set.

ACKs for top commit:
  laanwj:
    Code review ACK d52f502

Tree-SHA512: 5a92ba7a542acc2e27003e9d4e5940e0d02d5c1f110db06cdcab831372bfd83e8d89c269caff31dd5bff062c1cf5f04683becff12bd23a33be731676f346553d
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants