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
227commits · 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 49 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-prioritybookkeeper: honor start and ent times when consolidating onchain fees.by Rusty Russell · c758672a · Oct 21, 2025 · 4 filesMessage 81 · StrongInformational 19Details
Commit message · Rusty Russell

bookkeeper: honor start and ent times when consolidating onchain fees.

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

Reported-by: Shahaha
Changelog-Fixed: Plugins: `bkpr_listincome` now honors `start_time` and `end_time` parameters for onchain fees.

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 19/100

This is a bug fix in the bookkeeper plugin, which is used for accounting and reporting. Previously, when summarizing on-chain transaction fees, the plugin ignored user-supplied start and end times and included all fees instead. The fix makes the fee summary respect those time boundaries. It is a correctness issue for financial reporting, not a security vulnerability that allows theft, unauthorized access, or denial of service.

Lower-prioritybookkeeper: save last timestamp to avoid another query in find_consolidated_fees.by Rusty Russell · 2539b4f1 · Oct 21, 2025 · 4 filesMessage 85 · StrongInformational 16Details
Commit message · Rusty Russell

bookkeeper: save last timestamp to avoid another query in find_consolidated_fees.

If the fees are not *all* of the fees (as we do in next patch), the
query would be wrong. Plus, as the FIXME suggests, we should just save
it as we're getting the fee_sums, not do a whole new query!

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

This is a small internal cleanup in the bookkeeper plugin, which tracks on-chain Bitcoin fees for accounting. It removes a redundant database-style lookup by remembering the latest timestamp while fees are being added up. The commit message says this change is needed so a follow-up patch can correctly report fees that are not the complete set. There is no direct evidence this fixes an exploitable security bug.

Lower-prioritypytest: test (failing) for bkpr-listincome filtering times on onchain events.by Rusty Russell · 2c02f6d1 · Oct 21, 2025 · 1 fileMessage 75 · AdequateInformational 11Details
Commit message · Rusty Russell

pytest: test (failing) for bkpr-listincome filtering times on onchain events.

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

This commit only adds a new test case to the project's test suite. The test is marked as expected to fail (xfail) and checks whether a bookkeeping command correctly filters on-chain income events by timestamp. There is no change to production code, no fix, and no disclosed security issue.

Lower-prioritygpg: Updating Shahana's expired keysby ShahanaFarooqui · 9255c255 · Oct 21, 2025 · 3 filesMessage 65 · AdequateInformational 15Details
Commit message · ShahanaFarooqui

gpg: Updating Shahana's expired keys

Also added Madeline's missing keys on security-policy page.

Changelog-None.

65/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Names security-relevant behavior explicitly
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit updates a team member's expired PGP key and adds another team member's key to the security policy page. It is purely an administrative/key-management documentation change and does not modify any software code, cryptographic algorithms, or runtime behavior.

Lower-priorityMeta: Adding changelog and version update for 25.09.1by Madeline Vibes · 766db613 · Oct 21, 2025 · 10 filesMessage 50 · ThinInformational 15Details
Commit message · Madeline Vibes

Meta: Adding changelog and version update for 25.09.1

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit is purely administrative: it bumps version numbers from 25.09 to 25.09.1 and adds a changelog describing fixes already made in other commits. The actual code changes are only version strings and documentation. There is no new executable logic, no security patch, and no vulnerability introduced here.

Lower-prioritydoc: Add step for point release checklist to merge updates from `update-versions` and `CHANGELOG.md` into `master`by ShahanaFarooqui · aa86e137 · Oct 21, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · ShahanaFarooqui

doc: Add step for point release checklist to merge updates from `update-versions` and `CHANGELOG.md` into `master`

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 simply adds one extra step to the project's internal release checklist document. It reminds maintainers to merge version and changelog updates back into the main development branch after a point release. There is no code change, no configuration change, and no security relevance.

Lower-priorityplugin: fix feature_set allocationby Peter Neuroth · 652b3c2b · Oct 20, 2025 · 1 fileMessage 58 · ThinLow 43Details
Commit message · Peter Neuroth

plugin: fix feature_set allocation

Using `tal_dup_or_null` does not set the tal context to the included
bytes array. Luckily we already have a function tha deeply duplicates
a `feature_set`: `feature_set_dup`

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Low 43/100

This commit fixes a memory-management bug in Core Lightning's plugin handling. The old code used a shallow copy (`tal_dup_or_null`) to duplicate a plugin's feature set, which did not properly copy the underlying byte arrays. The fix switches to `feature_set_dup`, which performs a deep copy. The bug could lead to use-after-free or memory corruption if the original feature set's data was freed while the plugin still held a reference. There is no direct evidence in the commit or supplied references of an exploitable security vulnerability, remote trigger, or disclosed incident.

Lower-prioritytest: refactor plugin to use parameter not envvarby Peter Neuroth · 51e6387c · Oct 20, 2025 · 2 filesMessage 82 · StrongInformational 15Details
Commit message · Peter Neuroth

test: refactor plugin to use parameter not envvar

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>

82/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit is a test-only cleanup. It changes a single test plugin and its corresponding test to pass a setting as a normal plugin option instead of reading it from an environment variable. There is no change to production code, no security fix, and no vulnerability.

Lower-prioritytest: check that features get removed when ...by Peter Neuroth · 5932d3b7 · Oct 20, 2025 · 2 filesMessage 82 · StrongInformational 12Details
Commit message · Peter Neuroth

test: check that features get removed when ...

a plugin is disabled during init.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>

82/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 12/100

This commit only adds a new test case to verify an existing behavior: when a Core Lightning plugin disables itself during startup, any feature bits it advertised should be removed from the node's public feature announcements. It does not change production code, so it cannot by itself introduce a security vulnerability or fix one.

Security candidatetools: Read the correct default-key from gpgconfby ShahanaFarooqui · ea2f7607 · Oct 20, 2025 · 1 fileMessage 80 · StrongInformational 18Details
Commit message · ShahanaFarooqui

tools: Read the correct default-key from gpgconf

Workflow error `gpg: using "4129A994AA7E9852" is thrown due to incorrect gpg parsing. Update the awk parsing logic to properly locate and extract the key fingerprint within the gpgconf --list-options output structure, ensuring automated signing uses the correct key.

Changelog-None.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundary
AI analysis · Informational 18/100

This is a one-line fix in the release build script. It changes how the script tells GnuPG which key to use when signing release checksum files. Previously the key fingerprint was accidentally passed as a filename argument to gpg, which caused a harmless workflow error and could have led to the wrong key being used for signing. The fix moves the fingerprint to the proper --default-key option so signing uses the intended key.

Lower-prioritymakefile: enable fuzzing support on macOSby Sangbida Chaudhuri · 8578d6cd · Oct 20, 2025 · 3 filesMessage 90 · StrongInformational 15Details
Commit message · Sangbida Chaudhuri

makefile: enable fuzzing support on macOS

Enable fuzzing support on macOS by configuring the build system to use Homebrew LLVM toolchain and handle macOS-specific linking requirements.

The `make check-fuzz` command was failing on macOS because:
- System clang lacks fuzzer runtime library support
- Linking issues with fuzzer targets
- Test script attempts to execute debug symbol files

This PR adds macOS-specific configuration to:
- Use Homebrew LLVM toolchain for fuzzer support
- Explicitly link fuzzer libraries
- Exclude `.dSYM` directories from test discovery

All 76 fuzzer targets now build and pass on macOS.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit is a build-system fix that lets developers run fuzz tests on macOS. It changes compiler/linker paths, adds Homebrew LLVM detection, and skips macOS debug-symbol folders when looking for test programs. There is no change to how the lightning node handles money, network messages, or cryptography, and nothing here looks like a security vulnerability or backdoor.

AI review queuedbookkeeper: only read listchannelmoves 1000 entries at a time.by Rusty Russell · e522aedc · Oct 20, 2025 · 1 fileMessage 73 · AdequateModerate 53Details
Commit message · Rusty Russell

bookkeeper: only read listchannelmoves 1000 entries at a time.

If we read all of them, we might get 1.6M at once (after initial
migration). Then we submit a few hundred thousand simultaneous
requests to lightningd, and it gets upset, queueing them all on the
xpay command hook and running out of memory.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: plugins: bookkeeper first invocation after migration from prior to 25.09 with very large databases will not crash.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 53/100

This update fixes a bug in the bookkeeper plugin of Core Lightning. After a large database migration, the plugin could ask for too many records at once, flood the main lightningd process with hundreds of thousands of requests, and cause it to run out of memory and crash. The fix reads records in batches of 1,000 instead of all at once.

Lower-prioritylibplugin: remove redundant destructor which causes exponential slowdown on large numbers of requests.by Rusty Russell · b7c2629d · Oct 20, 2025 · 1 fileMessage 73 · AdequateLow 25Details
Commit message · Rusty Russell

libplugin: remove redundant destructor which causes exponential slowdown on large numbers of requests.

Note that we create a destructor on the command to reset request->cmd
pointer if the cmd is freed (so we know not to call the callback).
But attaching hundreds of thousands of them is slow: it's a
single-linked list, which is iterated in several places.

But that's redundant: the request is now allocated off the cmd, so freeing the command
will free the request anyway.

Hacking in something to print progress to a file, here's the number of
requests processed every 10 seconds before and after:

Before:
$ while sleep 10; do wc -l /tmp/bkpr-progress; done
181529 /tmp/bkpr-progress
195994 /tmp/bkpr-progress
207083 /tmp/bkpr-progress
226336 /tmp/bkpr-progress
234319 /tmp/bkpr-progress
241514 /tmp/bkpr-progress
247421 /tmp/bkpr-progress
255292 /tmp/bkpr-progress
261367 /tmp/bkpr-progress
269085 /tmp/bkpr-progress
276953 /tmp/bkpr-progress
282233 /tmp/bkpr-progress
286193 /tmp/bkpr-progress
290930 /tmp/bkpr-progress
295276 /tmp/bkpr-progress
301086 /tmp/bkpr-progress

After:
169505 /tmp/bkpr-progress
196010 /tmp/bkpr-progress
219370 /tmp/bkpr-progress
235671 /tmp/bkpr-progress
244242 /tmp/bkpr-progress
255362 /tmp/bkpr-progress
265636 /tmp/bkpr-progress
276966 /tmp/bkpr-progress
284451 /tmp/bkpr-progress
288836 /tmp/bkpr-progress
296578 /tmp/bkpr-progress
304571 /tmp/bkpr-progress

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

This commit fixes a performance bug, not a security vulnerability. It removes an unnecessary cleanup step that was attached to every outgoing plugin request. On large numbers of requests, that extra step created a very long internal list and slowed everything down dramatically. The fix simply relies on normal memory cleanup instead.

Lower-priorityplugins/sql: add payment_hash index to channelmoves table.by Rusty Russell · 0c9a35e2 · Oct 20, 2025 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Rusty Russell

plugins/sql: add payment_hash index to channelmoves table.

This significantly speeds up the query which bookkeeper often does:

"SELECT created_index"
" FROM channelmoves"
" WHERE payment_hash = X'%s'"
" AND credit_msat = %"PRIu64
" AND created_index <= %"PRIu64,

On large databases this scan is expensive, and a payment_hash index
cuts it down a great deal. It does take longer to load the channelmoves
in the first place though (about 3x).

Before:
$ while sleep 10; do wc -l /tmp/bkpr-progress; done
169505 /tmp/bkpr-progress
196010 /tmp/bkpr-progress
219370 /tmp/bkpr-progress
235671 /tmp/bkpr-progress
244242 /tmp/bkpr-progress
255362 /tmp/bkpr-progress
265636 /tmp/bkpr-progress
276966 /tmp/bkpr-progress
284451 /tmp/bkpr-progress
288836 /tmp/bkpr-progress
296578 /tmp/bkpr-progress
304571 /tmp/bkpr-progress

After:
$ while sleep 10; do wc -l /tmp/bkpr-progress; done
161421 /tmp/bkpr-progress
238273 /tmp/bkpr-progress
281185 /tmp/bkpr-progress
305787 /tmp/bkpr-progress

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: plugins: the sql plugin now keeps an index on `channelmoves` by `payment_hash`.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a routine performance improvement for the Core Lightning SQL plugin. It adds a database index on the payment_hash column of the channelmoves table so that bookkeeping queries run faster on large databases. There is no security fix or vulnerability here.

Lower-prioritymakefile: use SED from configure in most places.by Sangbida Chaudhuri · 7b1c4874 · Oct 17, 2025 · 7 filesMessage 60 · AdequateInformational 15Details
Commit message · Sangbida Chaudhuri

makefile: use SED from configure in most places.

Some simple cases are left alone, but anything called from make uses $SED.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit is a build-system portability fix. It replaces hardcoded uses of the `sed` command with a configurable `SED` variable (usually set by the configure script). This helps the project build correctly on systems like macOS where the standard `sed` behaves differently and a GNU-compatible `gsed` is needed. There is no security-relevant change here.

Lower-priorityconfigure: set SED to gsed (MacOS et al) or sed (GNU).by Rusty Russell · 23784a4e · Oct 17, 2025 · 1 fileMessage 73 · AdequateInformational 20Details
Commit message · Rusty Russell

configure: set SED to gsed (MacOS et al) or sed (GNU).

We use some GNU sed features and it's easier to require gsed than fix
them all (and keep noticing when they break). MacOS comes with gsed
already!

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

This commit changes the project's build configuration script so it picks the correct version of the 'sed' text-editing tool. On macOS it will prefer 'gsed' (the GNU version), and on Linux it will use the standard 'sed'. This is a build-system portability fix, not a security patch. It does not fix a vulnerability or change any runtime code that handles money, network messages, or cryptography.

Security candidatepytest: fix flakes in feerates.by Rusty Russell · 992771bb · Oct 13, 2025 · 1 fileMessage 83 · StrongInformational 13Details
Commit message · Rusty Russell

pytest: fix flakes in feerates.

Sometimes we get a shorter signature than expected, and we're supposed
to disable the feerate tests in that case. But we didn't catch all the
cases where we make signatures.

```
2025-10-13T02:36:24.1901527Z ____________________________ test_peer_anchor_push _____________________________
2025-10-13T02:36:24.1902251Z [gw5] linux -- Python 3.10.18 /home/runner/work/lightning/lightning/.venv/bin/python
2025-10-13T02:36:24.1902731Z
2025-10-13T02:36:24.1903045Z node_factory = <pyln.testing.utils.NodeFactory object at 0x7f17fdffd6f0>
2025-10-13T02:36:24.1903740Z bitcoind = <pyln.testing.utils.BitcoinD object at 0x7f17fdffe830>
2025-10-13T02:36:24.1904495Z executor = <concurrent.futures.thread.ThreadPoolExecutor object at 0x7f17fdffcbb0>
2025-10-13T02:36:24.1906158Z chainparams = {'bip173_prefix': 'bcrt', 'chain_hash': '06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f', 'elements': False, 'example_addr': 'bcrt1qeyyk6sl5pr49ycpqyckvmttus5ttj25pd0zpvg', ...}
2025-10-13T02:36:24.1907285Z
2025-10-13T02:36:24.1907600Z @unittest.skipIf(TEST_NETWORK != 'regtest', 'elementsd anchors not supportd')
2025-10-13T02:36:24.1908344Z def test_peer_anchor_push(node_factory, bitcoind, executor, chainparams):
2025-10-13T02:36:24.1909033Z """Test that we use anchor on peer's commit to CPFP tx"""
2025-10-13T02:36:24.1909853Z l1, l2, l3 = node_factory.line_graph(3, opts=[{},
2025-10-13T02:36:24.1910334Z {'min-emergency-msat': 546000,
2025-10-13T02:36:24.1910825Z 'dev-warn-on-overgrind': None,
2025-10-13T02:36:24.1911313Z 'broken_log': 'overgrind: short signature length'},
2025-10-13T02:36:24.1911662Z {'disconnect': ['-WIRE_UPDATE_FULFILL_HTLC'],
2025-10-13T02:36:24.1911976Z 'dev-warn-on-overgrind': None,
2025-10-13T02:36:24.1912304Z 'broken_log': 'overgrind: short signature length'}],
2025-10-13T02:36:24.1912790Z wait_for_announce=True)
2025-10-13T02:36:24.1913041Z
2025-10-13T02:36:24.1913305Z # We splinter l2's funds so it's forced to use more than one UTXO to push.
2025-10-13T02:36:24.1914043Z fundsats = int(Millisatoshi(only_one(l2.rpc.listfunds()['outputs'])['amount_msat']).to_satoshi())
2025-10-13T02:36:24.1914443Z OUTPUT_SAT = 10000
2025-10-13T02:36:24.1914647Z NUM_OUTPUTS = 10
2025-10-13T02:36:24.1914903Z psbt = l2.rpc.fundpsbt("all", "1000perkw", 1000)['psbt']
2025-10-13T02:36:24.1915520Z # Pay 5k sats in fees.
2025-10-13T02:36:24.1916329Z psbt = l2.rpc.addpsbtoutput(fundsats - OUTPUT_SAT * NUM_OUTPUTS - 5000, psbt, destination=l3.rpc.newaddr()['bech32'])['psbt']
2025-10-13T02:36:24.1917156Z for _ in range(NUM_OUTPUTS):
2025-10-13T02:36:24.1917638Z psbt = l2.rpc.addpsbtoutput(OUTPUT_SAT, psbt)['psbt']
2025-10-13T02:36:24.1918194Z l2.rpc.sendpsbt(l2.rpc.signpsbt(psbt)['signed_psbt'])
2025-10-13T02:36:24.1918731Z bitcoind.generate_block(1, wait_for_mempool=1)
2025-10-13T02:36:24.1919232Z sync_blockheight(bitcoind, [l1, l2])
2025-10-13T02:36:24.1919634Z
2025-10-13T02:36:24.1919847Z # Make sure all amounts are below OUTPUT_SAT sats!
2025-10-13T02:36:24.1920318Z assert [x for x in l2.rpc.listfunds()['outputs'] if x['amount_msat'] > Millisatoshi(str(OUTPUT_SAT) + "sat")] == []
2025-10-13T02:36:24.1920735Z
2025-10-13T02:36:24.1920957Z # Get HTLC stuck, so l2 has reason to push commitment tx.
2025-10-13T02:36:24.1921244Z amt = 100_000_000
2025-10-13T02:36:24.1921517Z sticky_inv = l3.rpc.invoice(amt, 'sticky', 'sticky')
2025-10-13T02:36:24.1921842Z route = l1.rpc.getroute(l3.info['id'], amt, 1)['route']
2025-10-13T02:36:24.1922277Z l1.rpc.sendpay(route, sticky_inv['payment_hash'], payment_secret=sticky_inv['payment_secret'])
2025-10-13T02:36:24.1922751Z l3.daemon.wait_for_log('dev_disconnect: -WIRE_UPDATE_FULFILL_HTLC')
2025-10-13T02:36:24.1923060Z
2025-10-13T02:36:24.1923241Z # Make sure HTLC expiry is what we expect!
2025-10-13T02:36:24.1923637Z l2.daemon.wait_for_log('Adding HTLC 0 amount=100000000msat cltv=119 gave CHANNEL_ERR_ADD_OK')
2025-10-13T02:36:24.1923998Z
2025-10-13T02:36:24.1924229Z # l3 drops to chain, but make sure it doesn't CPFP its own anchor.
2025-10-13T02:36:24.1924685Z wait_for(lambda: only_one(l3.rpc.listpeerchannels(l2.info['id'])['channels'])['htlcs'] != [])
2025-10-13T02:36:24.1925688Z closetx = l3.rpc.dev_sign_last_tx(l2.info['id'])['tx']
2025-10-13T02:36:24.1926132Z l3.stop()
2025-10-13T02:36:24.1926337Z # We don't care about l1 any more, either
2025-10-13T02:36:24.1926579Z l1.stop()
2025-10-13T02:36:24.1926739Z
2025-10-13T02:36:24.1926941Z # We put l3's tx in the mempool, but won't mine it.
2025-10-13T02:36:24.1927316Z bitcoind.rpc.sendrawtransaction(closetx)
2025-10-13T02:36:24.1927754Z
2025-10-13T02:36:24.1928139Z # We aim for feerate ~3750, so this won't mine l3's unilateral close.
2025-10-13T02:36:24.1928991Z # HTLC's going to time out at block 120 (we give one block grace)
2025-10-13T02:36:24.1929527Z for block in range(110, 120):
2025-10-13T02:36:24.1929989Z bitcoind.generate_block(1, needfeerate=5000)
2025-10-13T02:36:24.1930510Z assert bitcoind.rpc.getblockcount() == block
2025-10-13T02:36:24.1931014Z sync_blockheight(bitcoind, [l2])
2025-10-13T02:36:24.1931715Z assert only_one(l2.rpc.listpeerchannels(l3.info['id'])['channels'])['state'] == 'CHANNELD_NORMAL'
2025-10-13T02:36:24.1932368Z
2025-10-13T02:36:24.1932642Z # Drops to chain
2025-10-13T02:36:24.1933030Z bitcoind.generate_block(1, needfeerate=5000)
2025-10-13T02:36:24.1933824Z wait_for(lambda: only_one(l2.rpc.listpeerchannels(l3.info['id'])['channels'])['state'] == 'AWAITING_UNILATERAL')
2025-10-13T02:36:24.1934522Z
2025-10-13T02:36:24.1935254Z # But, l3's tx already there, and identical feerate will not RBF.
2025-10-13T02:36:24.1935839Z l2.daemon.wait_for_log("rejecting replacement")
2025-10-13T02:36:24.1936357Z wait_for(lambda: len(bitcoind.rpc.getrawmempool()) == 2)
2025-10-13T02:36:24.1936801Z
2025-10-13T02:36:24.1937127Z # As blocks pass, we will use anchor to boost l3's tx.
2025-10-13T02:36:24.1937666Z for block, feerate in zip(range(120, 124), (12000, 13000, 14000, 15000)):
2025-10-13T02:36:24.1938560Z l2.daemon.wait_for_log(fr"Worth fee [0-9]*sat for remote commit tx to get 100000000msat at block 125 \(\+{125 - block}\) at feerate {feerate}perkw")
2025-10-13T02:36:24.1939369Z l2.daemon.wait_for_log("sendrawtx exit 0")
2025-10-13T02:36:24.1939902Z # Check feerate for entire package (commitment tx + anchor) is ~ correct
2025-10-13T02:36:24.1940473Z details = bitcoind.rpc.getrawmempool(True).values()
2025-10-13T02:36:24.1940920Z print(f"mempool = {details}")
2025-10-13T02:36:24.1941347Z total_weight = sum([d['weight'] for d in details])
2025-10-13T02:36:24.1941903Z total_fees = sum([float(d['fees']['base']) * 100_000_000 for d in details])
2025-10-13T02:36:24.1942467Z total_feerate_perkw = total_fees / total_weight * 1000
2025-10-13T02:36:24.1942972Z > check_feerate([l3, l2], total_feerate_perkw, feerate)
2025-10-13T02:36:24.1943279Z
2025-10-13T02:36:24.1943411Z tests/test_closing.py:4064:
2025-10-13T02:36:24.1943813Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2025-10-13T02:36:24.1944170Z
2025-10-13T02:36:24.1944685Z nodes = [<fixtures.LightningNode object at 0x7f17fdf684f0>, <fixtures.LightningNode object at 0x7f17fdf6af50>]
2025-10-13T02:36:24.1945708Z actual_feerate = 13005.66942869603, expected_feerate = 13000
2025-10-13T02:36:24.1946091Z
2025-10-13T02:36:24.1946247Z def check_feerate(nodes, actual_feerate, expected_feerate):
2025-10-13T02:36:24.1946558Z # Feerate can't be lower.
2025-10-13T02:36:24.1946870Z assert actual_feerate > expected_feerate - 2
2025-10-13T02:36:24.1947365Z if actual_feerate >= expected_feerate + 2:
2025-10-13T02:36:24.1947830Z if any([did_short_sig(n) for n in nodes]):
2025-10-13T02:36:24.1948239Z return
2025-10-13T02:36:24.1948589Z # Use assert as it shows the actual values on failure
2025-10-13T02:36:24.1949043Z > assert actual_feerate < expected_feerate + 2
2025-10-13T02:36:24.1949489Z E AssertionError
2025-10-13T02:36:24.1949704Z
```

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

83/100 · StrongMessage clarity
✓ 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 13/100

This change only adds extra test-only logging to catch abnormally short cryptographic signatures during automated testing. It does not alter how signatures are created, verified, or used in real transactions, so it is not a security fix and does not affect normal users.

AI review queuedconnectd: close connection properly after dev-disconnect `+`.by Rusty Russell · fc6bee89 · Oct 13, 2025 · 1 fileMessage 85 · StrongLow 35Details
Commit message · Rusty Russell

connectd: close connection properly after dev-disconnect `+`.

We need to drain subds too, otherwise if timing is correct we never close.

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
second-pass: broader security terminology
AI analysis · Low 35/100

This patch fixes a bug in Core Lightning's connection handling where a developer testing feature (dev-disconnect '+') could leave a peer connection stuck open instead of closing it cleanly. The fix ensures all sub-connections are drained and freed before shutting down the peer connection. It is a hardening fix for a development/testing path, not a clear remote exploit on its own.

AI review queuedccan: update to latest.by Rusty Russell · af340a68 · Oct 13, 2025 · 24 filesMessage 86 · StrongLow 27Details
Commit message · Rusty Russell

ccan: update to latest.

We fix the configure test which was bogus, and breaks on 32-bit gcc with optimization:

```
checking for unaligned access to int... ccan/tools/configurator/configurator: Test for HAVE_UNALIGNED_ACCESS did not compile:
configuratortest.c: In function 'main':
configuratortest.c:8:22: error: array subscript 'int[0]' is partly outside array bounds of 'char[4]' [-Werror=array-bounds]
8 | return *x == *y;
| ^~
configuratortest.c:5:11: note: at offset 1 into object 'pad' of size 4
5 | char pad[sizeof(int *) * 1];
| ^~~
cc1: all warnings being treated as errors
```

And also removes sprintf() calls, which apparently MacOS no longer likes:

Environment: Sequoia 15.6.1 (24G90)
SDK Version: MacOSX15.sdk

```
ccan/ccan/closefrom/closefrom.c:83:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
83 | sprintf(dnam, "/proc/%ld/fd", (long) getpid());
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1: note: 'sprintf' has been explicitly marked deprecated here
278 | deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro 'deprecated_msg'
218 | #define deprecated_msg(_msg) attribute((deprecated(_msg)))
| ^
ccan/ccan/closefrom/closefrom.c:162:2: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
162 | sprintf(dnam, "/proc/%ld/fd", (long) getpid());
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:278:1: note: 'sprintf' has been explicitly marked deprecated here
278 | deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
| ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:218:48: note: expanded from macro 'deprecated_msg'
218 | #define deprecated_msg(_msg) attribute((deprecated(_msg)))
| ^
2 errors generated.
make: *** [ccan-closefrom.o] Error 1
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reported-by: Sangbida
Fixes: https://github.com/ElementsProject/lightning/issues/8581
Reported-by: https://github.com/Raimo33
Fixes: https://github.com/ElementsProject/lightning/issues/8501
Changelog-Fixed: build: we now build on MacOS without errors on the latest Command Line Tools (macOS 15 SDK).
Changelog-Fixes: build: fix build with -O2 on 32 bit arm (armhf)

86/100 · StrongMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
second-pass: unusually broad change
AI analysis · Low 27/100

This is a routine update to an internal code library (CCAN) used by Core Lightning. The main user-visible effect is fixing build failures on newer macOS and on 32-bit ARM when compiling with optimizations. It also replaces several old-style sprintf() calls with safer snprintf() versions. The sprintf() cases shown are generally low risk because the inputs are controlled (process IDs, small integers, fixed format strings), but switching to snprintf() is a defensive hardening improvement. There is no indication this fixes an active, exploitable vulnerability in running software.

AI review queuedwallet: fix migration speed for postgres.by Rusty Russell · 9f2e6de6 · Oct 13, 2025 · 1 fileMessage 78 · AdequateInformational 20Details
Commit message · Rusty Russell

wallet: fix migration speed for postgres.

Testing a large db shows Postgres slowing down exponentially as
it inserts the channel_events. Rather than updating the index in the
db every time, do it at the end, for spectacular speedup:

```
lightningd-1 2025-10-08T05:39:44.333Z INFO lightningd: Creating database
lightningd-1 2025-10-08T05:39:47.581Z DEBUG lightningd: Transferring 6166 chain_events
lightningd-1 2025-10-08T05:39:48.455Z DEBUG lightningd: Transferring 1660043 channel_events
lightningd-1 2025-10-08T05:39:54.390Z INFO lightningd: Inserted 103100/1660043 channel_events
lightningd-1 2025-10-08T05:40:04.390Z INFO lightningd: Inserted 283280/1660043 channel_events
lightningd-1 2025-10-08T05:40:14.390Z INFO lightningd: Inserted 464065/1660043 channel_events
lightningd-1 2025-10-08T05:40:24.390Z INFO lightningd: Inserted 629559/1660043 channel_events
lightningd-1 2025-10-08T05:40:34.390Z INFO lightningd: Inserted 800659/1660043 channel_events
lightningd-1 2025-10-08T05:40:44.390Z INFO lightningd: Inserted 975433/1660043 channel_events
lightningd-1 2025-10-08T05:40:54.390Z INFO lightningd: Inserted 1134719/1660043 channel_events
lightningd-1 2025-10-08T05:41:04.390Z INFO lightningd: Inserted 1290549/1660043 channel_events
lightningd-1 2025-10-08T05:41:14.390Z INFO lightningd: Inserted 1443304/1660043 channel_events
lightningd-1 2025-10-08T05:41:24.390Z INFO lightningd: Inserted 1590013/1660043 channel_events
lightningd-1 2025-10-08T05:41:29.148Z INFO lightningd: bookkeeper migration complete: migrated 6166 chainmoves, 1660043 channelmoves, 132481 descriptions
```

Now we complete the entire migration in 1 minute 45 seconds.

Thanks to @michael1101 for reporting this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: db: migration from v25.09 on a reasonable size account database could take almost infinite time.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 20/100

This commit fixes a database migration performance bug in Core Lightning. When users upgraded from version 25.09, migrating large account databases to Postgres could take an extremely long time because an index was being updated after every single inserted record. The fix batches the index update until the end of the migration, reducing the time from potentially hours to under two minutes. It is a performance and reliability fix, not a security vulnerability.

AI review queuedwallet: print progress reports for large account migration.by Rusty Russell · b260ec2f · Oct 13, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Rusty Russell

wallet: print progress reports for large account migration.

Show the work we're doing (at debug level) and every 10 seconds print
progress (at INFO level):x

```
lightningd-1 2025-10-08T05:13:07.973Z INFO lightningd: Creating database
lightningd-1 2025-10-08T05:13:10.987Z DEBUG lightningd: Transferring 6166 chain_events
lightningd-1 2025-10-08T05:13:11.780Z DEBUG lightningd: Transferring 1660043 channel_events
```

It's the inserting channel_events which takes a long time, slowing
down exponentially:

```
lightningd-1 2025-10-08T05:13:18.034Z INFO lightningd: Inserted 26690/1660043 channel_events
lightningd-1 2025-10-08T05:13:28.034Z INFO lightningd: Inserted 47086/1660043 channel_events
lightningd-1 2025-10-08T05:13:38.035Z INFO lightningd: Inserted 61699/1660043 channel_events
lightningd-1 2025-10-08T05:13:48.035Z INFO lightningd: Inserted 73743/1660043 channel_events
lightningd-1 2025-10-08T05:13:58.035Z INFO lightningd: Inserted 83244/1660043 channel_events
...
lightningd-1 2025-10-08T05:35:18.286Z INFO lightningd: Inserted 466720/1660043 channel_events
lightningd-1 2025-10-08T05:35:29.074Z INFO lightningd: Inserted 468437/1660043 channel_events
lightningd-1 2025-10-08T05:35:39.079Z INFO lightningd: Inserted 470130/1660043 channel_events
lightningd-1 2025-10-08T05:35:49.081Z INFO lightningd: Inserted 471871/1660043 channel_events
```

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 only adds progress messages (logging) during a database migration. It does not change how data is moved or stored, and it does not fix or introduce any security issue. It is purely a user-experience improvement so operators can see that a long upgrade is still running.

Lower-prioritylightningd: explicit db arg to wait_index_increase so we can use it in migrations.by Rusty Russell · 2f80305b · Oct 13, 2025 · 3 filesMessage 65 · AdequateInformational 12Details
Commit message · Rusty Russell

lightningd: explicit db arg to wait_index_increase so we can use it in migrations.

Before db is complete, ld->wallet->db is NULL.

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

This is a small internal code cleanup change. It changes a helper function so callers can pass in a database connection directly, rather than always using the one inside the main lightningd object. The commit message says this is needed because during database migrations the main wallet database pointer is not yet set. There is no indication this fixes a security bug or is itself a vulnerability.

Lower-prioritypytest: test for malformed reply from first hop when using injectpaymentonion.by Rusty Russell · 5c71ba22 · Oct 13, 2025 · 1 fileMessage 75 · AdequateLow 28Details
Commit message · Rusty Russell

pytest: test for malformed reply from first hop when using injectpaymentonion.

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

This commit adds a new test case to Core Lightning's test suite. It checks how the software handles a malformed (corrupted) payment onion message when the first hop is the node that created the payment, using a developer-only RPC command called injectpaymentonion. The test is currently marked as expected to fail (xfail), meaning the behavior it checks is not yet working correctly. The commit itself does not fix any code; it only adds a test that documents a bug or missing behavior.

AI review queuedlightningd: handle unparsable onion from first hop when using injectonionmessage.by Rusty Russell · 01e83b76 · Oct 13, 2025 · 2 filesMessage 93 · StrongModerate 64Details
Commit message · Rusty Russell

lightningd: handle unparsable onion from first hop when using injectonionmessage.

In this case we have a failmsg, so we should use that. Otherwise we can have
both failmsg and failonion NULL in the call to injectonion_fail, which is not
valid.

```
DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-chan#1: Removing out HTLC 1 state RCVD_REMOVE_ACK_REVOCATION WIRE_INVALID_ONION_HMAC
**BROKEN** lightningd: FATAL SIGNAL 11 (version v25.09-135-g19a3bbc-modded)
**BROKEN** lightningd: backtrace: common/daemon.c:41 (send_backtrace) 0x6220e8fe0080
**BROKEN** lightningd: backtrace: common/daemon.c:78 (crashdump) 0x6220e8fe00cf
**BROKEN** lightningd: backtrace: ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 ((null)) 0x73614bc4532f
**BROKEN** lightningd: backtrace: lightningd/pay.c:1701 (injectonion_fail) 0x6220e8f951c0
**BROKEN** lightningd: backtrace: lightningd/pay.c:330 (tell_waiters_failed) 0x6220e8f943be
**BROKEN** lightningd: backtrace: lightningd/pay.c:656 (payment_failed) 0x6220e8f98db1
**BROKEN** lightningd: backtrace: lightningd/peer_htlcs.c:313 (fail_out_htlc) 0x6220e8fa1d04
**BROKEN** lightningd: backtrace: lightningd/peer_htlcs.c:1988 (remove_htlc_out) 0x6220e8fa271b
**BROKEN** lightningd: backtrace: lightningd/peer_htlcs.c:2086 (update_out_htlc) 0x6220e8fa2904
**BROKEN** lightningd: backtrace: lightningd/peer_htlcs.c:2095 (changed_htlc) 0x6220e8fa2c24
**BROKEN** lightningd: backtrace: lightningd/peer_htlcs.c:2608 (peer_got_revoke) 0x6220e8fa6e5a
**BROKEN** lightningd: backtrace: lightningd/channel_control.c:1555 (channel_msg) 0x6220e8f62725
**BROKEN** lightningd: backtrace: lightningd/subd.c:560 (sd_msg_read) 0x6220e8fb2eed
**BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:60 (next_plan) 0x6220e90a3335
**BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:422 (do_plan) 0x6220e90a3806
**BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:439 (io_ready) 0x6220e90a38c3
**BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:455 (io_loop) 0x6220e90a524f
**BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:22 (io_loop_with_timers) 0x6220e8f7d1c7
**BROKEN** lightningd: backtrace: lightningd/lightningd.c:1496 (main) 0x6220e8f82db2
**BROKEN** lightningd: backtrace: ../sysdeps/nptl/libc_start_call_main.h:58 (__libc_start_call_main) 0x73614bc2a1c9
**BROKEN** lightningd: backtrace: ../csu/libc-start.c:360 (__libc_start_main_impl) 0x73614bc2a28a
**BROKEN** lightningd: backtrace: (null):0 ((null)) 0x6220e8f53b64
**BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff
```

Reported-by: @michael1011
Changelog-Fixed: lightningd: potential crash when we receive a malformed onion complain from our first peer when using sendonion / injectpaymentonion.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 64/100

This fix stops Core Lightning from crashing with a fatal signal 11 (segfault) when a payment sent via the low-level `sendonion`/`injectpaymentonion` path fails because the very first peer reports a malformed onion. Before the fix, the code could call an internal failure-handling routine with both the failure message and the failure onion set to NULL, which is not allowed and caused the daemon to crash. The patch reorders the logic so the malformed-onion message is used when available, and adds a safety assertion that the onion is present in the remaining case.

Security candidatebump minimum python to 3.9.2 and downgrade coincurveby Alex Myers · 8a0e473e · Oct 10, 2025 · 3 filesMessage 91 · StrongInformational 19Details
Commit message · Alex Myers

bump minimum python to 3.9.2 and downgrade coincurve

This allows compatibility with python 3.14.0 which coincurve 21.0.0 did
not support. The next coincurve release should restore compatibility.

Fixes: #8591

Changelog-changed: pyln-testing requires python>=3.9.2

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
Why it was queued
update trust
AI analysis · Informational 19/100

This commit adjusts Python package versions so the project's testing tools install correctly on the newly released Python 3.14. It lowers the required 'coincurve' library from version 21.0.0 to 20.0.0 and raises the minimum Python version from 3.9 to 3.9.2. The change is framed by the developer as a compatibility fix, not a security fix. There is no direct evidence in the commit that it repairs a vulnerability.