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

Add anchor output to the commitment transaction #3587

Closed
joostjager opened this issue Oct 9, 2019 · 2 comments
Closed

Add anchor output to the commitment transaction #3587

joostjager opened this issue Oct 9, 2019 · 2 comments
Assignees
Labels
advanced Issues suitable for very experienced developers chain handling channels commitments Commitment transactions containing the state of the channel fees Related to the fees paid for transactions (both LN and funding/commitment transactions)
Milestone

Comments

@joostjager
Copy link
Contributor

joostjager commented Oct 9, 2019

In the current commitment format, the miner fee is negotiated through the update_fee message. This creates several complications:

  • It is currently not possible to reject a fee rate. The only option at that point is to force close the channel. Nodes may have different sources for fee estimation and may unintentionally disagree about the fee to use.
  • Even if a satisfactory fee has been negotiated, it may turn out not to be enough to get it confirmed when one of the parties actually goes to chain. The party that publishes the commitment tx has its to_local output timelocked and can't use that to cpfp the transaction.

A possible solution (originally proposed by @halseth on the lightning-dev mailing list) is to add a so called anchor output to the commitment transaction. This is a non-timelocked output that can be used to cpfp the transaction in order to get it confirmed.

With the anchor output present, the fee on the commitment transaction itself can be minimal as both parties have the opportunity to attach additional fees.

@joostjager joostjager added this to the 0.9 milestone Oct 9, 2019
@joostjager joostjager added commitments Commitment transactions containing the state of the channel fees Related to the fees paid for transactions (both LN and funding/commitment transactions) chain handling channels labels Oct 9, 2019
@halseth
Copy link
Contributor

halseth commented Oct 10, 2019

Ideally we would have a no-fee commitment transaction, and add all fees using CPFP, but that would probably require something like package relay in order to ensure propagation:
bitcoin/bitcoin#14895
bitcoin/bitcoin#16401

Having a "minimal but sufficient fee" for propagation on the commitment should therefore be the goal. We might have to keep fee negotiation using update_fee for now, to ensure that we have this sufficient fee during fee spikes. This will still leave the first issue in the list above though.

@Roasbeef Roasbeef added the advanced Issues suitable for very experienced developers label Oct 30, 2019
@Roasbeef Roasbeef modified the milestones: 0.9.0, 0.10.0 Jan 7, 2020
@Roasbeef
Copy link
Member

Fixed by #3829.

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 chain handling channels commitments Commitment transactions containing the state of the channel fees Related to the fees paid for transactions (both LN and funding/commitment transactions)
Projects
None yet
Development

No branches or pull requests

3 participants