AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 33 Bitcoin

askrene: implement reduce_num_flows in refine, using increase_flows().

Public commit record

What the developer wrote

Authored by Rusty Russell

85/100 · Strong
askrene: implement reduce_num_flows in refine, using increase_flows().

Now we simply call it at the end. We need to check it hasn't violated fee maxima, but
otherwise it's simple.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Plugins: `askrene` now handles limits on number of htlcs much more gracefully.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes the `askrene` routing plugin in Core Lightning so it respects user limits on how many payment paths (HTLCs) can be used. Previously, when a user set `maxparts` lower than the number of routes the algorithm found, the plugin could fail to find a route or behave poorly. The new code merges excess routes into the largest remaining ones and checks that fees stay within budget. It is a correctness/reliability improvement, not a remote exploit.

Recommended action

Treat as a normal reliability/correctness fix. Review the new `reduce_num_flows()` logic and the post-reduction fee check for edge cases where redistributing flows could exceed channel capacity or fee budgets. No urgent security response is indicated by the diff alone.

Security signals we found

01

Changelog labels the change as 'Fixed' and mentions HTLC limits

02

Test changes from expecting failure to expecting success for maxparts=2

03

New fee-budget check after flow reduction

04

Removes FIXME comments describing the old algorithm as 'dumb'

05

No input validation, memory-safety, or cryptographic changes visible

Risk score

Why this scored 33/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 5/15
Affected reach 7/15
Confidence 7/10
Evidence quality 3/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.