EP
← All projectsElements Project

Core Lightning

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

BitcoinLightning NetworkNormal
Repository coverage

1856 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 queue1853AI analyses
140commits · 30 days
225commits · 60 days
803commits · 180 days
1839commits · 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
432Strong · 80–100
1164Adequate · 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.
dovgopoly15015164
Rusty Russell95873958072
Sangbida Chaudhuri14731146066
Dusty Daemon771377066
ShahanaFarooqui931093063
daywalker9090589062
Níckolas Goline40540076
Lagrang376476069
Christian Decker36436072
Vincenzo Palazzo838080
Chandra Pratap56256082
ekzyis222063
Analysis record

Published AI watches

Last scanned 25 minutes 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-prioritybkpr: take, don't steal in new_channel_event.by Rusty Russell · 2a191479 · Aug 19, 2025 · 3 filesMessage 60 · AdequateInformational 18Details
Commit message · Rusty Russell

bkpr: take, don't steal in new_channel_event.

Cleaner (I'm about to hand it a sha256 on the stack).

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
AI analysis · Informational 18/100

This is a small cleanup change in the bookkeeping (bkpr) plugin. It changes how a payment identifier (a 32-byte hash value) is passed into a function: instead of 'stealing' ownership of the caller's copy, it now 'takes' a read-only pointer and makes its own duplicate if needed. The commit message says this is to make it easier to pass a temporary value created on the stack. This is defensive coding and reduces the risk of memory-management mistakes, but it does not by itself fix a known exploitable bug.

Lower-prioritybkpr: convert all the local db sql queries into calls to sql plugin.by Rusty Russell · b70f4f61 · Aug 19, 2025 · 8 filesMessage 85 · StrongInformational 14Details
Commit message · Rusty Russell

bkpr: convert all the local db sql queries into calls to sql plugin.

With some help (and hinderance!) from ChatGPT: the field names
differ slightly from our internal db.

The particilar wrinkle is that we have to restrict all queries to
limit them to entries we've seen already. Our code expects this (we
used to only enter it into the db when we processed it), and it would
otherwise be confusing if a sql query returned inconsistent results
because an event occurred while bookkeeper was processing.

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
AI analysis · Informational 14/100

This commit rewrites the bookkeeper (bkpr) plugin so that most of its internal SQLite queries are sent through a new SQL plugin instead of being executed directly. The change is described as a refactoring to use a shared SQL backend. There is no claim in the commit that this fixes a security bug, and the diff does not show an obvious vulnerability. However, because the new queries are built by concatenating strings with user-influenced values (account names, transaction IDs, payment hashes) there is a small risk of SQL injection if the helper functions do not escape those values correctly. The commit also removes a duplicate-check when logging chain events, which could in principle allow duplicate records, but that is a data-integrity issue rather than a direct security flaw.

Lower-prioritybookkeeper: don't set origin account to "null" if that's specified as transfer_from.by Rusty Russell · 980241fc · Aug 19, 2025 · 2 filesMessage 73 · AdequateInformational 21Details
Commit message · Rusty Russell

bookkeeper: don't set origin account to "null" if that's specified as transfer_from.

Before bkpr_listaccountevents() gave entries with origin like:

{'account': "nifty's secret stash",
'blockheight': 111,
'credit_msat': 180000000,
'currency': 'bcrt',
'debit_msat': 0,
'origin': 'null',
'outpoint': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:0',
'tag': 'deposit',
'timestamp': 1679955976,
'type': 'chain'},

Changelog-Changed: Plugins: "utxo_deposit" is allows to have missing `transfer_from`, and null is not considered an account name.
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 analysis · Informational 21/100

This is a small bug-fix in Core Lightning's bookkeeping plugin. Previously, if a user sent a deposit notification without specifying where the funds came from, the plugin would incorrectly record the origin account as the literal string "null". The fix makes the transfer_from field optional and treats a JSON null value as 'no origin account' rather than an account named "null". This is a data-correctness issue, not a direct way for an attacker to steal funds or take over a node.

Lower-prioritypytest: wait to make sure moves are registered in coinmoves tests.by Rusty Russell · 94c1cf58 · Aug 19, 2025 · 1 fileMessage 75 · AdequateInformational 15Details
Commit message · Rusty Russell

pytest: wait to make sure moves are registered in coinmoves tests.

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
AI analysis · Informational 15/100

This commit only changes a test file to add short waits before checking coin-move records. It is a test reliability fix, not a security patch, and does not change any production code that handles funds, networking, or cryptography.

Lower-prioritylibplugin: allow sync interface to be used at all times.by Rusty Russell · bb6787df · Aug 19, 2025 · 4 filesMessage 73 · AdequateLow 26Details
Commit message · Rusty Russell

libplugin: allow sync interface to be used at all times.

After much thought and mis-steps, I chose a simple solution: open another fd
for sync comms. It's almost impossible to know what state the async one is in.

jsonrpc_request_sync() is enhanced to return a valid tal object, as the current
behaviour of returning a pointer to inside an array was surprising.

Changelog-Changed: libplugin: you can now call the synchronous API functions at any time (not just in the init callback).
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 analysis · Low 26/100

This change lets Core Lightning plugins make synchronous (blocking) JSON-RPC calls at any time, not just during startup. To do that safely, it opens a second Unix socket connection to the lightningd RPC so the sync call does not collide with ongoing async traffic. The patch also fixes a memory-handling quirk so the returned response is a proper allocated object. There is no direct evidence this fixes an active security bug, but it removes a risky restriction and improves robustness.

Security candidatepytest: test coinmoves in the case of unexpected fulfill.by Rusty Russell · 397fdd9e · Aug 19, 2025 · 1 fileMessage 88 · StrongInformational 15Details
Commit message · Rusty Russell

pytest: test coinmoves in the case of unexpected fulfill.

This happens if l1 doesn't get a signature, so it doesn't consider
the fulfill complete, but l2 does (and thus credits l1).

This is a trivial test, but will matter should we later correctly
account for channelmoves when onchain: in that case it will actually
hard to tell, in general, what HTLC(s) were fulfilled.

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

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Informational 15/100

This commit only adds a new test case to the project's test suite. It simulates a scenario where one side of a Lightning payment channel believes an HTLC was fulfilled while the other side does not, then verifies that the internal accounting records (called 'coinmoves') are produced correctly. There is no change to production code, no fix, and no vulnerability being patched.

AI review queuedwallet: chain_moves and channel_moves tables.by Rusty Russell · 37cde406 · Aug 19, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Rusty Russell

wallet: chain_moves and channel_moves tables.

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
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit adds three new database tables to Core Lightning's wallet module: one for account names and two for recording on-chain and off-chain fund movements. It is a straightforward schema migration with no logic changes, no bug fixes, and no security-sensitive operations visible in the diff.

AI review queuedwallet: add accessors to read chain_moves & channel_moves tables.by Rusty Russell · f7e9af23 · Aug 19, 2025 · 3 filesMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

wallet: add accessors to read chain_moves & channel_moves tables.

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 adds read-only helper functions to pull coin-movement records out of the wallet database. It does not change how funds are handled, does not fix any bug, and does not introduce any obvious security issue. It is a straightforward data-access addition.

AI review queuedwallet: remove notification on duplicate chain entries.by Rusty Russell · 2372dbda · Aug 19, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

wallet: remove notification on duplicate chain entries.

We don't need it now bookkeeper uses the list commands.

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 removes a notification that was previously sent when the wallet tried to record a blockchain movement that it had already seen. The change is described as cleanup because another component (bookkeeper) now uses list commands instead of relying on this duplicate notification. There is no direct evidence in the commit that this fixes an active security vulnerability.

AI review queuedlightningd: speed mapping from coinmoves table to channel for listcoinmoves.by Rusty Russell · 233628ad · Aug 19, 2025 · 6 filesMessage 73 · AdequateInformational 15Details
Commit message · Rusty Russell

lightningd: speed mapping from coinmoves table to channel for listcoinmoves.

Iterating through every peer and channel every time can be very slow
for large nodes, when calling wallet_coinmoves_extract for listcoinmoves.

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
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a performance optimization, not a security fix. It replaces a slow loop that searched through every peer and channel to find a channel by its database ID with a fast hash table lookup. The change makes the listcoinmoves command respond faster on large nodes but does not address any vulnerability.

AI review queuedwallet: generate fixup chainmoves and channelmoves when first starting.by Rusty Russell · 194febe8 · Aug 19, 2025 · 10 filesMessage 73 · AdequateInformational 22Details
Commit message · Rusty Russell

wallet: generate fixup chainmoves and channelmoves when first starting.

If we don't have an accountdb from bookkeeper:

1. Generate a deposit chain event for every confirmed UTXO.
2. Generate an open chain event for every open, confirmed channel.
3. Generate a push/lease event if necessary.
4. Generate a fixup "journal" entry if balance is different from initial.

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
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 22/100

This commit finishes a previously-stubbed database migration that invents historical accounting records ('coin movements') for nodes that never ran the optional bookkeeper plugin. It does not change how funds are secured on the blockchain; it only backfills internal ledger entries so balances displayed by the accounting plugin look correct after an upgrade. There is no obvious way for an external attacker to exploit it, but any migration that writes made-up ledger entries carries a risk of miscounting funds or confusing downstream tools if the invented numbers are wrong.

AI review queuedwallet: update chain_moves and channel_moves tables from channel_id -> nonchannel in db when we close it.by Rusty Russell · 7e3777b4 · Aug 19, 2025 · 4 filesMessage 65 · AdequateInformational 20Details
Commit message · Rusty Russell

wallet: update chain_moves and channel_moves tables from channel_id -> nonchannel in db when we close it.

This avoids us keeping references into closed channels.

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 20/100

This change updates Core Lightning's internal accounting records when a payment channel closes. Previously, records in the `chain_moves` and `channel_moves` database tables kept pointing to the closed channel's internal database ID. After this patch, they are rewritten to reference a stable text identifier (the channel ID) instead. The commit message says this avoids dangling references to closed channels and makes future cleanup easier. There is no direct evidence in the commit of an exploitable security vulnerability; it looks like a data-integrity and maintainability fix.

AI review queuedlightningd: migrate events from bookkeeper at startup.by Rusty Russell · 52d69df1 · Aug 19, 2025 · 25 filesMessage 73 · AdequateInformational 24Details
Commit message · Rusty Russell

lightningd: migrate events from bookkeeper at startup.

We take over the --bookkeeper-dir and --bookkeeper-db options, and
then if we can find the bookkeeper db we extract the records to
initialize our chain_moves and channel_moves tables.

Of course, bookkeeper now needs to not register those options.

When bookkeeper gets invoked the first time, it will reconstruct
everything from listchannelmoves and listcoinmoves. It cannot
preserve manually-added descriptions, so we put those in the datastore
for it ready to go.

Note that the order of onchain_fee changes slightly from the original.
But this is fine.

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
signing or wallet pathsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Informational 24/100

This commit moves the bookkeeper accounting data from a separate plugin database into the main lightningd database at startup. It adds a one-time migration that reads the old accounts.sqlite3 file and copies its records into new internal tables. The change is mostly a refactor of where data lives, but it touches startup code, database migrations, and option handling. There is no direct evidence in the commit that this fixes an active security vulnerability; it appears to be architectural cleanup.

AI review queuedwallet: record all coin movements into chain_moves or channel_moves tables.by Rusty Russell · f3f26cb5 · Aug 19, 2025 · 8 filesMessage 73 · AdequateInformational 17Details
Commit message · Rusty Russell

wallet: record all coin movements into chain_moves or channel_moves tables.

We change notify_chain_mvt to wallet_save_chain_mvt, and
notify_channel_mvt to wallet_save_channel_mvt, which save to the db
and call the notifier themselves.

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
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 17/100

This change makes Core Lightning save every on-chain and channel coin movement to its internal database before sending out a notification. Previously, some coin movements were only notified and not persisted. It is an accounting/audit-logging improvement rather than a fix for an exploitable security flaw.

AI review queueddb: support mode where we don't want to create the db.by Rusty Russell · 1958efda · Aug 19, 2025 · 8 filesMessage 85 · StrongInformational 20Details
Commit message · Rusty Russell

db: support mode where we don't want to create the db.

And gracefully fail for this case.

There's no such thing for Postgres, but that's because dbs need to be
set up by the admin.

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
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 20/100

This commit adds a new 'create' flag to Core Lightning's database-opening code. When create is false, the code tries to open an existing database but refuses to create a new one if it is missing, returning an error instead of crashing. This is a defensive change that makes the wallet startup behavior safer in some situations, but it does not by itself fix a known exploitable bug.

AI review queuedlightningd: add chainmoves and channelmoves to wait command.by Rusty Russell · 6c626b12 · Aug 19, 2025 · 20 filesMessage 73 · AdequateInformational 18Details
Commit message · Rusty Russell

lightningd: add chainmoves and channelmoves to wait command.

Only makes sense to wait on creation, since they neither are deleted
nor updated.

We also enhance the list commands to take the standard index options.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `wait`: new subsystems `chainmoves` and `channelmoves`.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Informational 18/100

This commit adds two new notification categories, 'chainmoves' and 'channelmoves', to the existing 'wait' command in Core Lightning. It also lets users paginate the related list commands with standard index options. There is no indication this fixes a security bug; it appears to be a normal feature addition.

AI review queuedcommon: fix values of enum mvt_tag since they're now embedded in the db.by Rusty Russell · 74abe33f · Aug 19, 2025 · 5 filesMessage 65 · AdequateInformational 17Details
Commit message · Rusty Russell

common: fix values of enum mvt_tag since they're now embedded in the db.

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 17/100

This commit hardens how Core Lightning records coin-movement tags in its database. It locks the numeric values of an internal enum so future code changes cannot silently reorder them, adds a translation helper to ensure the stored database values stay stable, and validates tag sets before writing them. There is no direct exploit here; it is a defensive fix to prevent data corruption or accounting mismatches if the enum were ever changed.

AI review queuedwallet: routines to append to chain_moves and channel_moves tables.by Rusty Russell · 6eb079ce · Aug 19, 2025 · 5 filesMessage 73 · AdequateInformational 12Details
Commit message · Rusty Russell

wallet: routines to append to chain_moves and channel_moves tables.

Note that bookkeeper de-duplicates chain_moves: we need to too! So we add
an index to make this efficient.

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
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 12/100

This commit adds new bookkeeping routines that record money movements into two database tables, one for on-chain transactions and one for channel (off-chain) transactions. It also adds a database index to speed up duplicate-checking for on-chain records. There is no indication this fixes a security bug; it appears to be a normal feature addition for accounting/audit logging.

Lower-priorityopeningd: test that channel open seems possible before bothering peer.by Rusty Russell · 9b68ba09 · Aug 18, 2025 · 3 filesMessage 91 · StrongLow 25Details
Commit message · Rusty Russell

openingd: test that channel open seems possible before bothering peer.

Fixes: https://github.com/ElementsProject/lightning/issues/4873

In particular, we used to get upset when a peer accepts our channel,
if it was too small! We should do reasonable checks first.

We no longer try to send requests to delay for 2017 blocks though,
so remove that test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Protocol: trying to create a channel below our own min-capacity-sat will now fail before asking the peer, not with an error blaming the peer when they accept!

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Low 25/100

This change fixes a user-experience and protocol-courtesy bug in Core Lightning's channel-opening code. Previously, if you tried to open a channel smaller than your own configured minimum, the node would still ask the peer to open it and then blame the peer when the peer accepted. Now the node checks its own settings first and fails locally with a clear message before bothering the peer. It is not a funds-loss or remote-code-execution vulnerability.

Lower-prioritypytest: test that opening a channel below our own minimum fails *gracefully*.by Rusty Russell · 2ef776bd · Aug 18, 2025 · 1 fileMessage 75 · AdequateLow 27Details
Commit message · Rusty Russell

pytest: test that opening a channel below our own minimum fails *gracefully*.

At the moment it fails after the *peer* responds.

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
AI analysis · Low 27/100

This commit adds a test that reveals a bug in how Core Lightning handles channel openings that are below a user's own configured minimum. Currently the node lets the user try to open the channel and only fails after the remote peer gets involved, which is impolite and could leak information or cause unnecessary peer disconnects. The test is marked as expected to fail (xfail), meaning the bug exists but is not yet fixed by this commit.

Lower-prioritydoc: build documentation for fetchbip353 command.by Rusty Russell · aea73589 · Aug 18, 2025 · 2 filesMessage 60 · AdequateInformational 15Details
Commit message · Rusty Russell

doc: build documentation for fetchbip353 command.

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
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a new command name to the documentation build lists. It does not change any executable code, security settings, or user permissions. There is no security relevance.

Lower-priorityxpay: add option to pay bip353.by Rusty Russell · 6799dbe6 · Aug 18, 2025 · 5 filesMessage 68 · AdequateInformational 15Details
Commit message · Rusty Russell

xpay: add option to pay bip353.

Changelog-Added: JSON-RPC: `xpay` can now directly pay a BIP353 address, like `₿rusty@rustcorp.com.au`.
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
AI analysis · Informational 15/100

This commit adds a new feature to Core Lightning's xpay plugin: the ability to pay a human-readable BIP353 address (like a Bitcoin Lightning email address). It is a straightforward feature addition with no visible security bug or vulnerability in the code changes.

Lower-priorityxpay: support paying a (simple) bolt12 offer directly.by Rusty Russell · 103a49ef · Aug 18, 2025 · 6 filesMessage 73 · AdequateInformational 15Details
Commit message · Rusty Russell

xpay: support paying a (simple) bolt12 offer directly.

fetchinvoice is still good for detailed diagnostics and handling
recurring invoices and alternate currencies, but this covers the
"throw some sats" case well.

Changelog-Added: JSON-RPC: `xpay` can now pay a simple offer directly, rather than requiring fetchinvoice first.
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 analysis · Informational 15/100

This commit adds a convenience feature to the Core Lightning `xpay` plugin so users can pay a simple BOLT12 offer directly, without first running `fetchinvoice` manually. The plugin now detects an offer string, validates it, calls `fetchinvoice` internally, and then proceeds with normal payment. There is no security-relevant change visible in the diff.

Lower-prioritydoc: Add macOS uv instructions to installations.mdby Sangbida Chaudhuri · 0738ea6b · Aug 18, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Sangbida Chaudhuri

doc: Add macOS uv instructions to installations.md

Changelog-None

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates the macOS installation instructions in the project's documentation. It replaces the old Python setup using pyenv and poetry with a newer tool called 'uv' for managing Python dependencies. There are no code changes and no security implications.

Lower-prioritypytest: test for fetchinvoice when a onion-message-capable peer is disconnected.by Rusty Russell · b76d9b3d · Aug 18, 2025 · 1 fileMessage 83 · StrongLow 26Details
Commit message · Rusty Russell

pytest: test for fetchinvoice when a onion-message-capable peer is disconnected.

```
FAILED tests/test_pay.py::test_fetchinvoice_autoconnect_if_disconnected - pyln.client.lightning.RpcError: RPC call failed: method: fetchinvoice, payload: {'offer': 'lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqypq5tn5v4ehghmxv46xx6rfdemx76trv40kzat5da3k7mnwv43hghmfve0kg6tnvdhkumn9vd6x2ep3zcssxhftzxfdlwsnfcgw2sy8t5mxa0ytcdfat2nkdwqvpy9nnsa9mzza'}, error: {'code': -1, 'message': 'onion msg: unknown next peer 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59'}
```

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
AI analysis · Low 26/100

This commit adds a new automated test to Core Lightning. The test checks that when a user tries to fetch a BOLT12 invoice through a peer that is currently disconnected, the software should not attempt to use that disconnected peer. The commit message shows the test previously failed with an 'unknown next peer' error, suggesting a bug where disconnected onion-message-capable peers were incorrectly selected as routing hops. This is a test-only change; no production code is patched here.