EP
← All projectsElements Project

Core Lightning

Modular C implementation of the Lightning Network protocol and node stack.

BitcoinLightning NetworkNormal
Repository coverage

1854 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

158security candidates263second-pass queue538AI analyses
144commits · 30 days
226commits · 60 days
804commits · 180 days
1850commits · 365 days
Backfill bands
Aug 5 → Feb 61049 seen37 candidatesComplete
Feb 6 → Jun 6579 seen10 candidatesComplete
Jun 6 → Jul 678 seen1 candidatesComplete
Jul 6 → Aug 5147 seen16 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

70/100 average clarity
431Strong · 80–100
1163Adequate · 60–79
231Thin · 40–59
29Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
dovgopoly1502164
Rusty Russell95873237072
Sangbida Chaudhuri1473171066
Dusty Daemon771314066
ShahanaFarooqui931020063
daywalker9089532062
Níckolas Goline40513076
Lagrang376428069
Christian Decker3647072
Vincenzo Palazzo834080
Chandra Pratap56250082
ekzyis222063
Analysis record

Published AI watches

Last scanned 1 minute ago

Informational 15 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Revert "doc: require Homebrew GNU make and gpatch on macOS"

This commit is a simple documentation revert. It undoes a previous change that told macOS users to install GNU make and GNU patch from Homebrew and to put those tools first in their command path. The reverted instructions now omit gpatch a…

0cfa949fby Sangbida Chaudhuri+4−81 file
No security note in commit
Informational 15 AI analysisMessage 75 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Revert "tests: drop obsolete x-prefix in compacter-slow.sh"

This commit re-adds an old-style 'x' prefix to a string comparison in a test helper script. It is a test-only change with no effect on the actual Core Lightning node software, user funds, network behavior, or security. The change simply re…

116fd7cdby Sangbida Chaudhuri+1−11 file
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: require Homebrew GNU make and gpatch on macOS

This commit only updates macOS installation instructions in the documentation. It tells macOS users to install newer GNU versions of 'make' and 'patch' from Homebrew because Apple's built-in tools are too old for building and running sourc…

d3ff1474by Sangbida Chaudhuri+8−41 file
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: drop obsolete x-prefix in compacter-slow.sh

This commit is a trivial shell script cleanup. It removes an old-fashioned 'x' prefix from a string comparison in a test helper script so that a newer version of the Shellcheck linter stops warning about it. The change does not alter progr…

474c272aby Sangbida Chaudhuri+1−11 file
No security note in commit
Informational 18 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

common: hoist amount+currency parsing into common code.

This commit moves existing code that parses payment amounts (Bitcoin millisatoshis, 'any' amount, or fiat currency amounts) from one plugin file into a shared library so it can be reused by a future feature. It is a code refactoring with n…

Refactoring of amount-parsing code into a shared helperAddition of explicit u64 overflow guards (mul_overflows_u64, add_overflows_u64) in the new common codeNo change to wire protocol or RPC interface semantics
e0f86c17by Rusty Russell+112−723 files
No security note in commit
Informational 17 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: internal cleanups since all non-command JSON IDs are strings.

This is a routine internal cleanup commit in Core Lightning. It removes an unused helper function and simplifies how JSON-RPC request IDs are stored and formatted, since the project now always uses string IDs for non-command JSON traffic. …

No security-relevant keywords in commit title or messageNo CVE, advisory, or bug reference presentChanges are refactor/cleanup in nature
a70ae963by Rusty Russell+25−378 files
No security note in commit
Informational 15 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

common: hoist hash_str helper into its own header.

This commit is a routine code cleanup: it moves a small string-hashing helper function into a shared header file so it can be reused without being copied and pasted. There is no change to behavior, no bug fix, and no security relevance.

581bbb1fby Rusty Russell+16−176 files
No security note in commit
Informational 23 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

downgrade: we need to remove "impressions" from askrene datastore when downgrading to v26.06.

This is a database downgrade helper fix, not a live network vulnerability. Core Lightning's downgrade tool previously failed to strip out new 'channel impression' records when rolling a database back to version v26.06. The patch teaches th…

Database downgrade path could leave incompatible records in older schemaOffline tool only; no remote or on-chain triggerFix prevents potential node startup failure after version rollback
4d926285by Rusty Russell+43−111 file
No security note in commit
Low 31 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

downgrade tool: fix invalid memory bug

This commit fixes a typo in a database downgrade helper tool. The bug caused the tool to pass a negative number (turned into a huge positive size) when copying data, which led to an out-of-memory (OOM) error. The fix swaps two variable nam…

Integer underflow / negative-to-size_t wrap leading to excessive allocationOut-of-memory crash in maintenance toolMemory corruption potential if allocation somehow succeeded
42995326by Lagrang3+8−81 file
No security note in commit
Informational 24 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

xpay: actually tell askrene when a payment succeeded.

This commit fixes a bookkeeping bug in Core Lightning's xpay plugin. Previously, when a payment succeeded, xpay did not tell the askrene routing-helper that the route worked. As a result, askrene kept stale or overly pessimistic ideas abou…

Missing success feedback to routing layer can degrade payment reliabilityStale negative impressions may bias future path selection toward worse or failing routesNo direct funds-loss primitive is introduced or fixed
a66fabd4by Rusty Russell+40−02 files
No security note in commit
Low 49 AI analysisMessage 58 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

askrene: correctly order constraints.

This commit fixes a bug in Core Lightning's routing helper (askrene) where two kinds of channel information—hard limits called 'constraints' and usage estimates called 'impressions'—were being applied in the wrong order. Because impression…

Routing decision bug caused by incorrect ordering of time-relative channel statePotential payment failure or acceptance of an over-capacity routeRegression test added demonstrating incorrect route acceptance before fix
4b6fe4a1by Rusty Russell+211−1182 files
No security note in commit
Low 35 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

askrene: don't leak channel intel entries

This commit fixes a memory leak in the askrene plugin of Core Lightning. When individual channel intelligence entries were deleted, the code removed the entry from its array but forgot to free two internal pointers (impression and constrai…

Memory leak in plugin data structure cleanupMissing deallocation of nested pointers before array removalFix located in routing/intelligence plugin (askrene)
8891f414by Lagrang3+5−01 file
No security note in commit
Informational 15 AI analysisMessage 70 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

xpay: tests should expect the new error messages

This commit only updates test files so that automated checks expect slightly different error wording from the xpay payment command. It does not change any production code, so it cannot introduce a security vulnerability or fix one on its o…

0b67601fby Lagrang3+24−32 files
No security note in commit
Low 43 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

offers: limit invoices to 10 minutes for recurring offers in other currencies.

This change tightens the lifetime of recurring invoices priced in foreign currencies (like USD) to 10 minutes by default, and refreshes them with current exchange rates when they expire. Previously, such invoices could remain valid for the…

Fixes stale exchange-rate exposure for currency-denominated recurring invoicesAdds configurable expiry cap for recurring currency invoicesDistinguishes user-cancellation (0s expiry) from natural expiry to avoid misleading errors
446312cfby Rusty Russell+134−148 files
No security note in commit
Low 45 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

offers: limit expiry to offer limit, or 10 minutes with currency conversion.

This commit tightens the expiration time on invoices created from BOLT12 offers. Previously, all such invoices defaulted to a 2-hour payment window. Now, if the offer has an absolute expiry, the invoice expires when the offer expires; and …

BOLT12 invoice expiry now bounded by offer absolute expiryCurrency-converted invoices use short expiry to limit exchange-rate exposureNew regression test added for expiry behavior
a6cf4915by Rusty Russell+55−22 files
No security note in commit
Low 29 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

fetchinvoice: don't bother with checking recurrence timing.

This commit removes local timing checks in Core Lightning's fetchinvoice plugin for recurring payments. Instead of the plugin refusing too-early or too-late invoice requests, it now lets the remote node decide and report back. The change i…

Removal of local input-validation checks for recurring invoice requestsReliance on remote-party enforcement for recurrence period limits and pay windowsTest expectations changed from local rejection to remote failure messages
3e49d908by Rusty Russell+2−682 files
No security note in commit
Low 32 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: don't do previous invoice checking in createinvoicerequest.

This commit removes a local sanity check in Core Lightning's experimental 'createinvoicerequest' command. Previously, when creating a recurring invoice request, the code looked up past payments by label to verify the previous recurrence wa…

Removal of local payment-state validation for recurring invoice requestsParameter rename from recurrence_label to label in internal RPC callsTest expectations changed from local 'previous invoice has not been paid' errors to remote failure messages
4348d8acby Rusty Russell+5−1224 files
No security note in commit
Low 35 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

fetchinvoice: handle weird labels in recurrence_label parameter.

This commit fixes how the fetchinvoice plugin handles user-supplied labels that contain special characters such as backslashes, quotes, tabs, and newlines. Previously these labels were passed as raw strings, which could cause JSON encoding…

JSON injection / improper escaping of user-controlled input passed between RPC componentsPotential mismatch between label parsing and label serialization leading to functional failures or unexpected behaviorFix is narrowly scoped to a single plugin and parameter
d7f87f2dby Rusty Russell+37−102 files
No security note in commit
Informational 15 AI analysisMessage 70 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Add unit tests for str_to_u64

This commit only adds a new automated test file that checks how a helper function (str_to_u64) converts text strings to unsigned 64-bit integers. It does not change any production code, so it cannot by itself introduce a security vulnerabi…

dddb455dby Lagrang3+203−01 file
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

pytest: add tests for what we want askrene to do.

This commit only adds a new pytest test file. It does not change any production code. The test describes desired future behavior for the askrene routing module's error messages when a payment source or destination lacks enough channel capa…

518620aeby Rusty Russell+67−01 file
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-prioritybookeeper: add currencyrate to bkpr-listaccounts if we recorded it.by Rusty Russell · 0ced9a89 · Mar 23, 2026 · 16 filesMessage 65 · AdequateTriage 0Details
Commit message · Rusty Russell

bookeeper: add currencyrate to bkpr-listaccounts if we recorded it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritycurrencyrate: fix cached currencies to still use median.by Rusty Russell · 31e7ee5f · Mar 23, 2026 · 2 filesMessage 65 · AdequateTriage 0Details
Commit message · Rusty Russell

currencyrate: fix cached currencies to still use median.

It was using *only* the latest one, not all the fresh ones.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritycommon: fix run-mkdatastorekey link on arm64by Sangbida Chaudhuri · 43c233ee · Mar 23, 2026 · 1 fileMessage 78 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

common: fix run-mkdatastorekey link on arm64

Add common/pseudorand.o to its link line to fix below error seen on CI:

Undefined symbols for architecture arm64:
"_siphash_seed", referenced from:
_script_with_len_hash in script.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [common/test/run-mkdatastorekey] Error 1

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritybookkeeper: avoid wasteful refresh races.by Rusty Russell · feed7b77 · Mar 23, 2026 · 2 filesMessage 68 · AdequateTriage 0Details
Commit message · Rusty Russell

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>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritybookkeeper: make bookkeeper-currency dynamic.by Rusty Russell · 8025ed68 · Mar 23, 2026 · 4 filesMessage 68 · AdequateTriage 0Details
Commit message · Rusty Russell

bookkeeper: make bookkeeper-currency dynamic.

This means doing more work if we set it; in particular, we need to
clean up any old values. We define the empty string as "unset", since
setconfig has no other way to "unset" variables.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritybkpr: add `bkpr-currency` option to record currency rates on each event.by Rusty Russell · d67888a4 · Mar 23, 2026 · 3 filesMessage 73 · AdequateTriage 0Details
Commit message · Rusty Russell

bkpr: add `bkpr-currency` option to record currency rates on each event.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Config: `bkpr-currency` option to record conversion rate at each event.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritybookkeeper: expose currencyrate_str and bkpr_of so report.c can access them.by Rusty Russell · c300e0ab · Mar 23, 2026 · 2 filesMessage 65 · AdequateTriage 0Details
Commit message · Rusty Russell

bookkeeper: expose currencyrate_str and bkpr_of so report.c can access them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritytests: avoid flaky test_bkpr_currency_dynamic on same-second channel_mvtby Sangbida Chaudhuri · fd56e621 · Mar 23, 2026 · 1 fileMessage 83 · StrongTriage 0Details
Commit message · Sangbida Chaudhuri

tests: avoid flaky test_bkpr_currency_dynamic on same-second channel_mvt

Bookkeeper FX coverage uses Unix-second intervals; when inv1 and inv2 land in the same second, listing can attach currencyrate to pre-setconfig events.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritypytest: clean up test_currencyrate.py using wait_for_logs()by Rusty Russell · 6bfb19d4 · Mar 23, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Rusty Russell

pytest: clean up test_currencyrate.py using wait_for_logs()

It's explicitly designed for "these will occur, don't know what order".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedpatch fix.patchby Rusty Russell · c564cfa7 · Mar 23, 2026 · 1 fileMessage 28 · OpaqueLow 26Details
Commit message · Rusty Russell

patch fix.patch

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Low 26/100

This patch fixes a timing bug in the bookkeeper plugin of Core Lightning. Previously, setting a currency option before the plugin was fully initialized could start background refresh tasks too early, potentially using uninitialized data. The fix delays starting those refresh tasks until after initialization is complete. It is a correctness fix rather than an obvious security vulnerability, but premature initialization can sometimes lead to crashes or unstable behavior.

AI review queuedcommon: add mkdatastorekey helper to make string arrays.by Rusty Russell · 852e54e1 · Mar 23, 2026 · 4 filesMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

common: add mkdatastorekey helper to make string arrays.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a routine code cleanup: it introduces a small helper function that builds lists of text strings more conveniently, and updates three existing functions to use it. There is no security-relevant change visible in the diff.

Lower-prioritybookkeeper: persist currency conversions in the datastore.by Rusty Russell · 49e99495 · Mar 23, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Rusty Russell

bookkeeper: persist currency conversions in the datastore.

For now we simply save every one. Later we will get more efficient when they are
duplicates (as often happens).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritycli: remove \ in simple format.by Rusty Russell · 5b518917 · Mar 23, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Rusty Russell

cli: remove \ in simple format.

This does mostly the right thing, but this removes e.g. \" -> ", and \\ to \.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritycurrencyrate: change `currencyrates` to `listcurrencyrates` which is more CLN-ish.by Rusty Russell · 8f5e2424 · Mar 23, 2026 · 6 filesMessage 73 · AdequateTriage 0Details
Commit message · Rusty Russell

currencyrate: change `currencyrates` to `listcurrencyrates` which is more CLN-ish.

And add a schema file.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listcurrencyrates` API for examining the current values from the `currencyconvert` plugin's sources.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityplugins: simplify datastore interfaces now callers have mkdatastorekey.by Rusty Russell · 715295f9 · Mar 23, 2026 · 12 filesMessage 65 · AdequateTriage 0Details
Commit message · Rusty Russell

plugins: simplify datastore interfaces now callers have mkdatastorekey.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI review queuedlibplugin: hand command, not plugin, to parsing functions.by Rusty Russell · 52299697 · Mar 23, 2026 · 9 filesMessage 73 · AdequateInformational 11Details
Commit message · Rusty Russell

libplugin: hand command, not plugin, to parsing functions.

In particular, for dynamic options we want to create an aux_command in
the case of bookkeeper-currency.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
parser or protocol pathsecond-pass: security-sensitive path
AI analysis · Informational 11/100

This is a straightforward internal code cleanup in Core Lightning's plugin library. It changes many plugin option-parsing functions so they receive a 'command' object instead of a 'plugin' object. The commit message says this is preparation for future 'dynamic options' work (specifically for a bookkeeper currency feature). There is no bug fix, security patch, or vulnerability visible in the diff itself.

Lower-prioritybookkeeper: use iso4217 check, scale and print correct minor units.by Rusty Russell · 5fde3493 · Mar 23, 2026 · 3 filesMessage 65 · AdequateTriage 0Details
Commit message · Rusty Russell

bookkeeper: use iso4217 check, scale and print correct minor units.

e.g. USD = 2, CLF = 4, XAU = 0.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritybkpr: warn if currency rate request is for old event.by Rusty Russell · ec1e4f52 · Mar 23, 2026 · 2 filesMessage 65 · AdequateTriage 0Details
Commit message · Rusty Russell

bkpr: warn if currency rate request is for old event.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritycurrencyrate: don't sleep for as long in background task.by Rusty Russell · e2770c81 · Mar 23, 2026 · 1 fileMessage 85 · StrongTriage 0Details
Commit message · Rusty Russell

currencyrate: don't sleep for as long in background task.

We process at least one stale entry per iteration (more if it has
changed by +/- 1%), so we should sleep for less if we have more
entries, in order to average hitting each source once per hour.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Lower-prioritypytest: test for currencyrate median code when values are cached.by Rusty Russell · 17824fab · Mar 23, 2026 · 1 fileMessage 75 · AdequateTriage 0Details
Commit message · Rusty Russell

pytest: test for currencyrate median code when values are cached.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Lower-prioritycurrencyrate: implement currencyrate command.by Rusty Russell · b05a249a · Mar 23, 2026 · 6 filesMessage 58 · ThinTriage 0Details
Commit message · Rusty Russell

currencyrate: implement currencyrate command.

For the simple case of offers conversion, converting a given amount of
fiat to BTC is the desired API. But for almost everything else, we
want to get the (median) per-BTC rate.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `currencyrate` API for getting the current median BTC conversion top a given fiat currency.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Lower-prioritydoc: add missing schema for currencyconvert API.by Rusty Russell · 42b33e3a · Mar 23, 2026 · 4 filesMessage 60 · AdequateTriage 0Details
Commit message · Rusty Russell

doc: add missing schema for currencyconvert API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritybookkeeper: keep up with new entries if we're doing currency conversion.by Rusty Russell · df02b246 · Mar 23, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Rusty Russell

bookkeeper: keep up with new entries if we're doing currency conversion.

If we're doing currency conversion, we can't refresh lazily on each
command: we need to watch for new events and refresh then. This is
fairly easy to do, however.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritycommon: add simple unit test for mkdatastorekey.by Rusty Russell · 4d14529c · Mar 23, 2026 · 2 filesMessage 70 · AdequateTriage 0Details
Commit message · Rusty Russell

common: add simple unit test for mkdatastorekey.

Thanks ChatGPT!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Lower-prioritycurrencyrate: make oracle store and serve the BTC price, not msat per fiat unit.by Rusty Russell · 952ffc2b · Mar 23, 2026 · 3 filesMessage 83 · StrongTriage 0Details
Commit message · Rusty Russell

currencyrate: make oracle store and serve the BTC price, not msat per fiat unit.

This is the first step in updating the API.

Subtly, the median of BTC prices is different from the median of msat-per-dollar,
given it's the invoice. This changes our test:

```
FAILED tests/test_currencyrate.py::test_cached_median - assert 133333 == 150000
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification