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

Extend BumpFee to take into account an unconfirmed parent #5432

Open
joostjager opened this issue Jun 25, 2021 · 2 comments
Open

Extend BumpFee to take into account an unconfirmed parent #5432

joostjager opened this issue Jun 25, 2021 · 2 comments
Assignees
Labels
advanced Issues suitable for very experienced developers enhancement Improvements to existing features / behaviour fees Related to the fees paid for transactions (both LN and funding/commitment transactions) P2 should be fixed if one has time rpc Related to the RPC interface utxo sweeping
Milestone

Comments

@joostjager
Copy link
Contributor

Currently the BumpFee rpc can be used to bump the fee of an unconfirmed transaction through CPFP.

It is however not straight-forward to do this because the caller needs to specify a fee rate that takes into account all unconfirmed parents of the sweep transaction. This seems to be impossible for the caller, because they don't know how their sweep request is going to be grouped with other inputs that may or may not have unconfirmed parents. Even the weight of the sweep transaction itself isn't known to the caller in advance.

It would be better if BumpFee detects that the input to sweep is still unconfirmed (or even has a chain of unconfirmed parents) and submits it to the sweeper subsystem with the appropriate parent info set. The sweeper already contains logic to take those unconfirmed parents into account during fee calculation.

In case the input transaction confirms on its own, it is probably desirable that the sweeper is aware of this. There is no need anymore to pay for the parent and the absolute fee on the sweep tx can be decreased.

@wpaulino wpaulino added enhancement Improvements to existing features / behaviour fees Related to the fees paid for transactions (both LN and funding/commitment transactions) rpc Related to the RPC interface utxo sweeping labels Jun 25, 2021
@Roasbeef Roasbeef added the advanced Issues suitable for very experienced developers label Jul 24, 2021
@Roasbeef Roasbeef added the P2 should be fixed if one has time label Aug 31, 2021
@saubyk saubyk added this to lnd v0.18 Jan 5, 2024
@saubyk saubyk moved this to 📋 Backlog in lnd v0.18 Jan 5, 2024
@saubyk saubyk removed this from lnd v0.18 Feb 6, 2024
@saubyk saubyk added this to the v0.18.1 milestone Feb 6, 2024
@saubyk saubyk modified the milestones: v0.18.1, 0.19.0 Mar 21, 2024
@saubyk saubyk added this to lnd v0.19 Jun 27, 2024
@saubyk saubyk moved this to Todo in lnd v0.19 Jun 27, 2024
@AndySchroder
Copy link

Seems like it would be good to have an opt in option to use your proposed (more intelligent behavior). This way backward compatibility is preserved and it is clearer when reading documentation what is actually done so you have to make an intentional choice if you want the actual fee to consider the effective fee from unconfirmed parents.

@AndySchroder
Copy link

One point to note: As a user with the current behavior, after making your first CPFP at a low effective fee rate, you can just keep trying to bump again without any loss (but time) because the next CPFP will RBF the first (and eventually find the effective fee you really want).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
advanced Issues suitable for very experienced developers enhancement Improvements to existing features / behaviour fees Related to the fees paid for transactions (both LN and funding/commitment transactions) P2 should be fixed if one has time rpc Related to the RPC interface utxo sweeping
Projects
None yet
Development

No branches or pull requests

5 participants