Skip to content
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

RBF fee bump payment transactions #10805

Closed
MaxHillebrand opened this issue May 29, 2023 · 7 comments
Closed

RBF fee bump payment transactions #10805

MaxHillebrand opened this issue May 29, 2023 · 7 comments
Assignees

Comments

@MaxHillebrand
Copy link
Collaborator

This is about fee bumping only single user transactions that are initiated from the users wallet (user has all inputs). Receiving transactions cannot be trivially fee bumped because we don't know the fee rate of that transaction, so this is out of scope of this issue.

In the user payment case, CPFP is not blockspace efficient, Therefore it should work with RBF.

In the UI transaction history of unconfirmed transactions, add a right click menu with speed up transaction, then show the fee rate graph with optional sats/vByte texbox, and a green confirm button. In the background, reduce the value of the change output until new fee rate is met. Or add another private input if necessary, Do not add non-private inputs.

@MaxHillebrand
Copy link
Collaborator Author

MaxHillebrand commented May 29, 2023

The effective fee rate calculation gets difficult if there is a chain of unconfirmed transactions prior to the users transaction.

@yahiheb
Copy link
Collaborator

yahiheb commented May 29, 2023

The effective fee rate calculation gets difficult if there is a chain of unconfirmed transactions prior to the users transaction.

This shouldn't be a problem if we are doing this for only single user transactions that are initiated from the users wallet (user has all inputs).

@MaxHillebrand
Copy link
Collaborator Author

the UX should warn the user about the privacy downsides [change output detection and potential additional non-private inputs]

@turbolay
Copy link
Collaborator

turbolay commented May 29, 2023

In case there is enough change, RBF is really easy to implement -> Just reduce change

If there is not enough change, there are 4 possibilities:

  • Wallet has other private/same pocket coins bigger than some selected so swapping some selected coins with other could be enough to cover the fee -> only downside is potentially (more) change
  • Wallet has other private/same pocket coins smaller than the selected ones, some inputs can be added to cover for the extra fee -> it will increase size of the TX + potentially create (more) change
  • Amount sent can be reduced to cover for the extra fee -> best solution but causes issues for payments.
  • An extra non private output from another pocket -> degrades privacy, increases size of the TX and potentially create (more) change

In all cases it's probably better to just re-run the automatic coin selector but making sure that old TX will be replaced by the new one. One remaining question: If these are the only possible outcomes, should the user have an actionnable choice whether he wants to degrade his privacy by adding another pocket, have change, or reduce the amount?

@petertodd
Copy link

@turbolay

From the point of view of simplicity, I'd recommend that the original transaction inputs always be kept when RBF fee bumping. You don't want to accidentally create two distinct transactions, eg by selecting a different input to keep in different, successive, fee bumps. Better to lose a bit of privacy for the first version of this feature than accidentally create a double-payment bug.

@nopara73
Copy link
Contributor

nopara73 commented Aug 1, 2023

From the point of view of simplicity, I'd recommend that the original transaction inputs always be kept when RBF fee bumping.

Although originally, I was up for the challenge of not following your advice, during implementation, I quickly realized that'd quickly lead to a bugfactory.

Anyway, this feature is finally done! We've almost achieved the feature set, I envisioned a million years ago during the initial plans of 2.0 :)

@nopara73 nopara73 closed this as completed Aug 1, 2023
@petertodd
Copy link

Awesome! Looking forward to trying this out in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants