Skip to content

Commit 2e572e8

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 4fb50c3 commit 2e572e8

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
@@ -420,7 +420,7 @@ pub struct ProbabilisticScoringParameters {
420420
/// liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper
421421
/// and lower liquidity bounds will be decayed to 100,000 and 800,000 sats.
422422
///
423-
/// Default value: hour
423+
/// Default value: 6 hours
424424
///
425425
/// # Note
426426
///
@@ -605,7 +605,7 @@ impl ProbabilisticScoringParameters {
605605
base_penalty_msat: 0,
606606
base_penalty_amount_multiplier_msat: 0,
607607
liquidity_penalty_multiplier_msat: 0,
608-
liquidity_offset_half_life: Duration::from_secs(3600),
608+
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
609609
liquidity_penalty_amount_multiplier_msat: 0,
610610
manual_node_penalties: HashMap::new(),
611611
anti_probing_penalty_msat: 0,
@@ -628,7 +628,7 @@ impl Default for ProbabilisticScoringParameters {
628628
base_penalty_msat: 500,
629629
base_penalty_amount_multiplier_msat: 8192,
630630
liquidity_penalty_multiplier_msat: 40_000,
631-
liquidity_offset_half_life: Duration::from_secs(3600),
631+
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
632632
liquidity_penalty_amount_multiplier_msat: 256,
633633
manual_node_penalties: HashMap::new(),
634634
anti_probing_penalty_msat: 250,

0 commit comments

Comments
 (0)