Skip to content

Conversation

jonasschnelli
Copy link
Contributor

  • Inverts the smartfee-slider, left = fast, right = normal
  • Use CWallets default confirmation (currently 2 blocks)
  • Show the estimated time for confirmation
  • Decouple the global nTxConfirmTarget from the GUI (used a per-tx value!)
  • Always throw CoinControl into CreateTransaction

@jonasschnelli jonasschnelli added this to the 0.14.0 milestone Oct 21, 2016
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);
Copy link
Contributor Author

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.

@jonasschnelli
Copy link
Contributor Author

After this PR, slider looks like:
bildschirmfoto 2016-10-21 um 10 14 00

@luke-jr
Copy link
Member

luke-jr commented Oct 21, 2016

Inverts the smartfee-slider, left = fast, right = normal

?!

@jonasschnelli
Copy link
Contributor Author

Inverts the smartfee-slider, left = fast, right = normal

?!

Before this PR, left side was "normal" confirmation speed (of a target of 25 blocks!), right side = fast confirmation.
This PR flips it (left side = fast confirmation, right side = slow confirmation).

@luke-jr
Copy link
Member

luke-jr commented Oct 21, 2016

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.

@luke-jr
Copy link
Member

luke-jr commented Oct 21, 2016

(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);
Copy link
Member

@laanwj laanwj Oct 21, 2016

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.

Copy link
Member

@laanwj laanwj Oct 21, 2016

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)

@laanwj
Copy link
Member

laanwj commented Oct 21, 2016

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).

@jonasschnelli jonasschnelli force-pushed the 2016/10/qt_slider branch 3 times, most recently from 147f98c to 008a3ec Compare October 21, 2016 12:27
@jonasschnelli
Copy link
Contributor Author

Updated:

  1. Reverted the left/right reversing
  2. Followed @laanwj's advice of using a custom CCoinControl instance

@morcos
Copy link
Contributor

morcos commented Oct 21, 2016

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.

@jonasschnelli
Copy link
Contributor Author

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.

@laanwj
Copy link
Member

laanwj commented Oct 21, 2016

then I suggest we choose 6 for both

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.

@maflcko
Copy link
Member

maflcko commented Oct 21, 2016

Completely agree with what @laanwj said in the last comment. I think setting the default for both to 6 is a good compromise and a short mention in the release notes as well as the reworked GUI will hopefully let users make more educated/suitable choices.

@da2ce7
Copy link

da2ce7 commented Oct 22, 2016

(Possibly Scope Creep)
The transaction fee area should show the following additional information: Transaction Weight; Transaction Fee Rate; and Total Fee to be Paid.

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.

@laanwj
Copy link
Member

laanwj commented Oct 24, 2016

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.

@jonasschnelli
Copy link
Contributor Author

Rebased.

@laanwj laanwj merged commit cfe77ef into bitcoin:master Oct 28, 2016
laanwj added a commit that referenced this pull request Oct 28, 2016
…ion target

cfe77ef [Qt] overhaul smart-fee slider, adjust default confirmation target (Jonas Schnelli)
6f02899 [Qt] Hide nTxConfirmTarget behind WalletModel (Jonas Schnelli)
004168d CoinControl: add option for custom confirmation target (Jonas Schnelli)
laanwj added a commit to laanwj/bitcoin that referenced this pull request Oct 28, 2016
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.
@jonasschnelli jonasschnelli mentioned this pull request Oct 28, 2016
18 tasks
@jtimon
Copy link
Contributor

jtimon commented Dec 25, 2016

Mhmm, I'm confused, it seems it is discussed here that the slider shouldn't be inverted, but it ended being inverted anyway, no?
I completely missed the rationale for the inversion.

codablock pushed a commit to codablock/dash that referenced this pull request Jan 13, 2018
…nfirmation target

cfe77ef [Qt] overhaul smart-fee slider, adjust default confirmation target (Jonas Schnelli)
6f02899 [Qt] Hide nTxConfirmTarget behind WalletModel (Jonas Schnelli)
004168d CoinControl: add option for custom confirmation target (Jonas Schnelli)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
…nfirmation target

cfe77ef [Qt] overhaul smart-fee slider, adjust default confirmation target (Jonas Schnelli)
6f02899 [Qt] Hide nTxConfirmTarget behind WalletModel (Jonas Schnelli)
004168d CoinControl: add option for custom confirmation target (Jonas Schnelli)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 15, 2019
…nfirmation target

cfe77ef [Qt] overhaul smart-fee slider, adjust default confirmation target (Jonas Schnelli)
6f02899 [Qt] Hide nTxConfirmTarget behind WalletModel (Jonas Schnelli)
004168d CoinControl: add option for custom confirmation target (Jonas Schnelli)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants