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

chanmon_consistency: assert claimed payments result in PaymentSent

Public commit record

What the developer wrote

Authored by Joost Jager

73/100 · Adequate
chanmon_consistency: assert claimed payments result in PaymentSent

Add an invariant to the settlement phase: every payment that a receiver
claimed (via claim_funds) must result in a PaymentSent event at the
sender. This catches bugs where a claimed payment's preimage fails to
propagate back to the sender.

To support this, change resolved_payments from Vec<PaymentId> to
HashMap<PaymentId, Option<PaymentHash>>, storing Some(hash) for
PaymentSent and None for PaymentFailed/probes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit only adds a new safety check inside an internal fuzz test harness. It does not change production code, user-facing behavior, or network protocol handling. The change makes the test suite verify that when a payment is claimed by a receiver, the sender eventually receives a matching 'payment sent' confirmation. It is a test-quality improvement, not a security fix or vulnerability.

Recommended action

No action needed. Treat as a normal test-harness improvement. If reviewing, confirm the assertion logic correctly matches PaymentHash values and does not introduce false positives in fuzz runs.

Security signals we found

01

Adds invariant assertion in fuzz test only

02

No changes to cryptographic, networking, or state-machine code

03

No privilege boundary or input validation changes

04

No bug class being fixed in shipped code

Risk score

Why this scored 12/100

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