Skip to content

Commit 14432b8

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 db948ba commit 14432b8

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
@@ -418,7 +418,7 @@ pub struct ProbabilisticScoringParameters {
418418
/// liquidity bounds are 200,000 sats and 600,000 sats, after this amount of time the upper-
419419
/// and lower- liquidity bounds will be decayed to 100,000 and 800,000 sats.
420420
///
421-
/// Default value: hour
421+
/// Default value: 6 hours
422422
///
423423
/// # Note
424424
///
@@ -603,7 +603,7 @@ impl ProbabilisticScoringParameters {
603603
base_penalty_msat: 0,
604604
base_penalty_amount_multiplier_msat: 0,
605605
liquidity_penalty_multiplier_msat: 0,
606-
liquidity_offset_half_life: Duration::from_secs(3600),
606+
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
607607
liquidity_penalty_amount_multiplier_msat: 0,
608608
manual_node_penalties: HashMap::new(),
609609
anti_probing_penalty_msat: 0,
@@ -626,7 +626,7 @@ impl Default for ProbabilisticScoringParameters {
626626
base_penalty_msat: 500,
627627
base_penalty_amount_multiplier_msat: 8192,
628628
liquidity_penalty_multiplier_msat: 40_000,
629-
liquidity_offset_half_life: Duration::from_secs(3600),
629+
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
630630
liquidity_penalty_amount_multiplier_msat: 256,
631631
manual_node_penalties: HashMap::new(),
632632
anti_probing_penalty_msat: 250,

0 commit comments

Comments
 (0)