Skip to content

Commit

Permalink
Increase the default liquidity_offset_half_life to six hours
Browse files Browse the repository at this point in the history
Even at relatively high payment volumes, decaying knowledge of each
individual channel every hour causes aggressive retrying of
channels as we quickly forget the state of a channel. Even with the
historical tracker, this isn't fully remedied, as we'll track the
history bounds with the decayed value.

Instead, we decay every six hours here, reducing how often we'll
retry a channel due to decay.

In addition to this, the decay likely needs to be substantially
more linear, as tracked in #1752.
  • Loading branch information
TheBlueMatt committed Oct 7, 2022
1 parent 757c5ea commit 3e14f9e
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 @@ -422,7 +422,7 @@ pub struct ProbabilisticScoringParameters {
/// 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: hour
/// Default value: 6 hours
///
/// # Note
///
Expand Down Expand Up @@ -780,7 +780,7 @@ impl ProbabilisticScoringParameters {
base_penalty_msat: 0,
base_penalty_amount_multiplier_msat: 0,
liquidity_penalty_multiplier_msat: 0,
liquidity_offset_half_life: Duration::from_secs(3600),
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
liquidity_penalty_amount_multiplier_msat: 0,
historical_liquidity_penalty_multiplier_msat: 0,
historical_liquidity_penalty_amount_multiplier_msat: 0,
Expand All @@ -806,7 +806,7 @@ impl Default for ProbabilisticScoringParameters {
base_penalty_msat: 500,
base_penalty_amount_multiplier_msat: 8192,
liquidity_penalty_multiplier_msat: 30_000,
liquidity_offset_half_life: Duration::from_secs(3600),
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
liquidity_penalty_amount_multiplier_msat: 192,
historical_liquidity_penalty_multiplier_msat: 10_000,
historical_liquidity_penalty_amount_multiplier_msat: 64,
Expand Down

0 comments on commit 3e14f9e

Please sign in to comment.