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

Fix legacy SCID pruning

Public commit record

What the developer wrote

Authored by Wilmer Paulino

51/100 · Thin
Fix legacy SCID pruning

We relied on `position` giving us the last index we need to prune, but
this may return `None` when all known legacy SCIDs need to be pruned. In
such cases, we ended up not pruning any of the legacy SCIDs at all.

Rewritten by: Matt Corallo <git@bluematt.me>
✓ Subject identifies a change✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in how the Lightning node removes outdated short channel identifiers (legacy SCIDs). Previously, when every historical SCID was old enough to be removed, the code mistakenly removed none of them. This could leave stale routing identifiers in place longer than intended, potentially causing routing confusion or failed payments.

Recommended action

Review whether retained stale SCIDs could cause routing or channel-state issues in deployed nodes, and consider whether a follow-up migration or advisory is warranted if nodes have accumulated unpruned legacy SCIDs.

Security signals we found

01

Logic error in pruning boundary condition

02

Use of `position`/`unwrap_or` pattern that conflates 'not found' with 'none match'

03

State accumulation of stale routing identifiers

04

Potential for routing ambiguity or payment failure due to retained legacy SCIDs

Risk score

Why this scored 33/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 6/15
Affected reach 7/15
Confidence 6/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.