-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
multi: hold keysend payments #4167
Conversation
76c9316
to
b470334
Compare
d89a44b
to
2464fdf
Compare
2464fdf
to
8b5db48
Compare
Looking for concept ack |
94595bf
to
01e486f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick pass. main thing for this pr is keysends payments should imo be settled by payment addr, o/w there will be different flows for experimental keysend and AMP keysends. however, i think that first requires a change to start indexing payments by payment address. i have some commits that do this in a branch for AMP, i can throw that up
3bc422c
to
e603862
Compare
Discussed offline with @cfromknecht. Steps:
|
@joostjager dependent PR is up: #4285 |
Now that AMP is postponed, I reverted this PR back to the original approach. While rebasing the [poc] commit, I realized we don't need rpc changes at all. Decided together with @cfromknecht to bring this back into the 0.11 scope. |
PR is not working atm because it needs to be rebased on top of the fix for broken keysend in master. |
@joostjager the fix we discussed for keysend in master has been updated: #4407 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nits, otherwise i think we're ready to roll! final commit can be dropped now 👍
This could be helpful for keysend based sloshing to prevent unwanted payments from external senders |
PR rebased on top of #4407. Works now. PoC commit will be dropped after review is completed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Adds a new configuration flag to lnd that will keep keysend payments in the accepted state. An application can then inspect the payment parameters and decide whether to settle or cancel. The on-the-fly inserted keysend invoices get a configurable expiry time. This is a safeguard in case the application that should decide on the keysend payments isn't active.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⛩
Adds a new option to
lnd
to hold received keysend payments in the accepted state for a configured period of time. During this time, an application can inspect the payment parameters and decide whether to cancel or settle this payment.Example: a keysend payment with an embedded order comes in. The payment is held and an external application checks that the paid amount is sufficient for the ordered goods. If not, the payment is canceled without the need to refund anything. If the amount is sufficient, the payment is settled and the order processed.
This PR makes development of applications like tlvshop.com possible without forking
lnd
.