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

Use `FundingScope` spent when signing watchtower justice transactions

Public commit record

What the developer wrote

Authored by Wilmer Paulino

85/100 · Strong
Use `FundingScope` spent when signing watchtower justice transactions

Since there may be multiple counterparty commitment transactions for the
same commitment number due to splicing, we have to locate the matching
`FundingScope::channel_parameters` to provide the signer. Since this is
intended to be called during `Persist::update_persisted_channel`, the
monitor should have already had the update applied.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This patch fixes a bug in how a Lightning node signs 'justice' transactions—on-chain penalty transactions that reclaim funds when a counterparty tries to cheat. Before the fix, the code always used the current funding channel parameters when signing, but with splicing there can be multiple funding scopes. If the wrong parameters were used, the justice transaction signature could be invalid, potentially preventing the node from successfully penalizing a cheating counterparty in a spliced channel. The fix looks up the correct funding scope based on which commitment transaction is being claimed.

Recommended action

Review and merge this patch if not already applied. Test justice transaction signing across splice operations where the counterparty commitment number exists in both old and new funding scopes. Verify that update_persisted_channel applies monitor state before this function is called, as the comment assumes.

Security signals we found

01

Invalid signature generation for revoked commitment justice transactions in spliced channels

02

Potential failure to claim revoked counterparty outputs after a splice

03

Channel parameter mismatch between current funding scope and historical commitment transaction

04

Splicing-specific state handling bug

Risk score

Why this scored 56/100

Our methodology →
Potential impact 18/30
Exploitability 10/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.