HomePhabricator

Merge #9662: Add createwallet "disableprivatekeys" option: a sane mode for…

Description

Merge #9662: Add createwallet "disableprivatekeys" option: a sane mode for watchonly-wallets

Summary:
a3fa4d6a6acf19d640a1d5879a00aa1f059e2380 QA: Fix bug in -usecli logic that converts booleans to non-lowercase strings (Jonas Schnelli)
4704e5f074e57782d058404a594a7313cf170cf0 [QA] add createwallet disableprivatekey test (Jonas Schnelli)
c7b8f343e99d9d53ea353ddce9a977f1886caf30 [Qt] Disable creating receive addresses when private keys are disabled (Jonas Schnelli)
2f15c2bc20d583b4c1788da78c9c635c36e03ed0 Add disable privatekeys option to createwallet (Jonas Schnelli)
cebefba0855cee7fbcb9474b34e6779369e8e9ce Add option to disable private keys during internal wallet creation (Jonas Schnelli)
9995a602a639b64a749545b7c3bafbf67f97324f Add facility to store wallet flags (64 bits) (Jonas Schnelli)

Pull request description:

This mode ('createwallet {"disableprivatekeys": true}') is intended for a sane pure watch-only mode, ideal for a use-case where one likes to use Bitcoin-Core in conjunction with a hardware-wallet or another solutions for cold-storage.

Since we have support for custom change addresses in `fundrawtransaction`, pure watch-only wallets including coin-selection are possible and do make sense for some use cases.

This new mode disables all forms of private key generation and ensure that no mix between hot and cold keys are possible.

Tree-SHA512: 3ebe7e8d54c4d4e5f790c348d4c292d456f573960a5b04d69ca5ef43a9217c7e7671761c6968cdc56f9a8bc235f3badd358576651af9f10855a0eb731f3fc508

Backport of Core PR9662
https://github.com/bitcoin/bitcoin/pull/9662/

Depends on D4175

Test Plan:

make check
test_runner.py
bitcoin-qt
Help -> Debug -> Console
createwallet noprivkey true

Select noprivkey wallet in the main window
In the Receive menu, the Request Payment button should be greyed out and not clickable.

pr9662post.png (530×846 px, 25 KB)

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, Fabien, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D4304

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 20 2018, 12:25
nakihitoCommitted on Nov 20 2019, 19:30
nakihitoPushed on Nov 20 2019, 19:30
Reviewer
Restricted Owners Package
Differential Revision
D4304: Merge #9662: Add createwallet "disableprivatekeys" option: a sane mode for watchonly-wallets
Parents
rABC1d290e5f49b7: Use local instance of ArgsManager in getarg_tests
Branches
Unknown
Tags
Unknown