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

bookkeeper: save currencyrate ranges, not individual values.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
bookkeeper: save currencyrate ranges, not individual values.

The currencyrate plugin aims for 10 minute polls, so it just doesn't
move that fast. If we're busy, recording the rate every second is
overkill.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, 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 performance and storage optimization for Core Lightning's bookkeeping plugin. Instead of saving every single currency exchange rate sample to the datastore, it now saves ranges of time where the rate stayed the same. This reduces disk writes and storage size but does not fix a security vulnerability. There is a small risk that the new lookup logic could return a slightly stale rate if a stored range is extended too far, but the code includes a 60-second tolerance and explicit checks to prevent hiding failed updates.

Recommended action

Treat as a routine optimization commit. Reviewers should verify that covering_currencyrate() cannot select a stale range across currency changes or plugin restarts, and that the 60-second tolerance is acceptable for the intended 10-minute poll interval. No security patch or incident response is indicated.

Security signals we found

01

Datastore schema change from per-timestamp double to timestamp-range integer encoding

02

New covering lookup could return a rate from an extended range rather than the exact timestamp

03

60-second tolerance explicitly limits range extension to avoid glossing over failed polls

04

No input validation weakening observed; malformed datastore entries still rejected in load_currencyrates

05

No memory safety primitives changed; allocation patterns remain tal-based

Risk score

Why this scored 16/100

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