@@ -306,12 +306,30 @@ impl ReadableArgs<u64> for FixedPenaltyScorer {
306
306
}
307
307
308
308
#[ cfg( not( feature = "no-std" ) ) ]
309
- type ConfiguredTime = std:: time:: Instant ;
310
- #[ cfg( feature = "no-std" ) ]
311
- use util:: time:: Eternity ;
309
+ /// [`Score`] implementation using channel success probability distributions.
310
+ ///
311
+ /// Based on *Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
312
+ /// and Stefan Richter [[1]]. Given the uncertainty of channel liquidity balances, probability
313
+ /// distributions are defined based on knowledge learned from successful and unsuccessful attempts.
314
+ /// Then the negative `log10` of the success probability is used to determine the cost of routing a
315
+ /// specific HTLC amount through a channel.
316
+ ///
317
+ /// Knowledge about channel liquidity balances takes the form of upper and lower bounds on the
318
+ /// possible liquidity. Certainty of the bounds is decreased over time using a decay function. See
319
+ /// [`ProbabilisticScoringParameters`] for details.
320
+ ///
321
+ /// Since the scorer aims to learn the current channel liquidity balances, it works best for nodes
322
+ /// with high payment volume or that actively probe the [`NetworkGraph`]. Nodes with low payment
323
+ /// volume are more likely to experience failed payment paths, which would need to be retried.
324
+ ///
325
+ /// # Note
326
+ ///
327
+ /// Mixing the `no-std` feature between serialization and deserialization results in undefined
328
+ /// behavior.
329
+ ///
330
+ /// [1]: https://arxiv.org/abs/2107.05322
331
+ pub type ProbabilisticScorer < G , L > = ProbabilisticScorerUsingTime :: < G , L , std:: time:: Instant > ;
312
332
#[ cfg( feature = "no-std" ) ]
313
- type ConfiguredTime = Eternity ;
314
-
315
333
/// [`Score`] implementation using channel success probability distributions.
316
334
///
317
335
/// Based on *Optimally Reliable & Cheap Payment Flows on the Lightning Network* by Rene Pickhardt
@@ -334,7 +352,7 @@ type ConfiguredTime = Eternity;
334
352
/// behavior.
335
353
///
336
354
/// [1]: https://arxiv.org/abs/2107.05322
337
- pub type ProbabilisticScorer < G , L > = ProbabilisticScorerUsingTime :: < G , L , ConfiguredTime > ;
355
+ pub type ProbabilisticScorer < G , L > = ProbabilisticScorerUsingTime :: < G , L , :: util :: time :: Eternity > ;
338
356
339
357
/// Probabilistic [`Score`] implementation.
340
358
///
0 commit comments