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

lightningd: reject a channel that reuses an existing funding outpoint

Public commit record

What the developer wrote

Authored by Níckolas Goline

73/100 · Adequate
lightningd: reject a channel that reuses an existing funding outpoint

A v1 channel_id is derived solely from the funding outpoint, so two
channels funded by the same outpoint would share a channel_id. When a
peer completes a second funding using an outpoint we already have a
channel for, refuse it and drop the connection instead of committing a
second channel with a colliding channel_id.

Add find_channel_by_funding_outpoint() to look up an existing channel by
its funding outpoint.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change prevents a peer from accidentally or maliciously opening a second Lightning channel using the exact same Bitcoin transaction output as an existing channel. Because channel IDs are derived from that funding output, reusing it would create two channels with the same ID, which could confuse the node and potentially lead to incorrect routing or state handling. The fix detects the duplicate and disconnects the peer before the second channel is committed.

Recommended action

Apply the patch. It is a targeted, low-risk defensive fix. Consider whether other code paths (e.g., fundee vs funder, dual-funding, splicing) also need duplicate-funding-outpoint checks, as the current patch only covers the fundee completion path.

Security signals we found

01

channel ID collision / duplicate identifier

02

funding outpoint reuse

03

state confusion between distinct channels

04

peer-triggered duplicate channel creation

05

defensive disconnect on duplicate detection

Risk score

Why this scored 59/100

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