Skip to content

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Apr 14, 2025

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.

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.
@t-bast t-bast requested a review from sstone April 14, 2025 06:55
Copy link
Member

@sstone sstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@t-bast t-bast merged commit 383d141 into master Apr 15, 2025
1 check passed
@t-bast t-bast deleted the remove-unused-remote-anchor-tx branch April 15, 2025 16:30
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

Successfully merging this pull request may close these issues.

3 participants