Skip to content

Commit

Permalink
Reduce the default default channel bounds half-life
Browse files Browse the repository at this point in the history
Utilizing the results of probes sent once a minute to a random node
in the network for a random amount (within a reasonable range), we
were able to analyze the accuracy of our resulting success
probability estimation with various PDFs across the historical and
live-bounds models.

For each candidate PDF (as well as other parameters, to be tuned in
the coming commits), we used the `min_zero_implies_no_successes`
fudge factor in `success_probability` as well as a total
probability multiple fudge factor to get both the historical
success model and the a priori model to be neither too optimistic
nor too pessimistic (as measured by the relative log-loss between
succeeding and failing hops in our sample data).

Across the simulation runs, for a given PDF and other parameters,
we nearly always did better with a shorter half-life (even as short
as 1ms, i.e. only learning per-probe rather than across probes).
While this likely makes sense for nodes which do live probing, not
all nodes do, and thus we should avoid over-biasing on the dataset
we have.

While it may make sense to only learn per-payment and not across
payments, I can't fully rationalize this result and thus want to
avoid over-tuning, so here we reduce the half-life from 6 hours to
30 minutes.
  • Loading branch information
TheBlueMatt committed Dec 19, 2024
1 parent 829dd26 commit fa0beaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lightning/src/routing/scoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ pub struct ProbabilisticScoringDecayParameters {
/// liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
/// and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
///
/// Default value: 6 hours
/// Default value: 30 minutes
///
/// # Note
///
Expand All @@ -781,7 +781,7 @@ pub struct ProbabilisticScoringDecayParameters {
impl Default for ProbabilisticScoringDecayParameters {
fn default() -> Self {
Self {
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
liquidity_offset_half_life: Duration::from_secs(30 * 60),
historical_no_updates_half_life: Duration::from_secs(60 * 60 * 24 * 14),
}
}
Expand All @@ -791,7 +791,7 @@ impl Default for ProbabilisticScoringDecayParameters {
impl ProbabilisticScoringDecayParameters {
fn zero_penalty() -> Self {
Self {
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
liquidity_offset_half_life: Duration::from_secs(30 * 60),
historical_no_updates_half_life: Duration::from_secs(60 * 60 * 24 * 14),
}
}
Expand Down

0 comments on commit fa0beaf

Please sign in to comment.