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

Handle Payment Metadata in the Invoice/Send/Receive Pipelines #1221

Closed

Conversation

TheBlueMatt
Copy link
Collaborator

As specified by lightning/bolts#912. All pretty straightforward, just a lot of plumbing.

@TheBlueMatt
Copy link
Collaborator Author

Rebased.

There is no reason to set both, and this currently makes testing
the new BOLT invoice tests slightly harder, so we just unset it.
...instead of accessing it via the `OnionPayload::Invoice` form.
This may be useful if we add MPP keysend support, but is directly
useful to allow us to drop `FinalOnionHopData` from `OnionPayload`.
We only use it to check the amount when processing MPP parts, but
store the full object (including new payment metadata) in it.
Because we now store the amount in the parent structure, there is
no need for it at all in the `OnionPayload`. Sadly, for
serialization compatibility, we need it to continue to exist, at
least temporarily, but we can avoid populating the new fields in
that case.
...without exposing it to the public `send_payment` API yet.
@TheBlueMatt
Copy link
Collaborator Author

Oops, actually rebased now.

@TheBlueMatt
Copy link
Collaborator Author

Actually, I think I want to redo this to pull the metadata, payment secret, and also #1298 data into a struct so we can solve #1298 here as well.

@TheBlueMatt TheBlueMatt self-assigned this Feb 7, 2022
@TheBlueMatt TheBlueMatt mentioned this pull request Apr 10, 2022
andozw added a commit to andozw/rust-lightning that referenced this pull request Apr 22, 2022
This work is a pre-req for [Issue-1298](lightningdevkit#1298).

This is a rebase of [PR-1221](lightningdevkit#1221) with an
additional commit to move the payment_secret and the payment_metadata into a new struct called
RecipientInfo. This will allow us to add custom onion TLVs (see [discussion](lightningdevkit#1298 (comment)))
andozw added a commit to andozw/rust-lightning that referenced this pull request Apr 22, 2022
This work is a pre-req for [Issue-1298](lightningdevkit#1298).

This is a rebase of [PR-1221](lightningdevkit#1221) with an
additional commit to move the payment_secret and the payment_metadata into a new struct called
RecipientInfo. This will allow us to add custom onion TLVs, see [discussion](lightningdevkit#1298 (comment))

No logic change, just lots of plumbing.
andozw added a commit to andozw/rust-lightning that referenced this pull request Apr 22, 2022
This work is a pre-req for [Issue-1298](lightningdevkit#1298).

This is a rebase of [PR-1221](lightningdevkit#1221) with an
additional commit to move the payment_secret and the payment_metadata into a new struct called
RecipientInfo. This will allow us to add custom onion TLVs, see [discussion](lightningdevkit#1298 (comment))

No logic change, just lots of plumbing.
andozw added a commit to andozw/rust-lightning that referenced this pull request Apr 22, 2022
This work is a pre-req for [Issue-1298](lightningdevkit#1298).

This is a rebase of [PR-1221](lightningdevkit#1221) with an
additional commit to move the payment_secret and the payment_metadata into a new struct called
RecipientInfo. This will allow us to add custom onion TLVs, see [discussion](lightningdevkit#1298 (comment))

No logic change, just lots of plumbing.
@TheBlueMatt
Copy link
Collaborator Author

Superceded by #1445.

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.

1 participant