Skip to content

Move fail-backwards up for no to-remote output claims #280

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

Conversation

TheBlueMatt
Copy link
Collaborator

This fixes HTLC fail-backwards in case we haven't yet sent enough
to have a to_remote output to claim, plus some edge cases where it
could be removed due to a fee update, though hopefully that goes
away with simplified_commitment.

Based on #278.

@TheBlueMatt TheBlueMatt force-pushed the 2018-12-no-to-remote-revoked-htlcs branch from a68005e to 44ca7be Compare December 30, 2018 02:01
This fixes HTLC fail-backwards in case we haven't yet sent enough
to have a to_remote output to claim, plus some edge cases where it
could be removed due to a fee update, though hopefully that goes
away with simplified_commitment.
@TheBlueMatt TheBlueMatt force-pushed the 2018-12-no-to-remote-revoked-htlcs branch from 44ca7be to 5f937a9 Compare January 1, 2019 01:26
@TheBlueMatt
Copy link
Collaborator Author

Rebased after #278 merge.

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

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

Good, think I'm the one who forgot to take this case in consideration initially.
You mention edges cases due to fee update, do you test them somewhere ?
And no diff, but there https://github.com/rust-bitcoin/rust-lightning/blob/5f937a986d896ceb1abae4f62686226fae72748d/src/ln/functional_tests.rs#L3052 you speak about 2 monitors but only check_added_monitors! one ?

This tests that we fail back HTLCs that don't make it into
commitment transactions the same as we test ones that do.
This tests a case we previously didn't handle correctly where we
returned early if there was no to_remote output to claim and thus
failed to fail-backwards HTLCs which were present.
@TheBlueMatt TheBlueMatt force-pushed the 2018-12-no-to-remote-revoked-htlcs branch from 5f937a9 to 913d56e Compare January 5, 2019 21:26
@TheBlueMatt
Copy link
Collaborator Author

Fixed the "2 monitors" comment, it was just stale after the async fail-backwards PR.

@TheBlueMatt
Copy link
Collaborator Author

As for fee update potentially triggering this case, no, they're not tested, I'm not even 100% sure they can, but I also don't really want to add new tests that rely on fee update stuff cause we barely handle that stuff now and hopefully we will remove it wholesale prior to any mainnet uses because of option_simplified_commitment.

@TheBlueMatt TheBlueMatt merged commit a5bcd56 into lightningdevkit:master Jan 5, 2019
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.

2 participants