-
Notifications
You must be signed in to change notification settings - Fork 312
Disable and uncheck blank when private keys are disabled #739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable and uncheck blank when private keys are disabled #739
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
Concept ACK. |
Do I understand correctly that we want to make these two flags mutually exclusive? Let me make sure I correctly understand the rational. I guess the state when both are Assuming the above is correct, do we want also to make them exclusive in RPC? If I'm not mistaken one can set both today. Also, IIUC existing wallets that set both are not a problem, because it's just redundant information and will not lead to unexpected behaviour. Am I correct in my understanding? |
Concept ACK. This change seems like an improvement, and I think it is good to make it clear that when private keys are disabled, the "blank" option is not useful and effectively meaningless. I think these options are still confusing, though, and instead of having checkboxes it would be better if you could choose what actual behavior you want:
I notice there was a similar proposal in #69 (comment): re: #739 (comment)
Yes if the disable private keys option is checked the blank option is basically useless, so it's confusing to leave it as option that can be toggled on an off but effectively doesn't do anything.
RPC is a lower level interface than the GUI and already exposes both flags directly, so maybe it could warn when blank flag is set uselessly, but as an API I don't think it should make an error out of a configuration that makes sense but is a little redundant, or that it should break code that worked previously. Also setting the flags independently through RPC can have some effect and may not be completely useless. For example, the blank flag was introduced in a later software release than the disable private keys flag, so setting the blank flag prevents the wallet from opening the wallet in older software. Also, IIUC, it is possible in RPC interface to disable the disable private keys option later, so maybe setting the blank flag could be useful if you anticipate doing that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested ACK.
I think there's a concise description on identifying these "disable private keys" and "blank wallet" concepts by @achow101 here.
I like the approach on replacing the checkboxes by radiobuttons proposed in #69 and bringing it here by @ryanofsky, I also like the fact having the description under each optiion, and more practical (removing the other 2 checkboxes that are disabled already: "external signer" in false
and "descriptor wallet" in true
) it seems clearer, wouldn't it be on a different PR?.
On the RPC side of this, I find this comment from @ryanofsky very useful:
Also setting the flags independently through RPC can have some effect and may not be completely useless. For example, the blank flag was introduced in a later software release than the disable private keys flag, so setting the blank flag prevents the wallet from opening the wallet in older software. Also, IIUC, it is possible in RPC interface to disable the disable private keys option later, so maybe setting the blank flag could be useful if you anticipate doing that.
Unify the GUI's create wallet with the RPC createwallet so that the blank flag is not set when private keys are disabled.
296f0a0
to
9ea31eb
Compare
I'm nor a GUI code expert neither a UX (user experience) expert, so take all of this with a healthy skepticism. I'm unsure if it's a clear win for UX because there's no hint to the user why the checkboxes change their state. I also like the idea with radio buttons and I'd be happy to review a new PR or re-review this one though. Maybe change the description of the PR, it seems like we actually want to keep the behaviour of RPC and GUI somewhat different, so the unification part is confusing. |
@S3RK do you think the UI changes here are actually worse, or just not an improvement? I agree the changes aren't ideal and aren't a clear win, but I think they don't make it worse necessarily. This PR disables the "make blank wallet" checkbox when "disable private keys" checkbox is enabled, instead of just automatically checking it. I think disabling the checkbox makes sense because it makes it clear than once private keys are disabled, the choice of whether to have a blank wallet is moot because the wallet will necessarily be empty. On the other hand, maybe the current UI makes it clearer that disabling private keys implies having a blank wallet, because it automatically checks blank wallet when you check disable private keys, and automatically unchecks disable private keys when you uncheck blank wallet. I guess both UI's seem reasonable to me, even if neither is ideal. I do agree that PR description could be clearer, and could describe what the UI change is, along with mentioning that the leaving the blank flag unset when the disable private keys flag is set makes GUI behavior match default RPC behavior. |
@ryanofsky no no, I don't think this change is making it worse. From my perspective, it's an improvement for core developers, because it provides clarity on the wallet flags usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 9ea31eb
This is correct, and an improvement.
Visual and UX improvements on wallet creation can be handled for a follow-up here if someone wants to take it. The issue around UX of wallet creation will be tackled in https://github.com/bitcoin-core/gui-qml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 9ea31eb
if (checked) { | ||
ui->disable_privkeys_checkbox->setChecked(false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
if (checked) { | |
ui->disable_privkeys_checkbox->setChecked(false); | |
} | |
if (checked) ui->disable_privkeys_checkbox->setChecked(false); |
if (checked) { | ||
ui->blank_wallet_checkbox->setChecked(true); | ||
ui->blank_wallet_checkbox->setChecked(false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
if (checked) { | |
ui->blank_wallet_checkbox->setChecked(true); | |
ui->blank_wallet_checkbox->setChecked(false); | |
} | |
if (checked) ui->blank_wallet_checkbox->setChecked(false); |
…ys are disabled 9ea31eb gui: Disable and uncheck blank when private keys are disabled (Andrew Chow) Pull request description: Unify the GUI's create wallet with the RPC createwallet so that the blank flag is not set when private keys are disabled. ACKs for top commit: S3RK: Code review ACK 9ea31eb jarolrod: ACK 9ea31eb pablomartin4btc: tACK 9ea31eb Tree-SHA512: 0c90dbd77e66f088c6a57711a4b91e254814c4ee301ab703807f281cacd4b08712d2dfeac7661f28bc0e93acc55d486a17b8b4a53ffa57093d992e7a3c51f4e8
…ys are disabled 9ea31eb gui: Disable and uncheck blank when private keys are disabled (Andrew Chow) Pull request description: Unify the GUI's create wallet with the RPC createwallet so that the blank flag is not set when private keys are disabled. ACKs for top commit: S3RK: Code review ACK 9ea31eb jarolrod: ACK 9ea31eb pablomartin4btc: tACK 9ea31eb Tree-SHA512: 0c90dbd77e66f088c6a57711a4b91e254814c4ee301ab703807f281cacd4b08712d2dfeac7661f28bc0e93acc55d486a17b8b4a53ffa57093d992e7a3c51f4e8
Unify the GUI's create wallet with the RPC createwallet so that the blank flag is not set when private keys are disabled.