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 50 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-prioritydoc: include delnetworkevent in generated documentation, and grpc.by Rusty Russell · ea0b8040 · Nov 24, 2025 · 13 filesMessage 73 · AdequateInformational 15Details
Commit message · Rusty Russell

doc: include delnetworkevent in generated documentation, and grpc.

Also added missing "added" annotation. This meant that I had to manually
change contrib/msggen/msggen/patch.py to insert that added notation where it
was missing from .msggen.json.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: introduced this release.

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 purely a documentation and generated-code update. It exposes an existing RPC command, delnetworkevent, in the gRPC and generated documentation files. There is no change to runtime logic, no bug fix, and no security-relevant behavior.

Lower-prioritymsggen: fix primitive serialization for special namesby daywalker90 · b4ef5d9a · Nov 24, 2025 · 2 filesMessage 50 · ThinInformational 16Details
Commit message · daywalker90

msggen: fix primitive serialization for special names

Changelog-None

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

This is a small code-generator bug fix. The tool that automatically creates Rust data structures from message definitions was using the wrong internal name when deciding whether to apply a special Serde rename annotation. As a result, fields whose original JSON name is a Rust reserved word (like 'type') were not being renamed correctly in the generated code. The patch corrects the generator and updates one generated struct so the field serializes as 'type' in JSON again. It is a correctness/serialization fix, not an obvious security vulnerability.

Lower-priorityrelease candidate PR for 25.12 with Shahana's Makefile update Changelog-Noneby Madeline Paech · 5166fd55 · Nov 24, 2025 · 8 filesMessage 65 · AdequateInformational 15Details
Commit message · Madeline Paech

release candidate PR for 25.12 with Shahana's Makefile update
Changelog-None

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit is a routine release-candidate housekeeping change. It adds the letter 'v' in front of the version number (from '25.12rc1' to 'v25.12rc1') in a handful of package metadata files and a tool script. There is no change to any payment, network, cryptographic, or node logic, and no security relevance.

Lower-prioritymake: Remove printing the version from Makefileby ShahanaFarooqui · 147ffecc · Nov 24, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · ShahanaFarooqui

make: Remove printing the version from Makefile

Changelog-None: Fixes error from `tools/check-release.sh`

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

This is a tiny build-script fix. The release-checking script now takes only the last line of the `make version` command when comparing versions, and prints slightly more detailed error messages. It has no security relevance.

Lower-priorityCHANGELOG.md: fix header format for rc1by Rusty Russell · 10b10eb9 · Nov 21, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Rusty Russell

CHANGELOG.md: fix header format for rc1

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 is a trivial formatting fix in the project's changelog. It changes the heading style for a release candidate entry from '## v25.12rc1' to '## [25.12rc1]' to match the Keep a Changelog format. There is no code change and no security relevance.

AI review queuedchange log for 25.12rc1by Madeline Paech · f16b198c · Nov 21, 2025 · 11 filesMessage 38 · OpaqueInformational 15Details
Commit message · Madeline Paech

change log for 25.12rc1

38/100 · OpaqueMessage clarity
✓ Subject identifies a change✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit is a routine release-candidate version bump and changelog update for Core Lightning v25.12rc1. It only changes version strings in packaging files and adds a changelog entry; it does not modify any executable code. The changelog itself lists many unrelated fixes and features from prior pull requests, but this commit is purely administrative release preparation.

Lower-prioritymsggen: add missing methods from v25.09by daywalker90 · ab733889 · Nov 21, 2025 · 12 filesMessage 45 · ThinInformational 15Details
Commit message · daywalker90

msggen: add missing methods from v25.09

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This is a routine code-generation update for Core Lightning's gRPC and RPC bindings. It adds support for three newly introduced JSON-RPC commands—CancelRecurringInvoice, ListChannelMoves, and ListChainMoves—so they are also available through the gRPC and Python interfaces. There is no indication of a security bug or fix in the commit itself.

Lower-prioritymsggen: add missing methods from v25.12by daywalker90 · d125b3c7 · Nov 21, 2025 · 10 filesMessage 45 · ThinInformational 15Details
Commit message · daywalker90

msggen: add missing methods from v25.12

Changelog-None

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit is a routine code-generation update for Core Lightning's gRPC and RPC bindings. It adds two newly introduced API methods—'askrene-bias-node' and 'listnetworkevents'—that were already present in the v25.12 JSON-RPC interface but had not yet been exposed through the generated gRPC/proto, Rust, and Python bindings. There is no indication of a security bug or vulnerability fix.

Lower-priorityplugin: change method name of lsps-jitchannelby Peter Neuroth · 719fb2ce · Nov 21, 2025 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Peter Neuroth

plugin: change method name of lsps-jitchannel

The original method name was lsps-lsps2-invoice but I somehow messed it
up and renamed during a rebase.

Changelog-Changed: lsps-jitchannel is now lsps-lsps2-invoice

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

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit simply renames a plugin command from 'lsps-jitchannel' to 'lsps-lsps2-invoice' and updates the matching test calls. It is a routine naming consistency fix with no security relevance.

Lower-prioritysql: limit how many chainmoves/channelmoves entries we ask for at once.by Rusty Russell · a877e285 · Nov 20, 2025 · 1 fileMessage 83 · StrongInformational 23Details
Commit message · Rusty Russell

sql: limit how many chainmoves/channelmoves entries we ask for at once.

This avoids latency spikes when we ask lightningd to give us 2M entries.

tests/test_coinmoves.py::test_generate_coinmoves (2,000,000, sqlite3):
Time (from start to end of l2 node): 88 seconds (was 95)
Worst latency: 0.028 seconds **WAS 4.5**

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

This change is a performance fix, not a security fix. It caps how many records the SQL plugin fetches from lightningd in one go (to 10,000), then loops if more are needed. The commit message explicitly frames it as avoiding latency spikes: worst-case response time dropped from 4.5 seconds to 0.028 seconds. There is no evidence it closes a vulnerability.

Lower-priorityxpay: use filtering on rpc_command so we only get called on "pay".by Rusty Russell · 9961f6bf · Nov 20, 2025 · 2 filesMessage 83 · StrongInformational 18Details
Commit message · Rusty Russell

xpay: use filtering on rpc_command so we only get called on "pay".

tests/test_coinmoves.py::test_generate_coinmoves (2,000,000, sqlite3):
Time (from start to end of l2 node): 135 seconds **WAS 227**
Worst latency: 12.1 seconds **WAS 62.4**

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

This change is a performance optimization for the xpay plugin in Core Lightning. Previously, the plugin's hook was called for every RPC command, which slowed things down. Now it only listens for the 'pay' command. There is no direct security vulnerability here, but running a hook on every command can slightly increase attack surface and resource use.

Lower-prioritylibplugin: add spamlistcommandby Rusty Russell · b4f17508 · Nov 20, 2025 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Rusty Russell

libplugin: add spamlistcommand

This hammers lightingd with `listinvoices` commands.

$ VALGRIND=0 TEST_DB_PROVIDER=postgres eatmydata uv run pytest -v tests/benchmark.py::test_spam_listcommands

sqlite3:

test_spam_listcommands 2.1193 2.4524 2.2343 0.1341 2.2229 0.1709 1;0 0.4476 5 1

PostgreSQL:

test_spam_listcommands 6.5572 6.8440 6.7067 0.1032 6.6967 0.1063 2;0 0.1491 5 1

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

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit adds a new internal benchmark/test plugin command called 'spamlistcommand'. It is only used in automated performance tests to repeatedly call the 'listinvoices' RPC and measure speed. It does not change normal wallet behavior, add user-facing features, or fix any bug. There is no security relevance.

Lower-prioritydb: don't actually create an explicit transaction for read commands.by Rusty Russell · 47ab467b · Nov 20, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Rusty Russell

db: don't actually create an explicit transaction for read commands.

Since we are the only writer, we don't need one.

Name (time in s) Min Max Mean StdDev Median
sqlite: test_spam_listcommands (before) 2.1193 2.4524 2.2343 0.1341 2.2229
sqlite: test_spam_listcommands (after) 2.0140 2.2349 2.1001 0.0893 2.0644
Postgres: test_spam_listcommands (before) 6.5572 6.8440 6.7067 0.1032 6.6967
Postgres: test_spam_listcommands (after) 4.4237 5.0024 4.6495 0.2278 4.6717

A nice 31% speedup!

Changelog-Changed: Postgres: significant speedup on read-only operations (e.g. 30% on empty SELECTs)
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 is a performance optimization, not a security fix. The change removes an unnecessary explicit transaction wrapper around read-only database queries because the software is already the only writer to the database. The commit message and diff show only speed improvements and no security relevance.

Lower-prioritylightningd: log when we have to defer hook registration.by Rusty Russell · 576f48cb · Nov 20, 2025 · 4 filesMessage 73 · AdequateInformational 20Details
Commit message · Rusty Russell

lightningd: log when we have to defer hook registration.

If livelock ever *does* become an issue, we will see it in the logs.

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 change only adds log messages when Core Lightning has to delay updating a plugin hook because the hook is currently in use. It does not fix or change any behavior; it is purely diagnostic observability to help detect a potential future 'livelock' problem. There is no security vulnerability being patched here.

Lower-prioritylightningd: handle large numbers of command outputs gracefully.by Rusty Russell · 8707b731 · Nov 20, 2025 · 4 filesMessage 83 · StrongLow 27Details
Commit message · Rusty Russell

lightningd: handle large numbers of command outputs gracefully.

Profiling shows us spending all our time in tal_arr_remove when dealing
with a giant number of output streams. This applies both for RPC output
and plugin output.

Use linked list instead.

tests/test_coinmoves.py::test_generate_coinmoves (2,000,000, sqlite3):
Time (from start to end of l2 node): 239 seconds **WAS 518**
Worst latency: 56.9 seconds **WAS 353**

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

This change is a performance fix, not a direct security patch. It swaps a slow array for a linked list when handling large numbers of output streams for RPC responses and plugin messages. The old array approach caused severe slowdowns—up to hundreds of seconds of delay in extreme cases—which could be abused to make the node sluggish or unresponsive. The fix removes that bottleneck, making large-output operations finish much faster and reducing the chance of a denial-of-service via resource exhaustion.

Lower-prioritypytest: test for 1M JSONRPC calls which don't need transactions.by Rusty Russell · b03562b9 · Nov 20, 2025 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

pytest: test for 1M JSONRPC calls which don't need transactions.

To measure the improvement (if any) if we don't actually create empty transactions.

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

This commit adds a new internal test to Core Lightning that exercises one million JSON-RPC plugin calls. It is purely a performance benchmark and test infrastructure change; it does not fix any bug, change production behavior, or introduce any security-relevant code path that an external user could reach.

Lower-prioritydb: don't start transactions unless we really need to.by Rusty Russell · bfbee055 · Nov 20, 2025 · 5 filesMessage 85 · StrongInformational 12Details
Commit message · Rusty Russell

db: don't start transactions unless we really need to.

We always start a transaction before processing, but there are cases where
we don't need to. Switch to doing it on-demand.

This doesn't make a big difference for sqlite3, but it can for Postgres because
of the latency: 12% or so. Every bit helps!

30 runs, min-max(mean+/-stddev):

Postgres before: 8.842773-9.769030(9.19531+/-0.21)
Postgres after: 8.007967-8.321856(8.14172+/-0.066)

sqlite3 before: 7.486042-8.371831(8.15544+/-0.19)
sqlite3 after: 7.973411-8.576135(8.3025+/-0.12)

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

This change is a performance optimization, not a security fix. It delays starting a database transaction until the software actually needs to write or read data, rather than starting one automatically at the beginning of every operation. The commit message explicitly frames this as a speed improvement, especially for PostgreSQL, and provides benchmark numbers. There is no indication of a vulnerability being fixed.

Lower-prioritylightningd: allow filtering on custommsg hook too.by Rusty Russell · 213cbba5 · Nov 20, 2025 · 4 filesMessage 73 · AdequateInformational 19Details
Commit message · Rusty Russell

lightningd: allow filtering on custommsg hook too.

Changelog-Added: Plugins: "filters" can be specified on the `custommsg` hook to limit what message types the hook will be called for.
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 19/100

This commit adds a new plugin feature: the ability for plugin authors to register a 'custommsg' hook with a filter list, so the hook is only invoked for specific custom message types. It is a feature enhancement, not a security fix. There is no indication in the commit or supplied references that this resolves a known vulnerability.

Lower-priorityPython: update pyproject.toml so we can run tests/benchmarks.py.by Rusty Russell · f49818c0 · Nov 20, 2025 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

Python: update pyproject.toml so we can run tests/benchmarks.py.

I had forgotten this file existed, but it needs tqdm and pytest-benchmark, so add those dev
requirements.

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

This commit simply adds two Python development-only packages (tqdm and pytest-benchmark) to the project's dependency list so an existing benchmark script can run. It does not change any runtime code, network behavior, or security-sensitive logic.

Lower-prioritypyln-testing: don't assume we're doing debug logging for fundwallet and line_graph helpers.by Rusty Russell · 19f0b04a · Nov 20, 2025 · 1 fileMessage 75 · AdequateInformational 15Details
Commit message · Rusty Russell

pyln-testing: don't assume we're doing debug logging for fundwallet and line_graph helpers.

We want to use log-level info for benchmarking, for example.

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 is a small test-framework cleanup. Two helper functions in the Python testing utilities used to wait for certain events by scanning daemon debug logs. The change makes them check the actual RPC/API state instead, so the helpers still work when debug logging is disabled (e.g., when running benchmarks at log level 'info'). There is no change to production node code, no security fix, and no vulnerability.

Lower-prioritytests/benchmark.py: tune nodes a little.by Rusty Russell · 5fd95b3d · Nov 20, 2025 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Rusty Russell

tests/benchmark.py: tune nodes a little.

Drop the log level, don't do extra memory checks, don't dump I/O. These are not
realistic for testing non-development nodes.

Here's the comparison, using:
VALGRIND=0 eatmydata uv run pytest -v --benchmark-compare=0001_baseline tests/benchmark.py

Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_invoice (NOW) 414.9430 (1.0) 39,115.6150 (12.35) 834.7296 (1.0) 2,274.1198 (6.59) 611.7745 (1.0) 162.0230 (1.0) 1;33 1,197.9927 (1.0) 290 1
test_invoice (0001_baselin) 951.9740 (2.29) 3,166.4061 (1.0) 1,366.7944 (1.64) 345.1460 (1.0) 1,328.6110 (2.17) 339.3517 (2.09) 48;15 731.6389 (0.61) 221 1

test_pay (NOW) 36,339.2329 (87.58) 69,477.8530 (21.94) 51,719.9459 (61.96) 8,033.4262 (23.28) 52,639.5601 (86.04) 9,590.1425 (59.19) 6;0 19.3349 (0.02) 17 1
test_pay (0001_baselin) 61,741.5591 (148.80) 108,801.6961 (34.36) 88,284.6752 (105.76) 15,875.4417 (46.00) 96,006.0760 (156.93) 27,500.9771 (169.74) 6;0 11.3270 (0.01) 13 1

test_single_payment (NOW) 46,721.4010 (112.60) 66,027.6250 (20.85) 56,699.4597 (67.93) 5,829.7234 (16.89) 54,659.9385 (89.35) 9,810.9820 (60.55) 6;0 17.6369 (0.01) 14 1
test_single_payment (0001_baselin) 52,215.3670 (125.84) 109,608.0400 (34.62) 74,521.8032 (89.28) 16,175.6833 (46.87) 72,881.5976 (119.13) 17,668.8581 (109.05) 4;1 13.4189 (0.01) 12 1

test_forward_payment (NOW) 108,338.2401 (261.09) 115,570.7800 (36.50) 111,353.7021 (133.40) 2,483.2338 (7.19) 111,981.6790 (183.04) 3,360.6182 (20.74) 3;0 8.9804 (0.01) 11 1
test_forward_payment (0001_baselin) 108,917.7490 (262.49) 168,348.2911 (53.17) 140,321.5990 (168.10) 22,375.2216 (64.83) 143,746.4900 (234.97) 36,363.4459 (224.43) 3;0 7.1265 (0.01) 7 1

test_start (NOW) 299,278.4000 (721.25) 330,340.2610 (104.33) 314,121.8292 (376.32) 11,385.4700 (32.99) 314,603.4899 (514.25) 13,876.4871 (85.65) 2;0 3.1835 (0.00) 5 1
test_start (0001_baselin) 305,928.9111 (737.28) 575,270.0820 (181.68) 419,496.8460 (502.55) 138,248.1937 (400.55) 334,207.0500 (546.29) 254,339.0035 (>1000.0) 2;0 2.3838 (0.00) 5 1

test_long_forward_payment (NOW) 1,088,077.8680 (>1000.0) 1,131,035.0260 (357.20) 1,108,896.7970 (>1000.0) 20,494.1195 (59.38) 1,098,544.8329 (>1000.0) 36,904.4899 (227.77) 3;0 0.9018 (0.00) 5 1
test_long_forward_payment (0001_baselin) 1,282,326.5721 (>1000.0) 1,450,350.8301 (458.04) 1,369,618.5776 (>1000.0) 73,432.8716 (212.76) 1,380,547.3910 (>1000.0) 132,647.3573 (818.69) 2;0 0.7301 (0.00) 5 1

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

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only changes the project's internal benchmarking test script. It makes benchmark runs faster by reducing logging, disabling memory-leak detection, and turning off I/O recording during tests. There is no change to the actual Core Lightning node software that users run, and nothing in the commit affects security.

Lower-prioritypytest: move test_coinmoves.py::test_generate_coinmoves and test_plugin.py::test_spam_commands to benchmark.pyby Rusty Russell · ce425b46 · Nov 20, 2025 · 3 filesMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

pytest: move test_coinmoves.py::test_generate_coinmoves and test_plugin.py::test_spam_commands to benchmark.py

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

This commit simply moves two existing performance tests from their original test files into a dedicated benchmark file. It does not change any production code, fix bugs, or alter security behavior. The tests themselves are unchanged in substance; only their location and some benchmark plumbing are adjusted.

Lower-prioritylightningd: print last method we called if we abort processing loop.by Rusty Russell · 87324103 · Nov 20, 2025 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · Rusty Russell

lightningd: print last method we called if we abort processing loop.

We are seeing this in the CI logs, eg tests/test_connection.py::test_reconnect_sender_add1:

lightningd-1 2025-11-17T05:48:00.665Z DEBUG jsonrpc#84: Pausing parsing after 1 requests

followed by:

lightningd-1 2025-11-17T05:48:02.068Z **BROKEN** 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-connectd: wake delay for WIRE_CHANNEL_REESTABLISH: 8512msec

So, what is consuming lightningd for 8 or so seconds?

This message helped diagnose that the issue was dev-memleak: fixed in a different branch.

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

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

This commit only adds extra debugging information to a log message. When the lightning daemon pauses processing JSON-RPC commands, it now records the name of the last command it handled and how long it spent. There is no security fix or behavior change.

Lower-prioritysql: use wait RPC so we don't have to check listchannelmoves/listchainmoves each time.by Rusty Russell · 7910ee44 · Nov 20, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

sql: use wait RPC so we don't have to check listchannelmoves/listchainmoves each time.

tests/test_coinmoves.py::test_generate_coinmoves (2,000,000, sqlite3):
Time (from start to end of l2 node): 102 seconds **WAS 126**
Worst latency: 4.5 seconds **WAS 5.1**

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

This is a performance optimization for the SQL plugin in Core Lightning. It replaces repeated polling of `listchainmoves` and `listchannelmoves` with a new 'wait' RPC that notifies the plugin only when there are actually new entries. The commit message shows benchmark improvements (faster test completion and lower latency), and there is no indication of any security fix or vulnerability being addressed.

Lower-prioritysql: if we use `dev-sqlfilename`, don't bother syncing it to disk.by Rusty Russell · bb7db392 · Nov 20, 2025 · 1 fileMessage 65 · AdequateInformational 18Details
Commit message · Rusty Russell

sql: if we use `dev-sqlfilename`, don't bother syncing it to disk.

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

This commit changes a developer-only test feature (`dev-sqlfilename`) so that when it is used, the SQLite database does not write changes to disk as carefully. This makes tests run faster but increases the risk of losing data if the program crashes. It only affects a special testing option, not normal operation.