Skip to content

askrene: cut-off arcs with very low probability - #9482

Open
Lagrang3 wants to merge 1 commit into
ElementsProject:masterfrom
Lagrang3:askrene-probability-guard
Open

askrene: cut-off arcs with very low probability#9482
Lagrang3 wants to merge 1 commit into
ElementsProject:masterfrom
Lagrang3:askrene-probability-guard

Conversation

@Lagrang3

@Lagrang3 Lagrang3 commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Arcs with very low probability of success are pruned early.
This only applies to the single path solver because the MPP code uses arc linearization and already the low probability
tail is removed.

@Lagrang3
Lagrang3 force-pushed the askrene-probability-guard branch from 8e4ef3b to 3424973 Compare September 7, 2026 07:10
@madelinevibes madelinevibes added 26.06.x Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. labels Sep 7, 2026
@Lagrang3
Lagrang3 force-pushed the askrene-probability-guard branch 2 times, most recently from fb5243f to 13adf50 Compare September 7, 2026 11:33
params->amount);

/* too unlikely it is not worth considering */
if (probability < 1e-6)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cutoff seems to conflict with how xpay probes liquidity? test_sendpay_grouping in test_pay.py documents that repeated attempts use attempted_amount - 1msat, specifically to land on the edge of the channel hint learned from the previous failure (as i see docstring at test_pay.py at line 5401-5406. Isn't this the situation where the new probability is smallest and most likely to fall under 1e-6?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a payment failed at 1000'000 sat, yes you may try again with 999'999, but the probability
of that getting through is roughly 1 in a million.
In the real network we don't do that, we split the payment and maybe try again the same route
with a smaller amount eg. ~500'000, while the rest is routed through other paths.

The sendpay_grouping test is testing listpays for repeated pay calls by abusing xpay.
The important thing here is to try the same payment several times, the X-1 is not important to the
test.

Arcs with very low probability of success are pruned early.
This only applies to the single path solver because the MPP code
uses arc linearization and already the low probability tail is removed.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3
Lagrang3 force-pushed the askrene-probability-guard branch from 13adf50 to 2bde9c6 Compare September 8, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

26.06.x Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants