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

Migrate `MonitorUpdatingPersister` to an async + async-sync wrapper

Public commit record

What the developer wrote

Authored by Matt Corallo

73/100 · Adequate
Migrate `MonitorUpdatingPersister` to an async + async-sync wrapper

As we've done with several other structs, this adds an async
variant of `MonitorUpdatingPersister` and adds an async-sync
wrapper for those using `KVStoreSync`. Unlike with other structs,
we leave `MonitorUpdatingPersister` as the sync variant and make
the new async logic a `MonitorUpdatingPersisterAsync` as the async
monitor updating flow is still considered beta.

This does not yet expose the async monitor updating logic anywhere,
as doing a standard `Persist` async variant would not work for
ensuring the `ChannelManager` and `ChainMonitor` don't block on
async writes or suddenly require a runtime.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit is a routine internal refactoring of a Lightning node storage helper. It rewrites the existing synchronous `MonitorUpdatingPersister` to be a thin wrapper around a new asynchronous implementation, without changing how data is stored, encrypted, or validated. The new async code is explicitly marked as beta and is not yet exposed to users. There is no indication this fixes or introduces a security vulnerability.

Recommended action

No security action required. Treat as normal code-quality/architecture review. If deploying the new async variant when it becomes public, verify that the underlying `KVStore` futures are cancellation-safe and that `poll_sync_future` is never used with futures that can legitimately return `Pending`.

Security signals we found

01

No security-relevant behavioral change in persistence logic

02

New `poll_sync_future` helper uses `unreachable!` on `Pending`, which is safe only if sync-derived futures never yield; this is a design invariant, not an exploitable bug

03

Async variant explicitly documented as beta and not exposed via standard `Persist` trait

04

No changes to error handling, serialization validation, or access control

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.