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

Unwatch previous funding tx after splice (#3218)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

76/100 · Adequate
Unwatch previous funding tx after splice (#3218)

After a splice transaction confirms, we don't need to keep watching the
previous funding output: it has been irrevocably spent and needlessly
consumes resources in the `Watcher` actor.

Those watches are cleaned up when the `Channel` actor dies, which does
not happen if the channel isn't closed and the `Peer` actor is kept
alive while disconnected.

Whenever we receive a new block, we log the number of watches we have.
This lets us detect whether we're missing some clean-up of old watches
in edge cases.
✓ 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 commit fixes a resource cleanup issue in the Eclair Lightning node. After a channel is upgraded via a 'splice' transaction, the old funding transaction output is permanently spent. Previously, Eclair kept watching that old output indefinitely if the channel stayed open and the peer stayed disconnected, wasting memory and processing power in the blockchain watcher. The change explicitly tells the watcher to stop watching those old, already-spent outputs. It also adds logging so operators can spot similar leftover watches. There is no direct evidence in the commit that this was exploitable to steal funds or attack other nodes; it appears to be a performance and robustness improvement.

Recommended action

Treat as a routine hardening/performance fix. Operators running nodes with frequent splices should upgrade to avoid gradual watcher bloat. No emergency response is indicated by the diff. Review whether other watch types (e.g., WatchOutputSpent, WatchPublished) have similar stale-watch edge cases.

Security signals we found

01

Resource exhaustion / gradual memory growth from stale watcher state

02

Defensive cleanup of spent funding outputs after splice confirmation

03

New observability (per-block watch counts) to detect future cleanup gaps

04

No direct diff evidence of fund loss, remote exploit, or consensus bug

Risk score

Why this scored 25/100

Our methodology →
Potential impact 4/30
Exploitability 2/25
Stealth signal 3/15
Affected reach 5/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.