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

Use HolderCommitmentPoint::current_transaction_number

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

40/100 · Thin
Use HolderCommitmentPoint::current_transaction_number
✓ Specific, descriptive subject! No meaningful explanatory body
The short version

What changed, and why it matters

This tiny code change fixes how rust-lightning calculates which local commitment transaction number to report during Lightning channel re-establishment. The old code used an upcoming ('next') transaction number and subtracted an extra 1, which could produce an off-by-one value. If that value is wrong, a peer could be told we are on a different commitment number than we actually are, potentially causing a force-close or state mismatch during channel recovery. The fix uses the current transaction number directly.

Recommended action

Review the surrounding channel_reestablish logic and add regression tests covering commitment number reporting after holder commitment point transitions. Consider whether any reachable path could exploit the off-by-one to force an incorrect close or state update.

Security signals we found

01

off-by-one in commitment transaction number

02

channel_reestablish message handling

03

potential state desynchronization

04

Lightning protocol state machine correctness

Risk score

Why this scored 54/100

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