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

Merge PR 'Preserve live HTLCs when rejecting stale counterparty commitment updates' (#5733)

Public commit record

What the developer wrote

Authored by Matt Corallo

81/100 · Strong
Merge PR 'Preserve live HTLCs when rejecting stale counterparty commitment updates' (#5733)

from auto-pr-bot/bot/395-preserve-live-htlcs-when-rejecti-6ce448 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5733
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This patch fixes a bug in the Lightning Dev Kit's channel monitor. When a counterparty's commitment update was rejected (for example, because a pending splice was discarded after the funding was spent on-chain), the monitor could incorrectly fail back HTLCs that were still live on the unchanged current commitment. This could cause a node to incorrectly report a payment as failed and release funds, even though the HTLC was still valid and unspent on-chain. The fix tracks which commitment transaction IDs came from the rejected update so only truly new HTLCs are failed, while HTLCs on the unchanged current commitment are preserved.

Recommended action

Review and merge the patch. Ensure downstream users running channel monitors with splicing and deferred monitor updates upgrade promptly, as the bug can cause incorrect HTLC failure behavior during force-close/splice-discard scenarios.

Security signals we found

01

Incorrect HTLC failure could lead to premature payment release or funds loss

02

Channel monitor update rejection edge case during splice discard

03

Regression test added for rejected counterparty commitment update handling

04

Logic change in `fail_htlcs_from_update_after_funding_spend` to skip update-carried commitment txids

Risk score

Why this scored 66/100

Our methodology →
Potential impact 22/30
Exploitability 12/25
Stealth signal 10/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.