Skip to content

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

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

Closed

Conversation

TheBlueMatt
Copy link
Collaborator

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

@TheBlueMatt TheBlueMatt force-pushed the 2021-12-payment-metadata branch from 12d90c2 to 49055f8 Compare December 22, 2021 06:33
@TheBlueMatt TheBlueMatt mentioned this pull request Dec 23, 2021
@TheBlueMatt TheBlueMatt force-pushed the 2021-12-payment-metadata branch from 49055f8 to 01f20d7 Compare December 30, 2021 18:46
@jkczyz jkczyz self-requested a review January 5, 2022 19:28
@TheBlueMatt TheBlueMatt force-pushed the 2021-12-payment-metadata branch from 01f20d7 to 6d898f6 Compare January 26, 2022 19:05
@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 TheBlueMatt force-pushed the 2021-12-payment-metadata branch from 6d898f6 to cd7e5ac Compare January 26, 2022 19:09
@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