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

issue dooglus opened 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. dooglus cross-referenced this on Jan 21, 2021 from issue Privacy Issue - Increase Fee with Custom Change Address grabs new UTXO by cointastical
  4. dooglus cross-referenced this on Jan 21, 2021 from issue Add information to "Confirm fee bump" window by ghost
  5. jonatack commented at 7:52 PM on January 21, 2021: contributor

    I'd fix this if I thought it would attract enough review.

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

  7. danben cross-referenced this on Feb 23, 2021 from issue rpc: add the add_inputs option to bumpfee/psbtbumpfee by danben
  8. danben commented at 2:04 AM on February 24, 2021: contributor

    @luke-jr Why is it that SetLabel sets m_change to false?

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

  10. danben commented at 12: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.

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

  12. unknown cross-referenced this on Aug 4, 2022 from issue privacy: `add_inputs` argument for replacements to avoid adding unnecessary inputs by ghost
  13. 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?

  14. 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?

  15. unknown cross-referenced this on Sep 2, 2022 from issue [WIP] wallet: standardize change output detection process by furszy
  16. unknown cross-referenced this on Oct 27, 2022 from issue bumpfee behavior with custom change address by dooglus
  17. 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.

  18. 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: 2026-05-20 06:54 UTC