-
Notifications
You must be signed in to change notification settings - Fork 268
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
Multipart FSM v2 #1439
Merged
Merged
Multipart FSM v2 #1439
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t-bast
commented
May 27, 2020
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/PaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
pm47
reviewed
May 28, 2020
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.
Looks okay to me, just a few nits and suggestions.
Agree that we should probably merge asap and test in real life conditions.
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
pm47
previously approved these changes
Jun 3, 2020
Merged
Remove temporary hooks added for first version of MPP (route prefix, empty routes, etc). Allow specifying the whole route (not only nodeIds) in SendPaymentToRoute.
Use the Router's new MPP RouteRequest. Remove the "blind" split based on channel balances. Reactivate trampoline relay to MPP non-trampoline recipient.
* Improve comments * Add metric to track effectiveness of retrying failed channels * Small refactoring
pm47
reviewed
Jun 22, 2020
eclair-core/src/main/scala/fr/acinq/eclair/payment/relay/NodeRelayer.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/relay/NodeRelayer.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/MultiPartPaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/PaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/PaymentLifecycle.scala
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/PaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
eclair-core/src/main/scala/fr/acinq/eclair/payment/send/PaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
pm47
approved these changes
Jun 23, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is based on #1427, so please ignore the first commits.
We re-work the
MultiPartPaymentLifecycle
state machine to leverage the new MPP split algorithm exposed by the router. This greatly simplifies the FSM, removes a few hacks that were added to thePaymentLifecycle
, and should make MPP split better for both mobile and server nodes.It also allows re-enabling the use of MPP for trampoline relays to non-trampoline nodes (yay!).
I have done a lot of regtest testing to simulate Phoenix/Eclair-Mobile scenario, but nothing beats the real thing. Once this is approved, we should create testnet builds for Phoenix and Eclair-Mobile and extensively test that everything works.
Since it was already a lot of changes, I refrained from refactoring the
RouteRequest
part. We can improve this later by cleaning up some types / creating nice type hierarchies.NB: the failing test is because of #1434