-
Notifications
You must be signed in to change notification settings - Fork 525
BOLT 5: fix up opposing MUST & MUST NOT statements. #848
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
Open
rustyrussell
wants to merge
1
commit into
lightning:master
Choose a base branch
from
rustyrussell:fix-desc-of-preimage-attack
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -305,16 +305,19 @@ There are several possible cases for an offered HTLC: | |||||||||||||||||
| HTLC. In this case, the recipient must use the preimage, once it receives it | ||||||||||||||||||
| 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 | ||||||||||||||||||
| 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>. | ||||||||||||||||||
|
Comment on lines
+308
to
+311
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
|
||||||||||||||||||
| This problem is most easily solved by only accepting preimages from | ||||||||||||||||||
This comment was marked as abuse.
Sorry, something went wrong. |
||||||||||||||||||
| responses to corresponding outgoing HTLCs. | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Requirements | ||||||||||||||||||
|
|
||||||||||||||||||
| A local node: | ||||||||||||||||||
| - if it receives (or already possesses) a payment preimage for an unresolved | ||||||||||||||||||
| HTLC output that it has been offered AND for which it has committed to an | ||||||||||||||||||
| outgoing HTLC: | ||||||||||||||||||
| - if it has been offered an unresolved HTLC, AND it has offered a corresponding outgoing HTLC, for which it receives or has already received a payment preimage (by seeing it resolved via an onchain HTLC-success transaction, or via `update_fulfill_htlc`): | ||||||||||||||||||
| - MUST *resolve* the output by spending it, using the HTLC-success | ||||||||||||||||||
| transaction. | ||||||||||||||||||
| - MUST NOT reveal its own preimage when it's not the final recipient.<sup>[Preimage-Extraction](https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-October/002857.html)</sup> | ||||||||||||||||||
| - MUST resolve the output of that HTLC-success transaction. | ||||||||||||||||||
| - otherwise: | ||||||||||||||||||
| - if the *remote node* is NOT irrevocably committed to the HTLC: | ||||||||||||||||||
|
|
||||||||||||||||||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"?