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

contractcourt: patch 0 timelock baby outputs

Public commit record

What the developer wrote

Authored by ziggie

80/100 · Strong
contractcourt: patch 0 timelock baby outputs

Older LND versions had a bug which would create HTLCs with
0 locktime. The utxonursery will have problems dealing with such
htlc outputs because we do not allow height hints of 0. Now we
will fetch the closeSummary of the channel and will add a
conservative height for rescanning.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a bug in LND's UtxoNursery where old HTLC outputs stored with a 0-block locktime could not be properly rescanned because the chain notifier rejects height hints of 0. The patch adds a fallback that derives a valid height hint from the channel's close height or short channel ID. It is a defensive fix for a historical data corruption issue, not a remote-exploitable vulnerability.

Recommended action

No immediate action required beyond normal upgrade cadence. Operators with very old LND channels that had HTLCs with 0 locktime should upgrade to ensure those outputs can be swept correctly. Review related channel close summaries for correctness if funds appear stuck.

Security signals we found

01

Fixes a historical bug causing HTLC outputs with 0 locktime

02

Prevents chain notifier errors from height hints of 0

03

Adds fallback height derivation from channel close summary

04

Includes defensive validation against invalid fallback heights

05

Adds unit tests covering normal and edge cases

Risk score

Why this scored 41/100

Our methodology →
Potential impact 12/30
Exploitability 5/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.