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

Apply MPP receive timeout to keysend payments

Public commit record

What the developer wrote

Authored by Elias Rohrer

78/100 · Adequate
Apply MPP receive timeout to keysend payments

Incomplete keysend MPPs skipped the receive timeout path,
allowing partial payments to hold HTLC slots until CLTV
expiry instead of failing after `MPP_TIMEOUT_TICKS`.
Apply the existing `total_mpp_amount_msat` completeness
check to all MPP receives and add a regression test
covering the keysend case.

The timeout logic was originally added only for
invoice-backed MPPs in 2022, and that invoice-only
guard remained when receive-side MPP keysend support
landed in 2023, leaving this gap latent until now.

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

What changed, and why it matters

This commit fixes a bug in the Lightning Dev Kit where multi-part keysend payments (a way to send Bitcoin over the Lightning Network without an invoice) did not use the normal timeout safety check. Normally, if only some parts of a multi-part payment arrive, the node waits a short time and then fails the partial payments to free up resources. For keysend payments, this timeout was skipped, so partial payments could sit around for hours or days, tying up funds and network slots until the payment's final deadline. The fix applies the same completeness and timeout check to all multi-part receives, including keysend, and adds a test to prevent the bug from returning.

Recommended action

Review and merge the patch, then backport to affected release branches that include receive-side keysend MPP support. Monitor for any nodes that may have experienced stuck HTLCs from partial keysend MPPs prior to the fix.

Security signals we found

01

Resource exhaustion via held HTLC slots from incomplete MPP receives

02

Denial-of-service-like effect from prolonged locking of channel liquidity

03

Logic gap introduced when keysend receive support was added without extending existing timeout guard

04

Regression test added for keysend MPP receive timeout behavior

Risk score

Why this scored 60/100

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