Skip to content

Test punishing revoked outputs of post-anchor counterparty aggregated cross-transaction second-stage HTLC transactions #1905

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

Closed
ariard opened this issue Dec 7, 2022 · 2 comments · Fixed by #2034

Comments

@ariard
Copy link

ariard commented Dec 7, 2022

For context, see #1825 (comment)

Post-anchor, a counterparty can broadcast an aggregated second-stage HTLC transaction spending multiple revoked commitment transactions. Currently, our logic only assumes our counterparty aggregate HTLC transactions from a single revoked commitment transaction (combination of L3027 in channelmonitor.rs, L2693 in channelmonitor.rs and L3039 in channelmonitor.rs).

As discussed on IRC, tagging this as "Blocking Anchor". As the mishandling of the issue could lead to a loss of funds, and the correctness is dependent not only on ChannelMonitor and ChainMonitor implementation, we would better off to have extended testing of this processing flow.

Edit: the code is correct even if the comment is still wrong in the assumption that post-anchor all HTLC claims are coming from the same commitment transactions.

@TheBlueMatt
Copy link
Collaborator

I don't believe this is true, see responses on the linked comment.

@ariard ariard changed the title Punishing revoked outputs of post-anchor counterparty aggregated cross-transaction second-stage HTLC transactions Test punishing revoked outputs of post-anchor counterparty aggregated cross-transaction second-stage HTLC transactions Dec 7, 2022
@ariard
Copy link
Author

ariard commented Dec 7, 2022

Corrected, effectively we're good here as Wilmer as pointed out. Though note the cross-commitment aggregated HTLC-claim transaction is still something we need test coverage for, and also exercising the logic on testnet or whatever we're handling well the whole pipeline here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants