Add information to "Confirm fee bump" window #186

pull ghost wants to merge 1 commits into bitcoin-core:master from changing 1 files +7 −0
  1. ghost commented at 11:56 PM on January 16, 2021: none
    • Add information in bump fee confirmation box according to the documentation: https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/bumpfee/

    • Workaround to fix issue: https://github.com/bitcoin/bitcoin/issues/20795 in which user isn't aware of new inputs, outputs added to replacement transaction before broadcasting. Initial transaction had used coin control features and custom change address. Until the issue is fixed by change in coin selection algorithm we can add this warning.

    • Waiting for comments from devs who are working on coin selection algorithm PRs or involved in related research. However got two comments from Luke Dashjr and Pieter Wuille:

    luke-jr: Reducing the change output also could be a privacy problem, since it identifies which output was change.

    sipa: Wallet doesn't know the original transaction was using coin control. So I think its expected that if you use automatic fee bumping, you'll get whatever the coin selection algorithm decides. As for why its not decreasing the change and instead adding another input, that may be a bug. (IRC: #bitcoin-core-dev)

  2. percy-g2 changes_requested
  3. percy-g2 commented at 7:12 AM on January 20, 2021: none

    Concept ACK

    Compiled successfully on Ubuntu 20.04.1 LTS and tested with below details:

    Initial Tx: 64e2c03527b50a934f9cdedf87813ab534023afd161c907f4380dd24506f9a71 Selected one of the Inputs, used one address from wallet as change address and broadcasted RBF enabled Tx.

    Replacement Tx: 02a48410d61974125ed145c465004e7e7c681b2398108ed4c4a5acea261b160c New inputs and Outputs were added automatically.

    User was informed about the changes in the "Confirm fee bump" dialog: image

    Can add one more <br /> in Line 517

  4. ghost commented at 7:38 AM on January 20, 2021: none
  5. percy-g2 approved
  6. hebasto commented at 10:55 AM on January 20, 2021: member

    IIUC, the purpose of this change is to warn users about privacy issues while bumping a fee, right?

    Why not to add this statement explicitly (however, not sure about exact wording) with an appropriate subtitle? Smth like "WARNING: fee bumping could leak privacy if new inputs and change output will be added to the transaction". @prayank23 Do you mind changing this PR title s/Add information in RBF pop-up/Add information to "Confirm fee bump" window/ ?

  7. unknown renamed this:
    Add information in RBF pop-up
    Add information to "Confirm fee bump" window
    on Jan 20, 2021
  8. ghost commented at 11:25 AM on January 20, 2021: none

    IIUC, the purpose of this change is to warn users about privacy issues while bumping a fee, right?

    Inform user about changes in replacement transaction apart from fees which is already mentioned. Adding inputs and outputs can be considered good or bad for privacy or fees depending on the user.

    As luke-jr mentioned reducing change output is also a privacy issue

    Why not to add this statement explicitly (however, not sure about exact wording) with an appropriate subtitle? Smth like "WARNING: fee bumping could leak privacy if new inputs and change output will be added to the transaction".

    I was considering adding the word "warning" but didn't. It can be added. Mentioning about privacy looks scary and as I explained above it may not be a privacy issue for some users. Let me explain with one example:

    Alice uses coin control features to select one input, custom change address and broadcasts RBF enabled tx. It is not confirmed for hours and she needs this amount urgently on one exchange for trading. She increases the fee with a replacement transaction not aware of other inputs and outputs being added, broadcasts it. There were few UTXOs in the wallet which were associated with darknet transactions and some of them were used in replacement transaction. In this case it's a privacy issue.

    Bob has a business and uses coin control features to select one input, custom change address and broadcasts RBF enabled tx. Not confirmed for hours, few users related to this business are waiting. Bob increases the fee with replacement transaction which adds few extra inputs and outputs but Bob doesn't care as this wallet has all transactions related to business. Fees could have been less if less inputs/outputs but priority in this case is to complete the users requests asap.

  9. hebasto commented at 11:34 AM on January 20, 2021: member

    Adding inputs and outputs can be considered good or bad for privacy or fees depending on the user.

    If a txout, that was not correlated to a user/wallet in any way, is added to a transaction via a new input, it is always bad for privacy. However, it is true that some users do not care about it.

  10. ghost commented at 11:40 AM on January 20, 2021: none

    Makes sense. Users may not care but it affects privacy. Will rephrase the sentence and add "warning" and "privacy".

  11. in src/qt/walletmodel.cpp:517 in 6be2bff70f outdated
     513 | @@ -514,6 +514,8 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
     514 |      questionString.append("</td><td>");
     515 |      questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));
     516 |      questionString.append("</td></tr></table>");
     517 | +    questionString.append("<br /><br />");
    


    hebasto commented at 1:06 PM on January 20, 2021:

    nit: Just <br> is used in the most codebase in this repository.


    unknown commented at 12:11 AM on January 21, 2021:

    Done. Replaced <br /> with <br>

  12. in src/qt/walletmodel.cpp:518 in 6be2bff70f outdated
     513 | @@ -514,6 +514,8 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
     514 |      questionString.append("</td><td>");
     515 |      questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));
     516 |      questionString.append("</td></tr></table>");
     517 | +    questionString.append("<br /><br />");
     518 | +    questionString.append(tr("WARNING: New inputs and outputs can be added in replacement transaction if necessary which affects privacy"));
    


    hebasto commented at 1:07 PM on January 20, 2021:

    nit: Could a full stop at the sentence end make it better?


    luke-jr commented at 7:10 PM on January 20, 2021:

    This seems to confusing to normal people. They don't know what inputs or outputs are, nor necessarily care how Bitcoin works internally.


    hebasto commented at 7:19 PM on January 20, 2021:

    This seems to confusing to normal people.

    :D

    They don't know what inputs or outputs are, nor necessarily care how Bitcoin works internally.

    Educational purpose, no?

    Could it be re-worded without revealing of internal tx details?


    unknown commented at 12:16 AM on January 21, 2021:

    nit: Could a full stop at the sentence end make it better?

    Done

    This seems to confusing to normal people. They don't know what inputs or outputs are, nor necessarily care how Bitcoin works internally.

    "Inputs" is already mentioned in GUI in 'Coin Control Features", user who did the initial transaction by selecting inputs obviously cares about it and "Outputs" can be replaced with "Change Address" although it can mean different things but easier to understand.


    luke-jr commented at 1:24 AM on January 21, 2021:

    Users also shouldn't need to know about internals.

    Coin Control Features are an advanced feature.

    Maybe just only append this when it's enabled?


    unknown commented at 2:39 AM on January 21, 2021:

    Maybe just only append this when it's enabled?

    This makes sense. What is the best way to know if coin control was used for a transaction? So that it can be used in if statement for this warning.

    Also any thoughts on this issue? https://github.com/bitcoin/bitcoin/issues/20598

    Extra inputs and outputs might be added even if "Coin Control" wasn't used?


    luke-jr commented at 5:19 PM on January 21, 2021:

    AFAIK it isn't possible right now, we'd just need to assume the current checkbox state is what the user wants behaviour based on


    unknown commented at 5:56 AM on January 22, 2021:

    IMO a generic warning message based on bumpfee docs is good enough for now. In long term we need to fix few other issues related to coin selection algorithm, coin control for RBF etc. It can add random inputs even when coin control is disabled.


    luke-jr commented at 3:42 PM on January 22, 2021:

    With CC disabled, it was created with random inputs already...


    unknown commented at 10:45 AM on January 24, 2021:

    Added if statement to check if CC is enabled

  13. hebasto commented at 1:08 PM on January 20, 2021: member

    Approach ACK 6be2bff70f93c48807bf3620cdef6fe0b40fbe89 @prayank23 Do you mind squashing all commits into the single one?

  14. hebasto commented at 1:10 PM on January 20, 2021: member

    @achow101 @meshcollider @luke-jr @Sjors @sipa

    Do you mind looking into this PR?

  15. ghost commented at 12:17 AM on January 21, 2021: none

    Do you mind squashing all commits into the single one? @hebasto Will do once there are enough ACKs and we are sure about the statement that can be used in this warning.

  16. hebasto commented at 12:30 AM on January 21, 2021: member

    @prayank23

    Do you mind squashing all commits into the single one?

    @hebasto Will do once there are enough ACKs and we are sure about the statement that can be used in this warning.

    Doing in such a way all ACKs will be invalidated. It will require additional re-reviewing that increases the review burden.

  17. ghost commented at 12:45 AM on January 21, 2021: none

    Doing in such a way all ACKs will be invalidated. It will require additional re-reviewing that increases the review burden.

    Done. Squashed commits.

  18. hebasto approved
  19. hebasto commented at 1:15 AM on January 21, 2021: member

    ACK 3d93f27dc2361428dbbd57a11d99b7681faf0a2d, tested on Linux Mint 20.1 (Qt 5.12.8):

    Screenshot from 2021-01-21 03-08-17

    More sophisticated solutions (e.g., opening a coin control dialog) could be added in follow ups.

  20. in src/qt/walletmodel.cpp:518 in 3d93f27dc2 outdated
     513 | @@ -514,6 +514,8 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
     514 |      questionString.append("</td><td>");
     515 |      questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));
     516 |      questionString.append("</td></tr></table>");
     517 | +    questionString.append("<br><br>");
     518 | +    questionString.append(tr("WARNING: New inputs and outputs can be added in replacement transaction if necessary which affects privacy."));
    


    jonatack commented at 11:50 AM on January 21, 2021:

    grammar nit, "which" needs a preceding comma

        questionString.append(tr("WARNING: New inputs and outputs can be added in replacement transaction if necessary, which affects privacy."));
    

    jonatack commented at 11:52 AM on January 21, 2021:

    An article ("a", "the", etc.) is also missing before the word "replacement"


    jonatack commented at 11:55 AM on January 21, 2021:

    "can be added...if necessary" is vague, would suggest being more precise: added by what, why would it be necessary.


    unknown commented at 12:04 PM on January 21, 2021:

    An article ("a", "the", etc.) is also missing before the word "replacement"

    Will add "the"

    "can be added...if necessary" is vague, would suggest being more precise: added by what, why would it be necessary.

    I rephrased 'adding inputs when necessary. It may add a new change output if one does not already exist.' from https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/bumpfee/ Not sure what else can I add which even normal users can understand


    jonatack commented at 12:20 PM on January 21, 2021:

    Thanks for updating! (very kind but no need to credit me for a drive-by comment) can you squash to one commit?


    jonatack commented at 12:22 PM on January 21, 2021:

    Oh I see, sorry, this is based somewhat on the bumpfee help.

    The command will pay the additional fee by reducing change outputs or adding inputs when necessary.
    It may add a new change output if one does not already exist.
    All inputs in the original transaction will be included in the replacement transaction.
    

    jonatack commented at 12:33 PM on January 21, 2021:

    I'm not sure this should have a screaming WARNING.

    Maybe:

    This will pay the additional fee by reducing change outputs or
    adding inputs when necessary. It may add a new change output if one
    does not already exist. These changes may potentially leak privacy.
    

    unknown commented at 12:38 PM on January 21, 2021:

    can you squash to one commit?

    Sure will do once we finalize the warning message. Does the below mentioned thing look okay?

    WARNING: This will pay the additional fee by reducing change outputs or adding inputs when necessary. It may add a new change output if one does not already exist. These may potentially leak privacy.

    IMO a generic message would work better with other issues open and less clarity on what's happening with coin selection. A long term solution will be:

    1. Improve Coin Selection Algorithm
    2. Provide details of replacement transaction with all inputs and outputs similar to fees.
    3. Provide an option to use coin control while doing replacement transaction

    unknown commented at 12:42 PM on January 21, 2021:

    But the above suggested message will be incorrect because the issue is more than just user not aware of how RBF works in bitcoin core wallet. It is also the coin selection algorithm when using a custom change address in the initial transaction. Original Issue: https://github.com/bitcoin/bitcoin/issues/20795


    unknown commented at 12:45 PM on January 21, 2021:

    No extra inputs or outputs were added in this: https://tbtc.bitaps.com/f35a69b066d1ff79cb13bc6dba2eb345f239b2bfa268e3fb0ee06b28748bea99 when I didn't use "custom change address" for initial transaction


    dooglus commented at 4:43 PM on January 21, 2021:

    If you setlabel the change address before bumping the fee it causes Core not to recognize the change address as a change address and to therefore add a new input. I think it makes sense to label all your change UTXOs if you plan to use coin control for privacy. Without labelling your change how do you hope to prevent undesired UTXO linkage?

    I wrote about this in bitcoin/bitcoin#20935.


    jonatack commented at 7:46 PM on January 21, 2021:

    I could fix the issue but I doubt it would see enough review; my fee rate work has just been sitting there for the past couple months.

    As for the message, could s/will/may/, e.g.:

    "Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These may potentially leak privacy."


    unknown commented at 5:52 AM on January 22, 2021:
  21. luke-jr changes_requested
  22. luke-jr commented at 3:43 PM on January 22, 2021: member

    (NACK until message is either CoinControl-only or understandable for non-technical folks)

  23. jonatack commented at 3:53 PM on January 22, 2021: contributor

    utACK 570ebc6238639d40c7d54bbf39857de9416f2ba2 in terms of the message content

    I understand @luke-jr's disagreement with the change but I don't know enough about GUI user understanding or expertise level to have an opinion.

  24. ghost commented at 9:41 AM on January 24, 2021: none

    (NACK until message is either CoinControl-only or understandable for non-technical folks) @luke-jr

    Done. Added an if statement in https://github.com/bitcoin-core/gui/commit/0ae1ce0eb7fb559cccbbca961082dc4e506187ff

    "Confirm fee bump" Window with Coin Control Features option disabled: image

    "Confirm fee bump" Window with Coin Control Features option enabled: image

  25. in src/qt/walletmodel.cpp:522 in 0ae1ce0eb7 outdated
     513 | @@ -514,6 +514,13 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
     514 |      questionString.append("</td><td>");
     515 |      questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));
     516 |      questionString.append("</td></tr></table>");
     517 | +
     518 | +    //Check if "Coin Control Features" options is enabled to display warning in "Confirm fee bump" Window
     519 | +    if (getOptionsModel()->getCoinControlFeatures() == true) {
     520 | +    questionString.append("<br><br>");
     521 | +    questionString.append(tr("Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These may potentially leak privacy."));
     522 | +    }
    


    jonatack commented at 6:52 PM on January 24, 2021:

    you can run clang-format -i src/qt/walletmodel.cpp --lines=518:522 to format your code automatically

         if (getOptionsModel()->getCoinControlFeatures() == true) {
    -    questionString.append("<br><br>");
    -    questionString.append(tr("Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These may potentially leak privacy."));
    +        questionString.append("<br><br>");
    +        questionString.append(tr("Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These may potentially leak privacy."));
         }
    

    unknown commented at 1:06 PM on January 25, 2021:

    Thanks

  26. in src/qt/walletmodel.cpp:518 in 0ae1ce0eb7 outdated
     513 | @@ -514,6 +514,13 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
     514 |      questionString.append("</td><td>");
     515 |      questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));
     516 |      questionString.append("</td></tr></table>");
     517 | +
     518 | +    //Check if "Coin Control Features" options is enabled to display warning in "Confirm fee bump" Window
    


    jonatack commented at 6:54 PM on January 24, 2021:

    nit, not sure this comment is needed, but if you keep it

        // Display warning in the "Confirm fee bump" window if the "Coin Control Features" option is enabled
    
  27. in src/qt/walletmodel.cpp:519 in 0ae1ce0eb7 outdated
     513 | @@ -514,6 +514,13 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
     514 |      questionString.append("</td><td>");
     515 |      questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));
     516 |      questionString.append("</td></tr></table>");
     517 | +
     518 | +    //Check if "Coin Control Features" options is enabled to display warning in "Confirm fee bump" Window
     519 | +    if (getOptionsModel()->getCoinControlFeatures() == true) {
    


    jonatack commented at 6:58 PM on January 24, 2021:
        if (getOptionsModel()->getCoinControlFeatures()) {
    
  28. jonatack commented at 6:59 PM on January 24, 2021: contributor

    A few suggestions below; thanks for updating.

  29. jonatack commented at 1:37 PM on January 25, 2021: contributor

    utACK 84add0d8dc23b44a5ca8f7089653cc7ad5081404

  30. in src/qt/walletmodel.cpp:521 in 84add0d8dc outdated
     513 | @@ -514,6 +514,13 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
     514 |      questionString.append("</td><td>");
     515 |      questionString.append(BitcoinUnits::formatHtmlWithUnit(getOptionsModel()->getDisplayUnit(), new_fee));
     516 |      questionString.append("</td></tr></table>");
     517 | +
     518 | +    // Display warning in the "Confirm fee bump" window if the "Coin Control Features" option is enabled
     519 | +    if (getOptionsModel()->getCoinControlFeatures()) {
     520 | +        questionString.append("<br><br>");
     521 | +        questionString.append(tr("Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These may potentially leak privacy."));
    


    luke-jr commented at 9:27 PM on January 25, 2021:
            questionString.append(tr("Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These changes may potentially leak privacy."));
    
  31. luke-jr approved
  32. luke-jr commented at 9:27 PM on January 25, 2021: member

    utACK, minor language nit

  33. hebasto approved
  34. hebasto commented at 10:24 PM on January 25, 2021: member

    ACK 84add0d8dc23b44a5ca8f7089653cc7ad5081404

    Happy to re-ACK after addressing the recent @luke-jr's suggestion.

  35. Add information to "Confirm fee bump" window
    Check if "Coin Control features" are enabled to display warning before broadcasting replacement transaction
    Workaround to fix issue: bitcoin/bitcoin#20795
    
    Co-authored-by: Jon Atack <jon@atack.com>
    232d1f92bb
  36. jonasschnelli commented at 9:28 AM on January 26, 2021: contributor

    Tested ACK - 232d1f92bb4c99ce0f5d210b17562c96c32ab61a

  37. jonasschnelli commented at 9:29 AM on January 26, 2021: contributor

    <img width="532" alt="Bildschirmfoto 2021-01-26 um 10 26 59" src="https://user-images.githubusercontent.com/178464/105826627-3e17b500-5fc1-11eb-9f47-a5450c8f7a02.png">

    (nit: not sure if it needs to be bold)

  38. jonasschnelli merged this on Jan 26, 2021
  39. jonasschnelli closed this on Jan 26, 2021

  40. sidhujag referenced this in commit 37894802aa on Jan 26, 2021
  41. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 15:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me