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

Correct spliced-stale SCID expiry for upgrades from pre-0.2 HTLC

Public commit record

What the developer wrote

Authored by Matt Corallo

73/100 · Adequate
Correct spliced-stale SCID expiry for upgrades from pre-0.2 HTLC

If an HTLC was forwarded in 0.1, but waiting to be failed back, it
will ultimately be failed by adding it to the
`ChannelManager::pending_forwards` map with the channel's original
SCID. If that channel is spliced between when the HTLC was
forwarded (on 0.1) and when the HTLC is failed back (on 0.2), that
SCID may no longer exist, causing the HTLC fail-back to be lost.

Luckily, delaying when an SCID is expired is cheap - its just
storing an extra `u64` or two and generating one requires an
on-chain splice, so we simply delay removal of SCIDs for two months
at which point any incoming HTLCs should have been expired for six
weeks and the counterparty should have force-closed anyway.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This patch fixes a bug where money-routing instructions (HTLCs) started in an older version of LDK could get lost if the channel was later upgraded via a process called 'splicing.' The old channel identifier was being deleted too soon, so when the software tried to fail the payment back to the sender, it couldn't find the channel anymore. The fix keeps those old identifiers around for about two months longer, giving the software time to properly return stuck payments.

Recommended action

Users running LDK nodes, especially those upgrading from pre-0.2 versions with active or pending HTLCs, should apply this patch. Monitor for any HTLCs stuck in pending_forwards after channel splices and ensure process_pending_htlc_forwards is called regularly. No immediate external action such as rotating keys is required.

Security signals we found

01

Potential loss of HTLC fail-back path leading to stuck funds

02

Race between SCID expiry and pending HTLC timeout handling

03

Upgrade compatibility issue from pre-0.2 to 0.2+ HTLC forwarding logic

04

Splicing interaction with stale channel identifier cleanup

Risk score

Why this scored 56/100

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