Skip to content

Commit 9e84966

Browse files
committed
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.
1 parent fe531c5 commit 9e84966

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lightning/src/routing/scoring.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ pub struct ProbabilisticScoringParameters {
422422
/// liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
423423
/// and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
424424
///
425-
/// Default value: hour
425+
/// Default value: 6 hours
426426
///
427427
/// # Note
428428
///
@@ -780,7 +780,7 @@ impl ProbabilisticScoringParameters {
780780
base_penalty_msat: 0,
781781
base_penalty_amount_multiplier_msat: 0,
782782
liquidity_penalty_multiplier_msat: 0,
783-
liquidity_offset_half_life: Duration::from_secs(3600),
783+
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
784784
liquidity_penalty_amount_multiplier_msat: 0,
785785
historical_liquidity_penalty_multiplier_msat: 0,
786786
historical_liquidity_penalty_amount_multiplier_msat: 0,
@@ -806,7 +806,7 @@ impl Default for ProbabilisticScoringParameters {
806806
base_penalty_msat: 500,
807807
base_penalty_amount_multiplier_msat: 8192,
808808
liquidity_penalty_multiplier_msat: 30_000,
809-
liquidity_offset_half_life: Duration::from_secs(3600),
809+
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
810810
liquidity_penalty_amount_multiplier_msat: 192,
811811
historical_liquidity_penalty_multiplier_msat: 10_000,
812812
historical_liquidity_penalty_amount_multiplier_msat: 64,

0 commit comments

Comments
 (0)