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

Treat replayed LSPS2 HTLCs idempotently

Public commit record

What the developer wrote

Authored by tnull

68/100 · Adequate
Treat replayed LSPS2 HTLCs idempotently

Replayed intercepted HTLC events should not duplicate queued payments or
panic after restart. Ignore already-queued intercept IDs so persisted
queues remain stable across event replay.

Co-Authored-By: HAL 9000
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change fixes a crash and duplicate-queue bug in the Lightning Dev Kit's LSPS2 payment queue. After a restart, previously seen intercepted HTLCs can be replayed; the old code would panic (in debug builds) or add duplicates, while the new code returns the existing payment status instead. It is a reliability/idempotency fix rather than a direct theft-of-funds vulnerability, but a panic on restart could disrupt a liquidity service.

Recommended action

Review whether production builds could still be affected by any non-debug panic paths for intercept_id collisions, and confirm that downstream callers handle the returned status tuple consistently. Consider backporting to releases that include LSPS2 support.

Security signals we found

01

debug_assert! panic on replayed intercepted HTLCs removed

02

duplicate queued payment entries prevented

03

state consistency across restart improved

04

idempotency added to hot path HTLC handler

Risk score

Why this scored 44/100

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