Skip to content

Ignore HTLC txn we dont know how to claim instead of unwrap()ing and Do not fail-backwards LocalAnnounced HTLCs upon force-close. #180

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

@TheBlueMatt TheBlueMatt commented Sep 14, 2018

This fixes a crash introduced in 3e149b1
and introduces a test which will tickle the bug.

Also fixes a second bug with force-closure that could lose money, as well as adds tests for it in ChannelManager.

Finally, make full_stack_target's sample tickle the original crash as well as cover the code that generated the second failure.

This fixes a crash introduced in 3e149b1
and introduces a test which will tickle the bug.
This is completely unsafe as we have provided the remote side with
a commitment_signed which they can broadcast, including the HTLC
transaction, and then could claim it on-chain after we've failed it
backwards!
@TheBlueMatt TheBlueMatt force-pushed the 2018-09-htlc-tx-unwrap-fix branch from 30176d4 to aa17def Compare September 14, 2018 19:28
@TheBlueMatt TheBlueMatt changed the title Ignore HTLC txn we dont know how to claim instead of unwrap()ing Ignore HTLC txn we dont know how to claim instead of unwrap()ing and Do not fail-backwards LocalAnnounced HTLCs upon force-close. Sep 14, 2018
@TheBlueMatt
Copy link
Collaborator Author

Merging to keep things moving, obviously happy to have postumous review.

@TheBlueMatt TheBlueMatt merged commit 1e3d875 into lightningdevkit:master Sep 14, 2018
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.

1 participant