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

Don't store anchor transaction in channel data (#3187)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

81/100 · Strong
Don't store anchor transaction in channel data (#3187)

We don't need to store the anchor transaction in our channel data when
closing a channel: this isn't used anywhere and unnecessarily uses
space in our DB.

Also, once the commit tx is confirmed, we don't need to watch the
anchor output again on restarts.
✓ 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 commit removes the storage of Bitcoin 'anchor' transactions inside Lightning channel state and stops re-watching those anchor outputs after the commitment transaction is confirmed. The stated goal is to save database space and avoid redundant work. The change also tweaks how the code decides whether a transaction is 'relevant' to a closing channel, explicitly excluding anchor outputs from being treated as spending the commitment transaction. There is no direct evidence in the commit that this fixes an active security bug, but it does reduce the surface area for state-mismatch and watch-related edge cases during channel closes.

Recommended action

Treat as a low-risk maintenance/cleanup change. Reviewers should verify that skipping anchor-output watches after confirmation does not miss edge cases where the anchor is double-spent or RBF-bumped by the remote party, and that excluding anchor outpoints from 'spendsTheCommitTx' does not affect detection of revoked-commitment breaches or HTLC-timeout flows.

Security signals we found

01

Reduced state persistence: anchor tx no longer stored in channel data, lowering DB bloat and potential stale-state risks

02

Conditional watch logic: anchor output is only watched while the commitment tx is unconfirmed

03

Relevance filter change: anchor outputs explicitly excluded from 'spends the commitment tx' classification

04

No explicit security framing by vendor; commit message describes it as a space/efficiency improvement

Risk score

Why this scored 23/100

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