routing: probability based path finding #2802
In this PR, several improvements to path finding and mission control are made with the goal to improve the reliability of Lightning payments.
Probability based routing
The previously used edge and node ignore lists in path finding are replaced by a probability based system. It modifies path finding so that it not only compares routes on fee and time lock, but also takes route success probability into account.
Allowing routes to be compared based on success probability is achieved by introducing a 'virtual' cost of a payment attempt and using that to translate probability into an extra cost factor.
Failed route decay time
This PR also extends the decay time of mission control data. It used to be very short which hardly allowed a payment to benefit from outcomes of previous payment attempts. With this PR, the decay time becomes configurable.
Minimum route probability
The payment process stop condition has been adapted to probability based routing. Previously the payment processed stopped when no more routes could be found. This typically happened when all tried edges had been added to the ignore list. With probabilities, every route will always have a non-zero success probability. That probability can be small, but the payment may still succeed via this route.
To prevent the payment process ending up in a loop trying routes that are highly unlikely to succeed until it times out, a minimum required success probability is introduced. Only routes with a probability above this threshold are considered and if there are none, the payment process is stopped.
Query mission control state
A new rpc call has been added to query the internal mission control state. This should give advanced users a tool to better understand why certain routes are chosen.
The main parameters influencing the payment process within
Minimum required route success probability to attempt the payment (default: 0.01)
Assumed success probability of a hop in a route when no other information is available. (default: 0.95)
Defines the duration in minutes after which a penalized node or channel is back at 50% probability (default: 60)
The (virtual) cost in sats of a failed payment attempt (default: 100)
Querying mission control is available through
The text was updated successfully, but these errors were encountered:
This PR replaces the previously used edge and node ignore lists in path finding by a probability based system. It modifies path finding so that it not only compares routes on fee and time lock, but also takes route success probability into account. Allowing routes to be compared based on success probability is achieved by introducing a 'virtual' cost of a payment attempt and using that to translate probability into another cost factor.
Previously every payment had its own local mission control state which was in effect only for that payment. In this commit most of the local state is removed and payments all tap into the global mission control probability estimator. Furthermore the decay time of pruned edges and nodes is extended, so that observations about the network can better benefit future payment processes. Last, the probability function is transformed from a binary output to a gradual curve, allowing for a better trade off between candidate routes.
This commit exposes mission control state for rpc for development purposes.
This commit exposes the three main parameters that influence mission control and path finding to the user as command line or config file flags. It allows for fine-tuning for optimal results.