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

Report the used success probabilities in scorer accessor methods

Public commit record

What the developer wrote

Authored by Matt Corallo

85/100 · Strong
Report the used success probabilities in scorer accessor methods

`live_estimated_payment_success_probability` and
`historical_estimated_payment_success_probability` allow clients to
fetch the estimated success probability of a channel directly,
rather than as a score.

Sadly, because they did not check that the amount was strictly
smaller than `max_liquidity_msat`, `success_probability` could hit
a (otherwise-harmless) debug assertion, which is fixed here.

While doing so, we also update them to return the actual
probability estimate used in scoring, applying the 1% lower-bound.
✓ 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 two related issues in rust-lightning's payment scorer. First, two public accessor methods that report estimated payment success probabilities could trigger a debug-only assertion (a crash in debug builds) when asked about an amount equal to or larger than a channel's maximum liquidity. Second, the methods now return the same probability values actually used internally for routing decisions, including a 1% minimum probability floor. The practical effect is that callers get consistent, non-crashing estimates instead of raw values that could be zero or trigger internal checks.

Recommended action

Review whether any downstream callers relied on the previous raw-zero behavior; otherwise this is a straightforward correctness/consistency fix. No immediate security response appears necessary beyond normal merge and release.

Security signals we found

01

Debug assertion reachable through public API when amount_msat equals or exceeds channel capacity/max liquidity

02

Public probability accessors returned raw estimates inconsistent with internal scoring, potentially misleading callers

03

New lower-bound clamping aligns accessor output with actual routing penalty calculations

Risk score

Why this scored 28/100

Our methodology →
Potential impact 5/30
Exploitability 3/25
Stealth signal 4/15
Affected reach 5/15
Confidence 7/10
Evidence quality 4/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.