BOLT 5: fix up opposing MUST & MUST NOT statements.#848
Open
rustyrussell wants to merge 1 commit into
Open
Conversation
We can't say "MUST spend via HTLC-success" and "MUST NOT reveal preimage", since the HTLC-success does exactly that! Let's simplify it. If you get the preimage from the outgoing HTLC, you need to spend the incoming. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
TheBlueMatt
approved these changes
Feb 16, 2021
Collaborator
TheBlueMatt
left a comment
There was a problem hiding this comment.
one nit, but looks good.
| from the outgoing HTLC; otherwise, it will lose funds by sending an outgoing | ||
| payment without redeeming the incoming payment. | ||
| 4. The HTLC is forwarded as above, but the recipient also happens to be the | ||
| final destination for the payment. In this case, it knows the preimage but |
Collaborator
There was a problem hiding this comment.
This feels awkward - maybe "final destination for the payment, and it knows the preimage bug it has not received the full payment. In this case, it must not reveal it"?
ariard
reviewed
Feb 22, 2021
ariard
left a comment
There was a problem hiding this comment.
Thanks for clarifying this, a small nit
| final destination for the payment. In this case, it knows the preimage but | ||
| as it has not received the full payment, it must not reveal | ||
| it.<sup>[Preimage-Extraction](https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-October/002857.html)</sup>. | ||
| This problem is most easily solved by only accepting preimages from |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
19 tasks
t-bast
reviewed
Mar 1, 2021
Comment on lines
+308
to
+311
| 4. The HTLC is forwarded as above, but the recipient also happens to be the | ||
| final destination for the payment. In this case, it knows the preimage but | ||
| as it has not received the full payment, it must not reveal | ||
| it.<sup>[Preimage-Extraction](https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-October/002857.html)</sup>. |
Collaborator
There was a problem hiding this comment.
I'm not sure what I offer is better, but the current wording is a bit hard to understand (at least for me).
Suggested change
| 4. The HTLC is forwarded as above, but the recipient also happens to be the | |
| final destination for the payment. In this case, it knows the preimage but | |
| as it has not received the full payment, it must not reveal | |
| it.<sup>[Preimage-Extraction](https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-October/002857.html)</sup>. | |
| 4. The HTLC is forwarded as above, but the recipient also happens to be the | |
| final destination for the payment. In this case, it knows the preimage but | |
| until the corresponding outgoing HTLC is settled, it must not reveal | |
| it.<sup>[Preimage-Extraction](https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-October/002857.html)</sup>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We can't say "MUST spend via HTLC-success" and "MUST NOT reveal preimage",
since the HTLC-success does exactly that!
Let's simplify it. If you get the preimage from the outgoing HTLC,
you need to spend the incoming.
Signed-off-by: Rusty Russell rusty@rustcorp.com.au
See: dcf6b0f