-
Notifications
You must be signed in to change notification settings - Fork 37.7k
[Qt] overhaul smart-fee slider, adjust default confirmation target #8989
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
Conversation
c328672
to
63b9eb0
Compare
prepareStatus = model->prepareTransaction(currentTransaction); | ||
|
||
// always throw in the CoinControl instance, it is also used for internal tx-creation parameters (ex. confirmation target) | ||
prepareStatus = model->prepareTransaction(currentTransaction, CoinControlDialog::coinControl); |
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.
This could have unexpected side effects and needs good testing.
?! |
Before this PR, left side was "normal" confirmation speed (of a target of 25 blocks!), right side = fast confirmation. |
Yes, I'm saying it doesn't make sense to flip it, and you included no rationale.. not only does it make more sense for right=(faster|more fees) at least in LTR languages, changing existing behaviour in such a complete reversal is going to create even additional confusion among users. |
(personally I think it should be replaced with a dropdown for "eventually" (lowest reasonable fee), "within a week" (targeting 1000 blocks), "tomorrow" (targeting 144 blocks), "today" (target 66 blocks?), and "ASAP" (target next block)) |
prepareStatus = model->prepareTransaction(currentTransaction); | ||
|
||
// always throw in the CoinControl instance, it is also used for internal tx-creation parameters (ex. confirmation target) | ||
prepareStatus = model->prepareTransaction(currentTransaction, CoinControlDialog::coinControl); |
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.
I don't think we should do it this way. CoinControlDialog::coinControl should not be used if getCoinControlFeatures is disabled. It may have invalid state.
What about creating a temporary CoinControl object and just changing the confirmation setting in the case of non-coin-control? This will ensure it's at least starting from defaults.
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.
E.g. one clean way:
CCoinControl ctrl;
if (model->getOptionsModel()->getCoinControlFeatures()) {
ctrl = CoinControlDialog::coinControl;
}
if (ui->radioSmartFee->isChecked()) {
ctrl.nConfirmTarget = ui->sliderSmartFee->value();
}
prepareStatus = model->prepareTransaction(currentTransaction, ctrl);
(not sure if the ui->radioSmartFee->isChecked()
needs to be there)
Reversing left and right on the slider out of the blue is probably not a good idea - people will be used to the way it currently is and it will suddenly do something else, resulting in possible invalid sends. Let's replace it with a different widget altogether if it needs to be changed (e.g. for example what @luke-jr says). |
147f98c
to
008a3ec
Compare
Updated:
|
008a3ec
to
312e6cb
Compare
As discussed on IRC, I'm opposed to adjusting the default confirmation target to 2. I think with the way current fee estimation works, the default case should not be "I really want to be sure I'm included in one of the next 2 blocks" because it will lead to you paying too high a fee for what most people are trying to accomplish. I don't see much value in changing a default that any can easily change by moving a slider, however if we want to make command line and GUI line up, then I suggest we choose 6 for both. Alternatively, we wait until we overhaul fee estimation to make changes to the GUI at which time we do something closer to what Luke is suggesting. |
IMO there is no reason to have different confirmation target (especially not 2 vs 25) between the GUI and the RPC interface. The only reason I could imaging why we should have different default values, would be, if we assume we have different user-types between the RPC-wallet interface and the GUI. I think there should be a discussion about the default confirmation target,... but probably in a different PR. This change should result in having the same default-value between RPC and the GUI, using the RPC value as the dominating default-value. This is probably what users would expect if they use both interfaces or if they switch from GUI to RPC or vice versa. At the moment, if one does not expand the fee tab and just send a transaction, he could be surprised by the pretty-uncommon confirmation-target of 25 blocks. |
Yes there seemed to be some agreement around 6 in yesterday's meeting. I think it would be good to change both to that. Though I think changing that default is separate from what is done here - this just unifies the UI default to the overall default. Either way it needs to be clearly documented in the release notes that these defaults are changed. |
Completely agree with what @laanwj said in the last comment. I think setting the default for both to |
(Possibly Scope Creep) Also, is the unit: BTC/kB the correct unit for the fee when counting fees by weight? Users who are creating heavy transactions may wish to prioritise them lower to pay less fee. |
Yes, that is definitely scope creep. I think we should aim to merge this, then change the default to 6. Other changes can be done later. |
312e6cb
to
cfe77ef
Compare
Rebased. |
Recent discussion (in IRC meetings, and e.g. bitcoin#8989) has shown a preference for the default confirm target for smartfees to be 6 instead of 2, to avoid overpaying fees for questionable gain. 6 is also a compromise between the GUI's pre-bitcoin#8989 value of 25 and the bitcoind `-txconfirmtarget` default of 2. These were unified in bitcoin#8989, but this has made the (overly expensive) default of 2 as GUI default.
Mhmm, I'm confused, it seems it is discussed here that the slider shouldn't be inverted, but it ended being inverted anyway, no? |
nTxConfirmTarget
from the GUI (used a per-tx value!)CoinControl
intoCreateTransaction