-
Notifications
You must be signed in to change notification settings - Fork 405
Support keysend to blinded paths #2935
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
TheBlueMatt
merged 3 commits into
lightningdevkit:main
from
valentinewallace:2024-03-keysend-to-blinded
Mar 20, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
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
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
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
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
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.
@jkczyz @TheBlueMatt FYI --
I ended up keeping the payment secret in keysend blinded paths. I'm not sure why I thought it wasn't supposed to be reused at first, but I think it's fine to reuse it and provides value for keysend payments.
As a result, it was easy to adapt the existing
PendingHTLCRouting::ReceiveKeysend
variant for blinded keysends.However, reusing this variant means that users that want to receive blinded keysends have to set
accept_mpp_keysend
in their config or else LDK will reject the payment.I think that's okay, but wanted to call it out in case there are differing opinions.
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.
That seems ok to me. But why does it need to be set
true
in this test ifblinded_mpp_keysend
tests MPP?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.
accept_mpp_keysend
means that users opt into potentially breaking compat with < 0.0.116, which can happen ifPendingHTLCRouting::ReceiveKeysend::payment_data
is set. Because the payment secret will always be present in keysends to blinded paths,::payment_data
will always beSome
, so users need to opt into the potential compat breakage. Does that make sense?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.
I guess? ISTM we could instead actually just use the
keysend_preimage
- only the sender has that, so no need to worry about the secret anywhere. In general I kinda anticipated no one would support reading a payment secret in a blinded-path-receive HTLC, but certainly we could require it 🤷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.
I'm confused, we currently require payment secret to be present in all blinded path receives (so we can do stateless inbound payment verification). So the user isn't providing the payment secret, we're providing it back to ourselves in the blinded path.
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.
Ah, okay, nevermind, I was confused where that field was coming from.