-
Notifications
You must be signed in to change notification settings - Fork 267
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
Routing heuristics #821
Merged
Merged
Routing heuristics #821
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
This supersedes #792 |
# Conflicts: # eclair-core/src/main/scala/fr/acinq/eclair/router/Graph.scala # eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala # eclair-core/src/test/scala/fr/acinq/eclair/router/RouteCalculationSpec.scala
araspitzu
force-pushed
the
routing_heuristics
branch
from
January 22, 2019 15:17
e73c1ec
to
ee5490e
Compare
# Conflicts: # eclair-core/src/main/resources/reference.conf # eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala
araspitzu
force-pushed
the
routing_heuristics
branch
from
January 23, 2019 11:02
d013fbf
to
dfc1772
Compare
…n integration test
… don't filter found routes anymore
araspitzu
force-pushed
the
routing_heuristics
branch
from
January 28, 2019 09:10
b47bcf6
to
abd2bdb
Compare
# Conflicts: # eclair-core/src/main/resources/reference.conf # eclair-core/src/main/scala/fr/acinq/eclair/NodeParams.scala # eclair-core/src/test/scala/fr/acinq/eclair/TestConstants.scala
# Conflicts: # eclair-core/src/main/scala/fr/acinq/eclair/router/Graph.scala # eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala
# Conflicts: # eclair-core/src/main/resources/reference.conf # eclair-core/src/main/scala/fr/acinq/eclair/NodeParams.scala # eclair-core/src/main/scala/fr/acinq/eclair/payment/PaymentLifecycle.scala # eclair-core/src/main/scala/fr/acinq/eclair/router/Graph.scala # eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala # eclair-core/src/test/scala/fr/acinq/eclair/TestConstants.scala # eclair-core/src/test/scala/fr/acinq/eclair/router/RouteCalculationSpec.scala
# Conflicts: # eclair-core/src/main/scala/fr/acinq/eclair/router/Graph.scala # eclair-core/src/test/scala/fr/acinq/eclair/router/RouteCalculationSpec.scala
These changes have no significant performance impact, below a benchmark on a routing table from 29/01/2019 (~23k channels).
|
sstone
requested changes
Feb 21, 2019
eclair-core/src/main/scala/fr/acinq/eclair/payment/PaymentLifecycle.scala
Outdated
Show resolved
Hide resolved
sstone
approved these changes
Feb 22, 2019
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.
Add heuristics to the cost function of the path finding algorithm, and the ability to tune them by prioritizing for certain types. This enables the initiator of the payment (via
SendPayment
) to search for routes optimized for reliability or timeout where the reliability of a channel is obtained considering its age and capacity, with the assumption that older and larger channel are more reliable. Note that it is possible to specify the factor(s) by which we want consider each optimization, theratios: WeightRatios
parameter allows to specify a floating point value for each optimization heuristic, for example:WeightRatios(cltvDeltaFactor = 0, ageFactor = 0.5, capacityFactor = 0.5)
will consider equally the age and capacity of a channel but won't consider its CLTV delta.WeightRatios(cltvDeltaFactor = 0, ageFactor = 0, capacityFactor = 0)
will not consider heuristics optimization at all thus falling back to the previous behavior, cost optimized.WeightRatios(cltvDeltaFactor = 1, ageFactor = 0, capacityFactor = 0)
will find the route with the smallest possible cltv, thus minimizing the timeout in case of payment failure.Optimization ratios can be specified at payment time or via the configuration file, by default they're all set to 0 in order to search for the route with the cheapest fees. Note that this can be combined with the existing bounded-search parameters such as the fee-threshold-sat to ask the router to find heuristics-optimized routes within the given constraints.