Remove support for claiming remote anchor output #3062
Merged
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.
We previously included support for spending the remote anchor output. This created some confusion: is this the anchor output using our key but in the remote commitment? Or is it the anchor output using our peer's key in our local commitment?
It is actually the former: the anchor output that uses our peers' key. There is no reason to claim this output: it cannot be claimed while the commitment tx is unconfirmed, and even after it is confirmed, we must add wallet inputs to be able to claim this 330 sat output, which is something we've never implemented (since it would be an economic loss).
It is only useful to spend those outputs when they pollute the utxo set after commit txs have confirmed. For it to be economical, it only makes sense when we're batching a lot of those outputs. This isn't something we support, so we should simply remove that code for simplicity.