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

lnworker: use channel_id instead of scid in ReceivedMPPHtlc

Public commit record

What the developer wrote

Authored by f321x

73/100 · Adequate
lnworker: use channel_id instead of scid in ReceivedMPPHtlc

Store the channel id instead of the scid in ReceivedMPPHtlc.
The scid can be None, in theory even for multiple channels at the same
time. Using the channel_id which is always available and unique seems
less error prone at the cost of temporarily higher storage requirements
in the db for the duration of the pending htlcs.

Alternatively we could use the local scid alias however using the
channel_id seems less complex and leaves less room for ambiguity.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes how Electrum's Lightning wallet internally tracks incoming multi-part payments. Instead of using the short channel ID (which can be missing or ambiguous), it now uses the permanent channel ID. The change includes a database upgrade to convert old stored data. The commit message frames this as a robustness improvement, not a security fix, but the scenario it addresses—multiple channels lacking short IDs—could theoretically lead to mis-routing or incorrect handling of pending payments.

Recommended action

Treat as a hardening/robustness change rather than an active vulnerability. Reviewers should verify that the database migration correctly handles wallets where a stored short_channel_id no longer maps to a channel, and that all code paths consuming ReceivedMPPHtlc now consistently use channel_id. Monitor for follow-up commits or disclosures that clarify whether this addresses a reproducible security issue.

Security signals we found

01

Changes identifier used for Lightning HTLC routing/settlement from short_channel_id to channel_id

02

Adds database migration converting stored short_channel_id values to channel_id

03

Commit message notes short_channel_id can be None and ambiguous across multiple channels

04

Touches MPP resolution, HTLC forwarding, and cleanup logic

Risk score

Why this scored 32/100

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