From: Matt Corallo Date: Wed, 5 Oct 2022 19:23:56 +0000 (+0000) Subject: Increase the default `liquidity_offset_half_life` to six hours X-Git-Tag: v0.0.112~15^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=refs%2Fheads%2F2022-10-better-liq-halflife-docs;p=rust-lightning Increase the default `liquidity_offset_half_life` to six hours 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. --- diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index 8206a6b93..fefdebfcc 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -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 /// @@ -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, @@ -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,