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

Fix empty witness filter in funding_transaction_signed

Public commit record

What the developer wrote

Authored by Wilmer Paulino

50/100 · Thin
Fix empty witness filter in funding_transaction_signed
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a simple but significant logic bug in the code that handles signed funding transactions for Lightning channels. The original code accidentally kept only empty witnesses (filtering for witness.is_empty()) instead of keeping the actual non-empty signatures (filtering for !witness.is_empty()). As a result, when a peer sent valid signatures to finalize a channel, the local node would receive an empty list and likely fail to complete the channel setup or produce an invalid transaction. This could disrupt channel opens and, in the worst case, be used to stall or deny service to a node, but it does not directly steal funds because the signatures themselves are still validated elsewhere.

Recommended action

Apply the patch. After applying, verify that channel funding completes successfully with non-empty witnesses and that empty witnesses are correctly ignored. Consider adding regression tests covering both empty and non-empty witness inputs to funding_transaction_signed.

Security signals we found

01

Logic inversion in witness filtering

02

Channel funding flow affected

03

Potential denial of service during channel establishment

04

No direct signature validation bypass evident from diff

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.