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

Custom HTLC TLVs #1298

Closed
TheBlueMatt opened this issue Feb 6, 2022 · 6 comments · Fixed by #2308
Closed

Custom HTLC TLVs #1298

TheBlueMatt opened this issue Feb 6, 2022 · 6 comments · Fixed by #2308
Assignees
Milestone

Comments

@TheBlueMatt
Copy link
Collaborator

Probably a bit annoying to plumb through, but people keep coming up with uses for payment messages, so we really need to support this.

@moneyball
Copy link
Contributor

What are some example use cases we've heard of?

@TheBlueMatt
Copy link
Collaborator Author

I believe the commonly described use-cases today are only the "podcasting extra data" bLIP - sending extra data with a keysend payment to indicate that you're tipping while listening to a podcast with metadata about the current timestamp. If you're doing it via invoice data you should probably do it using the new payment metadata info instead, but for application-specific keysend it may make more sense.

@andozw
Copy link

andozw commented Apr 9, 2022

Hey @TheBlueMatt, I am interested in working on this. Do you have an idea in mind for the data structure to use or any other ideas for guidance? Thanks!

@TheBlueMatt
Copy link
Collaborator Author

I think the way we should go about this is to do what I mentioned at #1221 (comment) In order words, taking #1221 and rebasing it, but also taking the new payment_metadata parameter and replacing it (and the existing payment_secret parameter) with a PaymentMetadata (or another name? maybe RecipientInfo?) struct that contains both.

From there it'll be a relatively lighter lift to add custom onion TLVs - we'll need to tweak our TLV serialization logic as well, but likely with a new macro variant or new macro.

I'd suggest doing the two in separate PRs, as it provides a logical split point.

@andozw
Copy link

andozw commented Apr 16, 2022

Was a bit tricky but I finally rebased 1221.
The changes are on my remote and I'll open a new PR after working on the next step to create the struct to hold the payment_metadata and existing payment_secret.

andozw added a commit to andozw/rust-lightning that referenced this issue 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 issue 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 issue 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 issue 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 issue Apr 22, 2022
This work is a pre-req for
lightningdevkit#1298.

This moves the `payment_secret` and the `payment_metadata` into a new
struct called `RecipientInfo`. This will allow us to add custom onion
TLVs, see
lightningdevkit#1298 (comment)

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

This moves the `payment_secret` and the `payment_metadata` into a new
struct called `RecipientInfo`. This will allow us to add custom onion
TLVs, see
lightningdevkit#1298 (comment)

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

This moves the `payment_secret` and the `payment_metadata` into a new
struct called `RecipientInfo`. This will allow us to add custom onion
TLVs, see
lightningdevkit#1298 (comment)

No logic change, just lots of plumbing.
andozw added a commit to andozw/rust-lightning that referenced this issue May 8, 2022
This work is a pre-req for
lightningdevkit#1298.

This moves the `payment_secret` and the `payment_metadata` into a new
struct called `RecipientInfo`. This will allow us to add custom onion
TLVs, see
lightningdevkit#1298 (comment)

No logic change, just lots of plumbing.
andozw added a commit to andozw/rust-lightning that referenced this issue May 9, 2022
This work is a pre-req for
lightningdevkit#1298.

This moves the `payment_secret` and the `payment_metadata` into a new
struct called `RecipientInfo`. This will allow us to add custom onion
TLVs, see
lightningdevkit#1298 (comment)

No logic change, just lots of plumbing.
andozw added a commit to andozw/rust-lightning that referenced this issue May 13, 2022
This work is a pre-req for
lightningdevkit#1298.

This moves the `payment_secret` and the `payment_metadata` into a new
struct called `RecipientInfo`. This will allow us to add custom onion
TLVs, see
lightningdevkit#1298 (comment)

No logic change, just lots of plumbing.
@alecchendev
Copy link
Contributor

Currently working on this, hope to have a draft PR up within the next couple of days :)

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 a pull request may close this issue.

4 participants