routing+invoices: allow multi-part payment probes #4219
Labels
brainstorming
Long term ideas/discussion/requests for feedback
mpp
P3
might get fixed, nice to have
payments
Related to invoices/payments
Since #3156 it is possible to probe destinations before paying to get an accurate fee estimate upfront.
For single-shot payments can be done by sending a payment with an unknown payment hash and inspecting the returned failure. If it originates from the final destination, the route is deemed to be valid. Following through with the real payment is very likely to succeed.
For multi-part payments, it isn't that simple. Ideally you want to be sure that the selected routes can carry all parts at the same time. Because that is what the receiver will do. They will hold on to every part until the set is complete. However, if you use the single-shot probing method described above, htlcs will already be cancelled back before the set is complete. So the set may complete sequentially, but still fail when the real payment is executed.
The simplest example of this is a 20 sat channel when you need to pay 40 sat. It isn't possible. But if you probe two times 20, it looks as if it is possible.
So what is needed is a way to get the receiver to hold on to the payments until the set is complete and then cancel.
The text was updated successfully, but these errors were encountered: