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

Parametric route search #844

Merged
merged 24 commits into from
Feb 11, 2019
Merged

Parametric route search #844

merged 24 commits into from
Feb 11, 2019

Conversation

araspitzu
Copy link
Contributor

This PR aims at enabling a narrower search for routes by exposing a set of parameters to limit the result and the search scope. Routes can now be 'requested' imposing a maximum number of hops, a maximum total CLTV and a maximum fees, this information will be actively used to prune edges when searching the graph for a route.

@araspitzu araspitzu changed the title [WIP] Parametric route search Parametric route search Jan 31, 2019
# Conflicts:
#	eclair-core/src/main/scala/fr/acinq/eclair/payment/PaymentLifecycle.scala
#	eclair-core/src/main/scala/fr/acinq/eclair/router/Router.scala
#	eclair-core/src/test/scala/fr/acinq/eclair/integration/IntegrationSpec.scala
@araspitzu
Copy link
Contributor Author

araspitzu commented Feb 8, 2019

Last addition to this PR: config key eclair.max-payment-fee has been removed in favor of router.search-max-fee-pct 61e7174, the two had near identical purpose and were overlapping with the latest change. CC: @dpad85

@araspitzu araspitzu mentioned this pull request Feb 8, 2019
@araspitzu araspitzu force-pushed the route_fast_searching branch from 0bc2808 to 61e7174 Compare February 8, 2019 10:38
# 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
@pm47
Copy link
Member

pm47 commented Feb 8, 2019

I propose the following change for the configuration parameters (names, description and units). What do you think @araspitzu?

// parameters for the path finding algorithm when looking for a payment route
path-finding {
  max-route-length = 6 // max route length for the 'first pass', if none is found then a second pass is made with no limit
  max-cltv =  1008 // max acceptable cltv expiry for the payment (1008 ~ 1 week)
  fee-threshold-sat = 21 // if fee is below this value we skip the max-fee-pct check
  max-fee-pct = 0.03 // route will be discarded if fee is above this value (in percentage relative to the total payment amount); doesn't apply if fee < fee-threshold-sat 
}

@araspitzu
Copy link
Contributor Author

I propose the following change for the configuration parameters (names, description and units). What do you think @araspitzu?

// parameters for the path finding algorithm when looking for a payment route
path-finding {
  max-route-length = 6 // max route length for the 'first pass', if none is found then a second pass is made with no limit
  max-cltv =  1008 // max acceptable cltv expiry for the payment (1008 ~ 1 week)
  fee-threshold-sat = 21 // if fee is below this value we skip the max-fee-pct check
  max-fee-pct = 0.03 // route will be discarded if fee is above this value (in percentage relative to the total payment amount); doesn't apply if fee < fee-threshold-sat 
}

I like them, path-finding is a good descriptive name. Mostly we want to make sure there is no confusion with other config keys (i.e max-cltv) and i think path-finding does a good job distinguishing them. Props for the fee threshold in satoshi too, it's a bit better now.

@araspitzu
Copy link
Contributor Author

Addressed comments in c9f93e2

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