-
Notifications
You must be signed in to change notification settings - Fork 895
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
Implement multi-part payments (MPP) sending support #3809
Commits on Jul 14, 2020
-
paymod: Allow callers to opt out of shadow routing amount fuzzing
With MPP we require that the sum of parts is equal to the `total_msat` amount declared in the onion. Since that can't be changed once the first part arrives we need a way to disable amount fuzzing for MPP.
Configuration menu - View commit details
-
Copy full SHA for 187d8a1 - Browse repository at this point
Copy the full SHA 187d8a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for bbb7cb7 - Browse repository at this point
Copy the full SHA bbb7cb7View commit details -
tlvstream: Allow overwriting an already set value
This is necessary in the next commit to override the total_msat that is being delivered to the destination.
Configuration menu - View commit details
-
Copy full SHA for 986c61f - Browse repository at this point
Copy the full SHA 986c61fView commit details -
paymod: Don't assume that the first payment was executed at all
With the `presplit`-modifier we actually skip execution of the root altogether which results in the root not having a result at all. Instead we should use the result returned by `payment_collect_result`.
Configuration menu - View commit details
-
Copy full SHA for 581c159 - Browse repository at this point
Copy the full SHA 581c159View commit details -
mpp: Add the presplit MPP modifier
Changelog-Added: The MPP presplit modifier splits large payments into 10k satoshi parts to maximize chances of performing the payment and to obfuscate the overall amount being sent.
Configuration menu - View commit details
-
Copy full SHA for 50bf8eb - Browse repository at this point
Copy the full SHA 50bf8ebView commit details -
paymod: Not having a result doesn't mean we failed at getroute
Specifically if we split, there is no result, but we shouldn't add a failure message.
Configuration menu - View commit details
-
Copy full SHA for db43faf - Browse repository at this point
Copy the full SHA db43fafView commit details -
retrymod: Reset retry counter if parent is a split
If the parent is a split we have new payment parameters, and want to perform a number of attempts with those.
Configuration menu - View commit details
-
Copy full SHA for c59ae47 - Browse repository at this point
Copy the full SHA c59ae47View commit details -
paymod: Implement adaptive splitter
This modifier splits a payment that has been attempted a number of times (by a modifier earlier in the mod chain) and has failed consistently. It splits the amount roughly in half, with a but if random fuzz, and then starts a new round of attempts for the two smaller amounts.
Configuration menu - View commit details
-
Copy full SHA for 123077a - Browse repository at this point
Copy the full SHA 123077aView commit details -
Changelog-Added: The adaptive multi-part payment modifier will split payments that are failing due to their size into smaller parts, and re-attempted.
Configuration menu - View commit details
-
Copy full SHA for 321a0f1 - Browse repository at this point
Copy the full SHA 321a0f1View commit details -
mpp: Add CLI option to opt-out of multi-part payments
Several tests are not well-suited for mpp, so I added a CLI option to opt-out of the MPP support at startup time.
Configuration menu - View commit details
-
Copy full SHA for 21a06a5 - Browse repository at this point
Copy the full SHA 21a06a5View commit details -
mpp: Detect if destination supports MPP from invoice and abort early
We abort on the root since that is the coordination point for all parts of the payment.
Configuration menu - View commit details
-
Copy full SHA for 5183437 - Browse repository at this point
Copy the full SHA 5183437View commit details -
mpp: Lower amounts below the presplit amount
Some tests were failing because they were running into the presplit modifier and then surprised that the payment got split.
Configuration menu - View commit details
-
Copy full SHA for 00f88e5 - Browse repository at this point
Copy the full SHA 00f88e5View commit details -
mpp: Consider an abort as the payment being finished
If one part sets the root to be aborted, there is little point in continuing to wait for the remainder, return to the caller immediately.
Configuration menu - View commit details
-
Copy full SHA for d4dfb3e - Browse repository at this point
Copy the full SHA d4dfb3eView commit details -
retrymod: Make retry modifier slightly more verbose
I found it rather useful to trace how a payment is getting retried in the logs.
Configuration menu - View commit details
-
Copy full SHA for 944084c - Browse repository at this point
Copy the full SHA 944084cView commit details -
ld: We might not have a failing channel if localfail and sendonion
This happens to be an edge case with the way we use `sendonion` in MPP. `sendonion` does not attempt to recover the route even if we supply the shared secrets (it'd require us to map forwarding channels to the nodes etc), so `failnode` will always be unset, unless it is the first hop, which gets stored. This is not a problem if it weren't for the fact that we don't store the partial route, consisting solely of the channel leading to the first hop, therefore the assertion that either both are NULL or both aren't fails on the first hop. This went unnoticed since with MPP we have more concurrent payments in flight, increasing the chances of a exhausted first hop considerably.
Configuration menu - View commit details
-
Copy full SHA for a754af9 - Browse repository at this point
Copy the full SHA a754af9View commit details -
pytest: Disable MPP sending for 4 tests
These mostly deal with exact HTLC counts, and fixed number of attempts to conclusion, so the randomization that MPP adds is not desirable.
Configuration menu - View commit details
-
Copy full SHA for d77f3ea - Browse repository at this point
Copy the full SHA d77f3eaView commit details -
pytest: Add an adaptive MPP test
This exercises something that is simply not possible without MPP, i.e., the bundling of multiple paths to get sufficient capacity to perform the payment.
Configuration menu - View commit details
-
Copy full SHA for 90d1dd6 - Browse repository at this point
Copy the full SHA 90d1dd6View commit details -
plugin: Fix a memory leak and a missing dereference in listconfigs
`listconfigs` calls were setting the description twice and was using the pointer to the boolean value as the boolean value, resulting in always returning `true`.
Configuration menu - View commit details
-
Copy full SHA for da1bcc2 - Browse repository at this point
Copy the full SHA da1bcc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a499621 - Browse repository at this point
Copy the full SHA a499621View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e9054b - Browse repository at this point
Copy the full SHA 4e9054bView commit details