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

invoices: implement statelss invoice functinoality #6413

Open
Roasbeef opened this issue Apr 13, 2022 · 1 comment
Open

invoices: implement statelss invoice functinoality #6413

Roasbeef opened this issue Apr 13, 2022 · 1 comment
Labels
enhancement Improvements to existing features / behaviour intermediate Issues suitable for developers moderately familiar with the codebase and LN invoices P3 might get fixed, nice to have payments Related to invoices/payments

Comments

@Roasbeef
Copy link
Member

After the merge of #5810, we start to set the new metadata field in invoices, but don't yet do anything with them on the sender side. One thing this allows is for the reactor of an invoice to only actually commit state to the invoice once it's been fully paid, a.k.a "stateless" invoices.

In order to actually make this feature useful, we should draft up an initial version of stateless invoice interpretation within lnd itself. At a glance, we can likely re-use most of the keysend logic, which itself inserts an invoice into the DB just-in-time when the HTLC is received.

@Roasbeef Roasbeef added enhancement Improvements to existing features / behaviour intermediate Issues suitable for developers moderately familiar with the codebase and LN payments Related to invoices/payments P3 might get fixed, nice to have invoices labels Apr 13, 2022
@TheBlueMatt
Copy link

You shouldn't need payment metadata's for this, fwiw. As long as you don't want additional user metadata (which they can always store out of band), you can use the scheme we use in LDK and just use the payment secret - lightningdevkit/rust-lightning#1177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features / behaviour intermediate Issues suitable for developers moderately familiar with the codebase and LN invoices P3 might get fixed, nice to have payments Related to invoices/payments
Projects
None yet
Development

No branches or pull requests

2 participants