Skip to content

Conversation

Lagrang3
Copy link
Collaborator

@Lagrang3 Lagrang3 commented Sep 9, 2025

With this PR we change the topology of the MCF problem to be able to add activation costs to channels.

Use cases:
- base fees,
- constant probability of failure for channels,
- reduction in the number of routes as well as their length,

With this PR we add a simple approximation to channel activation cost by including a parameter base_prob (in the range [0,1])
that represents the probability of a channel being online and accepting forward requests.
The activation cost of the channel is linearized by simply assuming an extra cost per arc like:

cost(x) = - log(base_prob)  x / T

where T is the total payment amount.

The smaller the value of base_prob the less likely our solver will produce long paths or many routes solutions.
Hence the caller can tune it to satisfy desired maxparts or maxlength constraints.

For this PR we borrowed the same methodology from renepay #7540.
It addresses one of the points raised in issue #8486.

  • measure mean path length and number of parts for different base_prob values
  • test maxparts constraint

@Lagrang3 Lagrang3 added this to the v25.12 milestone Sep 9, 2025
@Lagrang3 Lagrang3 force-pushed the askrene-activation-cost branch from ec46c12 to 4fdd156 Compare September 17, 2025 15:49
Add a base probability cost to simulate random channel outage
and penalize for long paths or many routes solutions.

Changelog-None

Signed-off-by: Lagrang3 <[email protected]>
@Lagrang3 Lagrang3 force-pushed the askrene-activation-cost branch from 4fdd156 to 7e33340 Compare September 18, 2025 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant