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

Merge PR 'Persistent `MonitorEvent`s' (#4491)

Public commit record

What the developer wrote

Authored by wpaulino

76/100 · Adequate
Merge PR 'Persistent `MonitorEvent`s' (#4491)

from valentinewallace/2026-03-persistent-mon-evs into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4491
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit makes on-chain 'MonitorEvent' notifications durable and replay-safe. Previously, if a node crashed after a ChannelMonitor persisted a block update but before the ChannelManager processed the resulting event, the event could be lost. That could cause a forwarding node to miss an HTLC preimage or timeout, potentially leading to stuck payments or loss of funds. The fix assigns each event a random ID, keeps unacknowledged events in the monitor, replays them after restart, and requires the ChannelManager to acknowledge them once processed. It also prevents monitors from being archived while they still have unacknowledged events.

Recommended action

Review the new ack lifecycle for deadlock or missed-ack paths, ensure EntropySource is available and securely seeded in all deployments, and verify that persistence of provided_monitor_events with IDs is backward/forward compatible. Run the updated monitor_tests and functional tests, especially around async persistence and restart replay.

Security signals we found

01

Durability/atomicity fix for async persistence: prevents lost MonitorEvents across crashes

02

New ack-based event lifecycle with random event IDs

03

Archival gating on unacknowledged events to avoid losing preimage/timeout information

04

Serialization round-trip of event IDs and provided events

05

EntropySource added to monitor update and chain callback APIs

06

Removal of test that validated old lost-event behavior

Risk score

Why this scored 55/100

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