Commit Graph

4 Commits

Author SHA1 Message Date
Matt Morehouse
8373cca43c
routing: skip fuzzing when capacity is 0
probabilityFormula() is expected to return an error if capacity is 0, so
we should exclude that case from fuzzing.

Previously it was attempted to avoid this case by seeding the corpus
with an input that had capacity 1. That is not an effective solution
since the fuzzer can still generate an input with capacity 0.
2024-09-10 15:17:39 -05:00
bitromortac
170677be2b
routing: stronger use of direct bimodal probability
The process how we calculate a total probability from the direct and
node probability is modified to give more importance to the direct
probability.

This is important if we know about a recent failure. We should not try
to send over this channel again if we know we can't. Otherwise this can
lead to infinite retrials over the channel, when the probability is
pinned at high probabilities by the other node results.
2023-03-23 11:12:10 +01:00
bitromortac
4aa90cf474
routing: add error case for zero capacity
Since no edge should have a zero capacity associated with it, passing a
zero capacity to the bimodal probability calculation results now in an
error.
2023-03-23 11:12:10 +01:00
bitromortac
686816d784
routing: implement bimodal probability estimator
Implements a new probability estimator based on a probability theory
framework.

The computed probability consists of:
* the direct channel probability, which is estimated based on a
  depleted liquidity distribution model, formulas and broader concept derived
  after Pickhardt et al. https://arxiv.org/abs/2103.08576
* an extension of the probability model to incorporate knowledge decay
  after time for previous successes and failures
* a mixed node probability taking into account successes/failures on other
  channels of the node (similar to the apriori approach)
2023-02-14 13:34:25 +01:00