Possible improvements to finding routes. #2900
DerEwige
started this conversation in
Developers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have built a plugin to improve the way I can find routes for payments.
Maybe someone would be interested to include this into eclair itself.
I build a routing cache from all the successful payments of the last x days.
This routing cache is rebuilt every 30 minutes.
From this primary routing cache I then build a secondary cache by combining partial routes from the primary cache into new possible routes. (there apply some criteria regarding length and success chance)
Whenever I need a route form A -> B instead of going direct to
FindRouteBetweenNodes
.I first grep all the matching routes from the cache, evaluate them for the current fee, check min/max htlc along the route and get the success rate for the route. (the plugin also calculates a success chance for every channel in the whole network based on my data)
If my cache returns a candidate this candidate might be chosen (based on a probability function).
IF there is no candidate or none of the candidates is chosen, I fall back to
FindRouteBetweenNodes
Getting all matching candidates from the cache takes less then 1% of the time it takes
FindRouteBetweenNodes
to return me a route. Also routes from the route cache have a much higher success chance than route that are not in the cache (when working with very tight budgets)Note that the numbers regarding the success rate are biased towards the plugin, because I only send hard cases to éclair (where I have no candidate in the cache)
Here is a graph that shows the success rate for the cache, eclair (MC) and global as the function of the payment size in milli Satoshi
Beta Was this translation helpful? Give feedback.
All reactions