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 lightningdevkit#1752.
  • Loading branch information
TheBlueMatt committed Oct 5, 2022
1 parent 56d91c2 commit 8702f17
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 @@ -411,7 +411,7 @@ pub struct ProbabilisticScoringParameters {
/// the available liquidity is halved and the upper-bound moves half-way to the channel's total
/// capacity.
///
/// Default value: 1 hour
/// Default value: 6 hours
///
/// # Note
///
Expand Down Expand Up @@ -596,7 +596,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,
manual_node_penalties: HashMap::new(),
anti_probing_penalty_msat: 0,
Expand All @@ -619,7 +619,7 @@ impl Default for ProbabilisticScoringParameters {
base_penalty_msat: 500,
base_penalty_amount_multiplier_msat: 8192,
liquidity_penalty_multiplier_msat: 40_000,
liquidity_offset_half_life: Duration::from_secs(3600),
liquidity_offset_half_life: Duration::from_secs(6 * 60 * 60),
liquidity_penalty_amount_multiplier_msat: 256,
manual_node_penalties: HashMap::new(),
anti_probing_penalty_msat: 250,
Expand Down

0 comments on commit 8702f17

Please sign in to comment.