Skip to content
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

LSPS2: Add onion oracle. #47

Conversation

ZmnSCPxj-jr
Copy link
Contributor

@ZmnSCPxj-jr ZmnSCPxj-jr commented Aug 7, 2023

Fixes: #44 Rejected?

This is the other pull request. #46 is the other one.

In this particular pull request, we add an onion oracle, i.e. send a notification containing the payment hash and forwarding onion. Of note is that the forwarding onion is needed to support "stateless" invoices where the payment_secret and/or metadata is used to store important payment details. In particular, LDK out-of-the-box supports only stateless invoices (payment preimages are the HMAC of the payment_secret using the node secret key as MAC key). Like #37 (LSPS4) this requires that HTLCs be held at the LSP which the client responds to. Differences are:

  • In this pull request even for a multipart payment we only send one notification; LSPS4 gives one notification per HTLC.
  • If the client disconnects before it can respond with what to do with the HTLC then the LSP fails the HTLC; LSPS4 re-notifies the client on reconnection, and only fails if it timed out.
  • This is specifically only for HTLC; LSPS4 is open-ended enough that it can be used for PTLCs in the future, depending exactly on how it eventually ends up being implemented.

@ZmnSCPxj-jr
Copy link
Contributor Author

Closing, as this seems to be the least desirable option.

@ZmnSCPxj-jr ZmnSCPxj-jr deleted the lsps2-onion-oracle branch August 28, 2023 09:43
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.

Prepayment probing conflicts with LSPS2 (and JIT Channels in general)
1 participant