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

Add validation of the fees predicted by `next_commitment_stats`

Public commit record

What the developer wrote

Authored by Leo Nash

73/100 · Adequate
Add validation of the fees predicted by `next_commitment_stats`

Anytime we build a (feerate, nondust-htlc-count, fee) pair, cache it,
and check that the fee matches if the feerate and nondust-htlc-count
match when building a commitment transaction.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds internal bookkeeping and consistency checks to make sure the fee predicted when planning a Lightning channel commitment transaction matches the fee actually used when the transaction is later built. It only runs during tests and fuzzing, so it does not directly change production behavior. It is a defensive hardening/debugging patch rather than a fix for an active exploit.

Recommended action

Treat as low-priority defensive hardening. Review whether the invariant should also be enforced in production builds (e.g., as a non-panicking consistency check or error return) rather than only under test/fuzzing. No immediate patch or incident response is indicated by the diff alone.

Security signals we found

01

New test/fuzz-only assertion comparing predicted vs actual commitment transaction fees

02

Addition of cached predicted-fee state in FundingScope

03

No production runtime enforcement; changes are cfg-gated to test and fuzzing

04

Commit title frames change as validation, but diff shows it is debug/test instrumentation

05

No mention of CVE, advisory, or security bug in commit message

Risk score

Why this scored 27/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 2/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.