Skip to content

Expose a claimable Balance for no-preimage-but-may-learn-one #1620

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
TheBlueMatt opened this issue Jul 15, 2022 · 0 comments · Fixed by #1673
Closed

Expose a claimable Balance for no-preimage-but-may-learn-one #1620

TheBlueMatt opened this issue Jul 15, 2022 · 0 comments · Fixed by #1673
Milestone

Comments

@TheBlueMatt
Copy link
Collaborator

If we have a pending inbound HTLC which hit the chain, but don't have a preimage for it, we don't generate a Balance for it. This makes sense, generally, but we actually could learn the preimage later if we forwarded the HTLC and the upstream node claimed it from us. Thus, we have to generate some kind of Balance until after the HTLC is irrevocably resolved, but probably a new form.

Tagging 111 cause its important work, but I really don't want to delay the other fixes in 110 for it.

@TheBlueMatt TheBlueMatt added this to the 0.0.111 milestone Jul 15, 2022
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this issue Aug 17, 2022
If we don't currently have the preimage for an inbound HTLC, that
does not guarantee we can never claim it, but instead only that we
cannot claim it unless we receive the preimage from the channel we
forwarded the channel out on.

Thus, we cannot consider a channel to have no claimable balances if
the only remaining output on the commitment ransaction is an
inbound HTLC for which we do not have the preimage, as we may be
able to claim it in the future.

This commit addresses this issue by adding a new `Balance` variant
- `MaybePreimageClaimableHTLCAwaitingTimeout`, which is generated
until the HTLC output is spent.

Fixes lightningdevkit#1620
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this issue Aug 17, 2022
If we don't currently have the preimage for an inbound HTLC, that
does not guarantee we can never claim it, but instead only that we
cannot claim it unless we receive the preimage from the channel we
forwarded the channel out on.

Thus, we cannot consider a channel to have no claimable balances if
the only remaining output on the commitment ransaction is an
inbound HTLC for which we do not have the preimage, as we may be
able to claim it in the future.

This commit addresses this issue by adding a new `Balance` variant
- `MaybePreimageClaimableHTLCAwaitingTimeout`, which is generated
until the HTLC output is spent.

Fixes lightningdevkit#1620
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this issue Aug 17, 2022
If we don't currently have the preimage for an inbound HTLC, that
does not guarantee we can never claim it, but instead only that we
cannot claim it unless we receive the preimage from the channel we
forwarded the channel out on.

Thus, we cannot consider a channel to have no claimable balances if
the only remaining output on the commitment ransaction is an
inbound HTLC for which we do not have the preimage, as we may be
able to claim it in the future.

This commit addresses this issue by adding a new `Balance` variant
- `MaybePreimageClaimableHTLCAwaitingTimeout`, which is generated
until the HTLC output is spent.

Fixes lightningdevkit#1620
TheBlueMatt added a commit to TheBlueMatt/rust-lightning that referenced this issue Aug 25, 2022
If we don't currently have the preimage for an inbound HTLC, that
does not guarantee we can never claim it, but instead only that we
cannot claim it unless we receive the preimage from the channel we
forwarded the channel out on.

Thus, we cannot consider a channel to have no claimable balances if
the only remaining output on the commitment ransaction is an
inbound HTLC for which we do not have the preimage, as we may be
able to claim it in the future.

This commit addresses this issue by adding a new `Balance` variant
- `MaybePreimageClaimableHTLCAwaitingTimeout`, which is generated
until the HTLC output is spent.

Fixes lightningdevkit#1620
@wpaulino wpaulino mentioned this issue Sep 9, 2022
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 a pull request may close this issue.

1 participant