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

bookkeeper: avoid wasteful refresh races.

Public commit record

What the developer wrote

Authored by Rusty Russell

68/100 · Adequate
bookkeeper: avoid wasteful refresh races.

Now we're refreshing more regularly, so it's worth avoiding races
rather than simply letting them happen and ignoring the results.

Keep a pointer in bkpr and piggy back on that one if it's there.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change is a hardening fix in Core Lightning's bookkeeping plugin. It prevents multiple simultaneous 'refresh' operations from racing each other and silently dropping duplicate results. Instead of ignoring cases where data arrives out of order, the code now asserts the expected order and queues follow-up refresh requests onto one shared in-flight operation. The visible risk is reduced reliability/correctness of accounting records rather than direct theft of funds.

Recommended action

Treat as a low-severity hardening patch. Review whether the new assertions can be triggered by any remaining race paths and ensure the destructor note in the comment is addressed if command lifetimes change. No urgent security response is indicated by the commit alone.

Security signals we found

01

Race condition in concurrent refresh handling

02

Silent dropping of out-of-order move events replaced by assertions

03

Shared mutable state (bkpr->rinfo) now synchronized via callback queueing

04

Potential accounting inconsistency if race had been hit before fix

Risk score

Why this scored 21/100

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