feat: Support anchor outputs on ln channels #1597
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1596
Adds anchor outputs to the commitment transaction see below an example of a commitment transaction with anchor outputs.
Judging from the rust-lightning release notes regarding anchor nodes (copied below). It looks like though it would make sense to upgrade as soon as possible at least to v0.0.117.
v0.0.118
available to send in HTLCs. This can prevent force-closes in anchor channels
when sending payments which overflow the available balance (#2674).
v0.0.117
Anchor channels which were closed by a counterparty broadcasting its
commitment transaction (i.e. force-closing) would previously not generate a
SpendableOutputs event for our to_remote (i.e. non-HTLC-encumbered)
balance. Those with such balances available should fetch the missing
SpendableOutputDescriptors using the new
ChannelMonitor::get_spendable_outputs method (#2605).
Anchor channels may result in spurious or missing Balance entries for HTLC
balances (fix: Show the number of seed words correctly (don't split across lines) #2610).
Security
0.0.117 fixes several loss-of-funds vulnerabilities in anchor output channels,
support for which was added in 0.0.116, in reorg handling, and when accepting
channel(s) from counterparties which are miners.
When a counterparty broadcasts their latest commitment transaction for a
channel with anchor outputs, we'd previously fail to build claiming
transactions against any HTLC outputs in that transaction. This could lead
to loss of funds if the counterparty is able to eventually claim the HTLC
after a timeout (feat: use mutinynet faucet for channel opening fundings #2606).
Anchor channels HTLC claims on-chain previously spent the entire value of any
HTLCs as fee, which has now been fixed (Failed to run DLC manager periodic check: Storage error Packet extended beyond the provided bytes #2587).