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

Multi part payments #1153

Merged
merged 11 commits into from
Nov 12, 2019
Merged

Multi part payments #1153

merged 11 commits into from
Nov 12, 2019

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Oct 1, 2019

This PR implements lightning/bolts#643 (receive and send).

The PR spec is quite stable so I think we can start reviewing this and even merge to master soon-ish (since it doesn't require local/global feature bits, is turned off by default and we just did a release so we have time before the next one). This will make development of other features that depend on MPP easier.

Pending:

  • Finalize spec PR (some TLV fields / timeout defaults / feature bits might change)
  • Test memory usage
  • Add Kamon metrics
  • Test compatibility with CL / LND

@t-bast t-bast force-pushed the multi-part-payments branch from dc50621 to 8978973 Compare October 1, 2019 16:03
@pm47 pm47 self-requested a review October 2, 2019 07:50
@t-bast t-bast force-pushed the multi-part-payments branch 4 times, most recently from 6ecf521 to 73bad53 Compare October 7, 2019 12:40
@t-bast t-bast force-pushed the multi-part-payments branch 4 times, most recently from 28df3a2 to 3f6a30c Compare October 15, 2019 11:46
@t-bast t-bast marked this pull request as ready for review October 16, 2019 08:34
@t-bast t-bast requested review from pm47 and sstone October 16, 2019 08:34
@t-bast t-bast force-pushed the multi-part-payments branch 7 times, most recently from b53867e to bdc59ab Compare October 23, 2019 14:00
@codecov-io
Copy link

codecov-io commented Nov 7, 2019

Codecov Report

Merging #1153 into master will increase coverage by 0.89%.
The diff coverage is 94.64%.

@@            Coverage Diff             @@
##           master    #1153      +/-   ##
==========================================
+ Coverage   75.35%   76.25%   +0.89%     
==========================================
  Files         135      138       +3     
  Lines        9082     9384     +302     
  Branches      358      374      +16     
==========================================
+ Hits         6844     7156     +312     
+ Misses       2238     2228      -10
Impacted Files Coverage Δ
.../src/main/scala/fr/acinq/eclair/gui/Handlers.scala 0% <ø> (ø) ⬆️
...src/main/scala/fr/acinq/eclair/db/PaymentsDb.scala 70% <ø> (ø) ⬆️
...in/scala/fr/acinq/eclair/router/NetworkStats.scala 100% <ø> (ø) ⬆️
...scala/fr/acinq/eclair/payment/send/Autoprobe.scala 0% <0%> (ø)
.../acinq/eclair/payment/receive/PaymentHandler.scala 100% <100%> (ø)
.../acinq/eclair/payment/receive/ForwardHandler.scala 100% <100%> (ø)
...re/src/main/scala/fr/acinq/eclair/NodeParams.scala 86.72% <100%> (+0.11%) ⬆️
...re/src/main/scala/fr/acinq/eclair/wire/Onion.scala 95.91% <100%> (+0.91%) ⬆️
...ir-core/src/main/scala/fr/acinq/eclair/Setup.scala 73.09% <100%> (-0.47%) ⬇️
...rc/main/scala/fr/acinq/eclair/io/Switchboard.scala 84% <100%> (ø) ⬆️
... and 33 more

Add multi-part invoice feature bits.
Invoices need to be configured to allow multi-part (disabled by default).
We use a state machine in front of PaymentLifecycle instances.
In the future, implement some kind of GetMultiRouteRequest on the router might make sense.
@t-bast t-bast force-pushed the multi-part-payments branch from ad0c081 to ef6d674 Compare November 8, 2019 13:33
pm47 added a commit that referenced this pull request Nov 8, 2019
This takes currently ~1s on mainnet.

See #1153 (comment).
@t-bast t-bast merged commit ed022b0 into master Nov 12, 2019
@t-bast t-bast deleted the multi-part-payments branch December 4, 2019 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants