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

Clamp our selected reserve to the counterparty's dust limit

Public commit record

What the developer wrote

Authored by Leo Nash

73/100 · Adequate
Clamp our selected reserve to the counterparty's dust limit

In a subsequent commit, we will allow the counterparty's dust limit to
be greater than our `MIN_THEIR_CHANNEL_RESERVE_SATOSHIS`. Our selected
reserve must always be greater than their dust limit, so we set our
selected reserve to be equal to or greater than their dust limit.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes how Lightning channels set a minimum 'reserve' amount that each side must keep in the channel. The reserve is now forced to be at least as large as the other side's 'dust limit' (the smallest transaction output considered worth tracking). Without this, a peer could set a very high dust limit while the reserve stayed low, potentially allowing tiny outputs to be treated as non-existent or causing the channel's accounting rules to disagree between the two sides. The change is defensive and prepares for a later feature allowing larger dust limits.

Recommended action

Review the subsequent commit that raises allowed counterparty dust limits to ensure the outbound-channel failure path is exercised and that no edge case allows a dust limit above the selected reserve to be accepted. Consider adding or verifying tests where `their_dust_limit_satoshis` exceeds `MIN_THEIR_CHAN_RESERVE_SATOSHIS`.

Security signals we found

01

Reserve/dust-limit relationship changed to prevent reserve from falling below counterparty dust limit

02

Comment explicitly notes protocol-level safety check and failure path for outbound channels with unknown dust limit

03

Multiple test files updated to pass new parameter, indicating behavioral dependency

04

Commit message describes the change as required for a subsequent protocol relaxation

Risk score

Why this scored 58/100

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