add option to bumpfee RPC to prevent it adding new inputs #20935

issue dooglus openend this issue on January 14, 2021
  1. dooglus commented at 3:52 pm on January 14, 2021: contributor

    Is your feature request related to a problem? Please describe.

    When I use the bumpfee RPC it adds new inputs, potentially damaging privacy. I created the original transaction carefully using coin control to avoid linking specific UTXOs, but bumpfee undoes this by adding new inputs apparently at random.

    This is further exacerbated by the way in which bumpfee decides whether to add new inputs or not. It attempts to bump the fee by reducing the change output if possible, but I label my change outputs which causes IsChange() not to recognize them as change. Any labelled UTXO is considered not to be change, which is incorrect:

    bool CWallet::IsChange(const CScript& script) const
    {
        // TODO: fix handling of 'change' outputs. The assumption is that any
        // payment to a script that is ours, but is not in the address book
        // is change.
    

    Describe the solution you’d like

    I’d like to be able to tell bumpfee not to add new inputs. I see in recent release notes:

    The fundrawtransaction RPC now supports add_inputs option that when false prevents adding more inputs if necessary and consequently the RPC fails.

    Something like that for bumpfee would be ideal.

    I’d also like to be able to bump the fee on transactions where the change is labelled without adding new inputs, and to be able to specify which new inputs to add if new inputs need adding. Basically coin control for bumpfee.

  2. dooglus added the label Feature on Jan 14, 2021
  3. jonatack commented at 7:52 pm on January 21, 2021: contributor
    I’d fix this if I thought it would attract enough review.
  4. ghost commented at 4:30 am on January 24, 2021: none

    @dooglus Concept ACK. I need to do more tests related to this issue. Already working on adding a warning in GUI and mentioned few details in other issue:

    #20795 (comment)

    You can also check one other related issue and help with review of associated PRs: #20598

    I’d fix this if I thought it would attract enough review. @jonatack

    Not the best in C++, new to Bitcoin Core development as well but I will try to review if the logic to resolve issue is simple. I will also request few other devs I know who might help with the review.

  5. danben commented at 2:04 am on February 24, 2021: contributor
    @luke-jr Why is it that SetLabel sets m_change to false?
  6. luke-jr commented at 2:54 am on February 24, 2021: member
    @danben m_change is defined by absence of any label, in the current wallet format. Notice it is never assigned anywhere else, and does not have a db field of its own.
  7. danben commented at 0:10 am on February 27, 2021: contributor
    @luke-jr Sorry, I do see that but I meant to ask about the intended semantics. As someone very new to bitcoin I would have guessed from their names that a change output is one that my wallet can solve for (or something like that) and a label is just a human-readable way for me to refer to an output. It isn’t clear to me why a change output must be unlabelled.
  8. Sjors commented at 6:42 pm on April 2, 2021: member

    I would also like a add_inputs boolean that I can set to false. Especially when transferring a single UTXO it’s nice to be able to just lower the amount rather than add inputs. There should be a clear warning in the help that this option will change the amount, so it’s not recommended to use when paying a merchant.

    Somewhat related: #11122

    I’d like to see a “button” for this in the GUI too. This would involve changing the current bumpfee prompt into an actual window. See also #11717.

    Coin control for bumpfee would be cool as well, especially in the GUI, but sounds like a separate PR.

  9. glozow commented at 8:57 am on August 4, 2022: member
    Have you tried using coin control to select the exact outputs and subtracting the fee from output amount?
  10. ghost commented at 10:51 am on August 4, 2022: none

    Have you tried using coin control to select the exact outputs and subtracting the fee from output amount?

    How can we use coincontrol with bumpfee RPC?

  11. jb55 commented at 6:41 pm on May 29, 2024: contributor

    another thing I wanted to do today with a single input+output is to bump the fee + add an output, reducing an amount from the first output and sharing a bit to the second one. from what I can tell there are simply no tools that exist that allow me to do this with a psbt.

    I guess this is a very uncommon operation so it’s the not that surprising.

  12. jb55 commented at 7:11 pm on May 29, 2024: contributor

    oh! this was added:

    maybe one day this could have a UI?


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-03 10:13 UTC

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