EP
← All projectsElements Project

Core Lightning

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

BitcoinLightning NetworkActive incident
Repository coverage

2009 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.

184security candidates280second-pass queue1894AI analyses
56commits · 30 days
192commits · 60 days
678commits · 180 days
1671commits · 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
489Strong · 80–100
1231Adequate · 60–79
259Thin · 40–59
30Opaque · 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.
cdecker14910384
Níckolas Goline63844277
Rusty Russell96475958172
daywalker90118895165
Lagrang386578170
Vincenzo Palazzo13411182
dovgopoly15015164
Sangbida Chaudhuri14931146066
Dusty Daemon821378066
ShahanaFarooqui931093063
Peter Neuroth1024101071
Christian Decker36436072
Analysis record

Published AI watches

Last scanned 10 minutes ago

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

contrib: add jaonoctus's signing key

This commit simply adds a new person's PGP public-key fingerprint to the list of trusted release signers in two documentation files. It does not change any code, fix any bug, or alter any security behavior of the software itself.

41278b4eby jaonoctus+2−02 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: fixed timestamps for invented bookkeeper deposits

This is a tiny internal fix to make a bookkeeping migration produce stable event ordering. It changes the timestamp used when creating historical 'deposit' records during a one-time database migration, so the records sort consistently with…

498e5086by daywalker90+2−01 file
No security note in commit
Informational 21 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

docs: document missing and fix erroneous JSON-RPC error codes

This commit is a documentation-only cleanup of the JSON-RPC command help files. It corrects which numeric error codes are listed for each command so the published schemas match what the software actually returns. No program logic, validati…

Documentation-only change with no executable code modificationsCorrects RPC schema error-code metadata to match actual handler behaviorNo change to input parsing, authorization, cryptography, or network behavior
d1b6963bby daywalker90+204−1224 files
No security note in commit
Low 46 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

channeld: initialize tx_sigs_allowed on startup

This commit fixes a bug where a setting that controls whether unexpected transaction signatures are allowed was not initialized when the channel daemon starts. If a peer sent such signatures before the channel was fully ready, the program …

use of uninitialized variableundefined behavior (invalid bool load)network-triggered code path
c09c4520by Erick Cestari+1−01 file
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

ci: fix the coverage nightly's profile handling

This commit fixes the project's internal nightly code-coverage CI workflow. It changes how test coverage files are collected, ensures the same LLVM compiler version is used to generate and merge coverage data, and uploads a Codecov-compati…

5685c9a3by cdecker+12−211 file
No security note in commit
Low 37 AI analysisMessage 78 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

schemas: make required fields match the code

This commit is a large cleanup of Core Lightning's API schemas, generated RPC bindings, and related plugin code. The stated goal is to make the documented 'required' fields match what the C code actually always produces or expects. In prac…

Large schema-only change with no accompanying security advisory or CVEOne semantic change to plugin hook response: invoice_payment hook can now reject with only failure_message and no resultMany fields change from optional to required in public RPC/protobuf interfaces
ddbd2963by daywalker90+1786−173950 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: document error 313 on every command which can return it

This commit only updates documentation. It adds error code 313 to the documented error lists for several Core Lightning commands (fundpsbt, utxopsbt, txprepare, multiwithdraw, and upgradewallet). The error code already existed in the code …

a34b9758by Peter Neuroth+30−86 files
No security note in commit
Low 25 AI analysisMessage 88 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tools/build-release.sh: name the checksum file when verifying the signature

This commit fixes a release-script check that verifies the cryptographic signature on a file of checksums. Previously, the script only told GPG to verify the signature file itself. If someone replaced that signature file with an inline-sig…

Incorrect cryptographic verification logic in release toolingPotential false-positive signature verification with inline-signed .asc substitutionRelease-integrity hardening
8e495707by Peter Neuroth+5−21 file
No security note in commit
Low 42 AI analysisMessage 95 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: pass the manifest explicitly to gpg --verify

This commit updates Core Lightning's release documentation to tell users and release managers to run gpg --verify with both the signature file and the manifest file named explicitly. The old one-argument form can silently succeed even if t…

Verification bypass risk in release artifact validationgpg --verify single-argument form can exit 0 without reading the intended manifestDocumentation-only hardening of release process
2dee8699by Peter Neuroth+9−62 files
Vendor flagged security relevance
Low 25 AI analysisMessage 58 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

Cargo.lock: update dependencies

This commit is a routine update to the Rust dependency lock file (Cargo.lock), bumping many third-party libraries to newer patch or minor versions. The commit message gives no security reason for the update, and no verified references link…

Routine dependency refresh with no stated security rationaleUpdates to security-sensitive transitive crates (rustls, hyper, h2, tokio, webpki-roots) but no evidence these versions fix known vulnerabilitiesNo source-code changes or patch-specific fixes visible in the diff
c1551c55by daywalker90+298−2761 file
No security note in commit
High 80 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

common: bound JSON nesting depth when parsing

This commit fixes a stack-overflow risk in Core Lightning's JSON parser. Before the fix, an attacker could send a valid JSON-RPC message containing thousands of nested brackets or braces. The parser's own helper functions used recursion fo…

Stack-overflow via deeply nested JSONRecursive JSON traversal without depth boundDenial-of-service vector in JSON-RPC input parsing
83f92e4bby Níckolas Goline+90−22 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 28 · Opaque
EP Elements ProjectCore Lightning BitcoinLightning Network

common: minor typo fixes

This commit only fixes typos and comment style. It changes two C-style comments from // to /* */ and corrects a grammar error in a documentation comment ('element' to 'elements'). There are no code behavior changes, no bug fixes, and no se…

273d7f02by w3lld1+3−32 files
No security note in commit
Informational 20 AI analysisMessage 90 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

pyln-testing: truncate long testnames

This change fixes a test-infrastructure bug in Core Lightning's Python testing helpers. When running tests against a PostgreSQL database, very long test names could be silently shortened by PostgreSQL, causing different test runs or nodes …

No security-relevant signal: change is in test framework code onlyFixes a test reliability issue, not a runtime vulnerabilityNo input sanitization, authentication, cryptography, or network changes
c4fe4cbaby Peter Neuroth+59−12 files
No security note in commit
Moderate 60 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: exclude immature coinbase outputs from fee rescue selection

This fix prevents Core Lightning from trying to use freshly created bitcoins (immature coinbase rewards) as emergency funds for fee-bump transactions. Such a transaction would be invalid under Bitcoin's rules and would be rejected by the n…

Consensus-invalid transaction generation preventedFee rescue / CPFP failure mode mitigatedCoinbase maturity check added to coin selection
34883ff7by cdecker+5−12 files
Vendor flagged security relevance
Moderate 59 AI analysisMessage 91 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

askrene: fix crash loading node bias with description

This commit fixes a bug in Core Lightning's askrene plugin that could prevent a node from restarting. When a saved routing layer contained a node bias with a description, the plugin accidentally freed the description's memory while using i…

Use-after-free / double-take of a tal-allocated string during plugin startupDenial-of-service-like symptom: lightningd aborts before replying to init, node cannot restartFixes publicly reported issue #9433 by endothermicdev
4681177dby Vincenzo Palazzo+2−32 files
No security note in commit
Informational 12 AI analysisMessage 91 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: restart the node which owns the layer in node bias test

This commit only fixes a test case so it actually exercises the intended code path. It does not change any production code, so it cannot introduce or fix a real-world security vulnerability by itself. The test change is a reproducer for a …

0f3f67a0by Vincenzo Palazzo+3−21 file
No security note in commit
High 78 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

dualopend: bound the feerates a peer opens at

This commit fixes a bug in Core Lightning's experimental dual-funded channel feature. When another node tried to open a channel, Core Lightning was not checking whether the proposed transaction fees were reasonable. A peer could request a …

Missing input validation on wire-parsed feerate fieldsPeer could induce signing and storage of feerate == 0RBF remote path allowed unbounded upward feerate walks
ba08356fby cdecker+140−04 files
Vendor flagged security relevance
High 72 AI analysisMessage 100 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: regression coverage for out-of-range feerates

This commit adds regression tests for three related bugs where wildly wrong Bitcoin transaction feerates could enter Core Lightning. In the worst case, a malicious or broken fee source could make the node think a feerate was zero (due to a…

Integer overflow in feerate conversion (u32 wrap from 0xFFFFFFFF perkb to 0 perkw)Absurd feerate from external fee source bypassing sanity ceilingDatabase-stored out-of-range feerate causing startup abort/crash loop
65bdbc47by cdecker+137−02 files
No security note in commit
Moderate 64 AI analysisMessage 86 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: don't assert on funding feerates read from the db

This update fixes a crash bug in Core Lightning. When the software tried to list details of a channel opening in progress, it could crash if a stored fee rate was extremely large or zero. The crash happened because the code used an interna…

Integer overflow in RBF escalation (u32 * 25 / 24) leading to assertion failureAssertion failure in read-only introspection RPC (listpeerchannels) causing crash-loop at startupDatabase value treated as invariant despite originating from external fee estimator
d67c4936by cdecker+72−227 files
Vendor flagged security relevance
Moderate 53 AI analysisMessage 86 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: clamp absurd inflight funding feerates on upgrade

This commit fixes a bug where Core Lightning nodes could get stuck in a crash loop. If a node had previously stored an extremely high or zero fee rate for an in-progress channel funding operation (a 'splice' or dual-funded channel RBF), a …

Integer overflow in fee-rate calculation (u32 overflow when multiplying by 25/24)Assertion failure leading to daemon crash loop at startupDatabase migration clamps out-of-range stored funding feerates
f057c692by cdecker+34−01 file
Vendor flagged security relevance
Repository ledger

Explore captured commits

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

Lower-prioritymeta: Update version 25.09.3 and CHANGELOGby ShahanaFarooqui · d723337a · Nov 10, 2025 · 10 filesMessage 45 · ThinInformational 15Details
Commit message · ShahanaFarooqui

meta: Update version 25.09.3 and CHANGELOG

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 version bump and changelog update for Core Lightning release 25.09.3. It only changes version strings in packaging files and adds release notes; it does not modify any executable code, cryptographic logic, network handling, or fix any vulnerability directly. The changelog mentions prior fixes in release 25.09.2, but those changes are not part of this diff.

AI review queuedlightningd: add invoice_amt to the htlc_accepted hookby Peter Neuroth · 21fb7600 · Nov 10, 2025 · 8 filesMessage 73 · AdequateLow 40Details
Commit message · Peter Neuroth

lightningd: add invoice_amt to the htlc_accepted hook

This commit introduces a new field `invoice_msat` to the htlc_accepted
hook. If this field is specified it will replace the amount of the
invoice that belongs to the payment_hash of the HTLC on internal checks.

This is useful in scenarios where we actually expect a smaller amount
than initially specified in an invoice.

Changelog-Changed: Plugins: `htlc_accepted` hook can now override the
expected total amount of the invoice that belongs to the HTLC.

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

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 · Low 40/100

This commit adds a new plugin hook capability that lets a plugin override the expected invoice amount when a Lightning payment arrives. It is a deliberate feature, not a bug fix, and the commit message and documentation describe it as useful for accepting smaller payments than originally invoiced. There is no direct evidence this change introduces a vulnerability, but any hook that can override financial validation could be misused if a malicious or buggy plugin is installed.

AI review queuedlightningd: add override amt to invoice_check_paymentby Peter Neuroth · 572c4553 · Nov 10, 2025 · 5 filesMessage 73 · AdequateLow 28Details
Commit message · Peter Neuroth

lightningd: add override amt to invoice_check_payment

Adds `expected_msat_override` to the `invoice_check_payment` check. If
it's set, it will be used to override the invoice amount as the expected
amount of the payment check.

This enables us to charge a different amount for a payment than the
amount stated on the invoice.

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

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

This commit adds a new optional override to the internal invoice payment-checking function. It lets the node accept a payment whose amount differs from what the invoice originally stated. The change is purely internal infrastructure: all existing callers pass NULL, so the override is not yet used. There is no direct security bug visible in the diff, but it changes the assumptions around invoice amounts, which could matter for future callers.

AI review queueddocker: Add missing sqlite library in final stageby ShahanaFarooqui · cbefbf2a · Nov 7, 2025 · 1 fileMessage 60 · AdequateLow 25Details
Commit message · ShahanaFarooqui

docker: Add missing sqlite library in final stage

Changelog-Fixed: Restored sqlite library dependency that was missing after Docker refactoring in v25.09.1 and v25.09.2

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
second-pass: broader security terminology
AI analysis · Low 25/100

This commit fixes a packaging bug in Core Lightning's official Docker image. A recent Docker refactoring accidentally left out the SQLite database library (libsqlite3-0) from the final runtime image. Without it, the container likely fails to start or cannot use the default SQLite wallet backend. The patch simply adds the missing library back to the list of packages installed in the final Docker stage. There is no evidence in the commit of a security vulnerability, exploit, or malicious change.

Lower-prioritydocker: Install missing lowdown and libsodium dependenciesby ShahanaFarooqui · 193f24a0 · Nov 7, 2025 · 1 fileMessage 50 · ThinInformational 17Details
Commit message · ShahanaFarooqui

docker: Install missing lowdown and libsodium dependencies

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

This commit updates the project's Docker build file to install two missing software libraries (lowdown and libsodium) and set related environment variables so the container can compile and run correctly. It is a build-fix change, not a patch for an active security vulnerability. There is no evidence in the commit or supplied references that this fixes a known exploit or was disclosed as a security issue.

Lower-prioritydocker: Install arch independent libraries separatelyby ShahanaFarooqui · 2ee3f452 · Nov 7, 2025 · 1 fileMessage 50 · ThinInformational 11Details
Commit message · ShahanaFarooqui

docker: Install arch independent libraries separately

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

This commit changes how Docker builds install packages for cross-compilation. It splits one package-installation step into two: first installing a Python development package that works on any CPU architecture, then installing libraries specific to the target CPU architecture. This is a build-system cleanup and does not appear to be a security fix.

Lower-prioritymakefile: Change hardcoded homebrew pathsby Sangbida Chaudhuri · f485eab8 · Nov 7, 2025 · 1 fileMessage 68 · AdequateInformational 19Details
Commit message · Sangbida Chaudhuri

makefile: Change hardcoded homebrew paths

We're removing the hardcoded homebrew paths for openssl and sqlite as those folder paths may not be correct for all macOS users. Instead we are now calling brew --prefix to get the correct path and use that to populate the LDFLAGS and CPPFLAGS

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

This commit changes how the build system finds two software libraries (OpenSSL and SQLite) on Apple Silicon Macs. Previously, the Makefile used fixed paths like /opt/homebrew/opt/openssl@3. Now it asks Homebrew where those libraries actually live. This is a build-portability fix, not a security patch for a vulnerability. It does not change any runtime code that handles money, network messages, or cryptography.

Lower-prioritycrates: bump cln-grpc-plugin to v0.5.0by daywalker90 · 9d897b07 · Nov 7, 2025 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · daywalker90

crates: bump cln-grpc-plugin to v0.5.0

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 version bump for an internal Rust crate called cln-grpc-plugin, changing its declared version from 0.4.0 to 0.5.0. It also fixes a minor whitespace issue in a dependency line. There is no functional code change and no indication of a security fix or vulnerability.

AI review queuedtests: don't assume newaddr returns bech32 by default.by Rusty Russell · 1e7ffeb8 · Nov 7, 2025 · 12 filesMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

tests: don't assume newaddr returns bech32 by default.

Either use p2tr (if not elements) or explicitly ask for a bech32 address.

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

This commit only changes test code. It updates how tests request Bitcoin addresses so they explicitly ask for the address type they want (bech32 or taproot/p2tr) instead of relying on a default. There is no change to production wallet or node code, and no security vulnerability is present in the diff.

AI review queuedwallet: make `p2tr` the default address for newaddr.by Rusty Russell · c9fdf60a · Nov 7, 2025 · 4 filesMessage 73 · AdequateInformational 22Details
Commit message · Rusty Russell

wallet: make `p2tr` the default address for newaddr.

Of course we still have to return a `bech32` for the deprecation period.

Changelog-Added: JSON-RPC: `newaddr` will now return a `p2tr` field by default.
Changelog-Deprecated: JSON-RPC: `newaddr` returning a `bech32` field if `addresstype` is not specified (use `p2tr`).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

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

This change makes the Bitcoin Taproot address format (p2tr) the new default when users call the `newaddr` command, instead of the older bech32 format. The old bech32 default is kept as a deprecated option for one release cycle so existing integrations don't break immediately. This is a routine modernization, not a security fix.

Lower-prioritybookkeeper: don't flood logs if we have many channelmoves all at once.by Rusty Russell · 1dda0c07 · Nov 4, 2025 · 1 fileMessage 73 · AdequateInformational 18Details
Commit message · Rusty Russell

bookkeeper: don't flood logs if we have many channelmoves all at once.

Since we're synchronous, these only reach lightningd after we're done:
in the case of 1.6M channelmoves, that can give it major heartburn.

In practice, this reduces the first bkpr command on a fresh upgrade
from 349 to 235 seconds (but this was before other improvements we did
this release).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Plugins: `bookkeeper` reduced logging for large imports to increase speed.

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

This commit is a performance improvement, not a security fix. It changes the bookkeeper plugin so that when it processes a very large number of channel movements at once, it only writes detailed debug logs for the first and last one instead of every single one. This reduces log flooding and speeds up the first bookkeeper command after an upgrade. There is no indication this change addresses a vulnerability or security flaw.

Lower-prioritysql: only create sql indices after initial load of data.by Rusty Russell · fc2fb7cd · Nov 4, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

sql: only create sql indices after initial load of data.

This makes a big difference for large tables. Consider 1.6M channelmoves,
which took 82 seconds to populate, now takes 17 seconds:

Before:
plugin-sql: Time to call listchannelmoves: 10.380341485 seconds
plugin-sql: Time to refresh channelmoves: 82.311287310 seconds

After:

plugin-sql: Time to call listchannelmoves: 9.962815480 seconds
plugin-sql: Time to refresh channelmoves: 15.711549299 seconds
plugin-sql: Time to refresh + create indices for channelmoves: 17.100151235 seconds

tests/test_coinmoves.py::test_generate_coinmoves (50,000):
Time (from start to end of l2 node): 27 seconds
Worst latency: 16.0 seconds

Changelog-Changed: Plugins: `sql` initial load for tables is much faster (e.g 82 to 17 seconds for very large channelmoves table).
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 change is a performance optimization for the Core Lightning SQL plugin. It delays creating database indexes until after a table's data has been loaded for the first time, rather than creating indexes before loading. This makes initial data imports much faster (for example, one large table now loads in 17 seconds instead of 82 seconds). There is no security issue here.

Lower-prioritylightningd: fix case where injectpaymentonion failure results in listsendpays "pending".by Rusty Russell · ac605683 · Nov 4, 2025 · 2 filesMessage 81 · StrongLow 33Details
Commit message · Rusty Russell

lightningd: fix case where injectpaymentonion failure results in listsendpays "pending".

If we failed after we register (e.g. channeld not available), we don't
mark it failed. We shouldn't register until we've definitely created
the htlc.

Changelog-Fixed: `xpay` would sometimes leave payment parts status `pending` in failure cases (as seen in listpays or listsendpays).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: https://github.com/ElementsProject/lightning/issues/8629

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 · Low 33/100

This commit fixes a bookkeeping bug in Core Lightning's payment handling. When a developer/admin command called `injectpaymentonion` failed to actually send the payment (for example, because the peer's channel daemon wasn't reachable), the software had already marked the payment as 'pending' in its records. The fix moves the registration step to after the actual HTLC (payment packet) is successfully created, so failed attempts no longer show up as stuck pending payments in `listsendpays` or `listpays`.

Lower-prioritypytest: test that we correctly mark a payment part failed if we cannot queue it to the channeld for the peer.by Rusty Russell · 350578d7 · Nov 4, 2025 · 1 fileMessage 75 · AdequateInformational 12Details
Commit message · Rusty Russell

pytest: test that we correctly mark a payment part failed if we cannot queue it to the channeld for the peer.

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

This commit only adds a new automated test to the project's test suite. It does not change any production code, so by itself it cannot introduce or fix a live security issue. The test checks that a specific payment function reports a failure correctly when a peer connection drops at a particular moment.

Lower-priorityplugins/bcli: use -stdin to feed arguments, in case we have a giant tx.by Rusty Russell · 43d7db75 · Nov 3, 2025 · 3 filesMessage 81 · StrongLow 33Details
Commit message · Rusty Russell

plugins/bcli: use -stdin to feed arguments, in case we have a giant tx.

```
lightningd-1 2025-10-27T11:26:04.285Z **BROKEN** plugin-bcli: bitcoin-cli exec failed: Argument list too long
```

Use -stdin to bitcoin-cli: we can then handle arguments of arbitrary length.

Fixes: https://github.com/ElementsProject/lightning/issues/8634
Changelog-Fixed: plugins: `bcli` would fail with "Argument list too long" when sending a giant tx.

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 · Low 33/100

This commit fixes a bug in Core Lightning's bitcoin-cli plugin (bcli) where very large transactions could make the plugin crash with an 'Argument list too long' error. The fix passes large arguments through standard input instead of the command line, which avoids operating system limits on command-line length. It is a reliability fix rather than a security vulnerability that can be exploited by an attacker.

Security candidatecommon: remove tal_check() call on libwally allocations.by Rusty Russell · 48c3df91 · Nov 3, 2025 · 1 fileMessage 83 · StrongInformational 19Details
Commit message · Rusty Russell

common: remove tal_check() call on libwally allocations.

We call it once at the end, but calling on each allocation is
excessive, and it shows when dealing with large PSBTS. Testing a
700-input PSBT was unusably slow without this: after this the entire
test ran in 9 seconds.

Changelog-Fixed: JSON-RPC: Dealing with giant PSBTs (700 inputs!) is now much faster.
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
Why it was queued
signing boundary
AI analysis · Informational 19/100

This change removes a repeated internal sanity check that was making very large Bitcoin transaction templates (PSBTs with hundreds of inputs) extremely slow to process. It is a performance fix, not a security fix. The remaining single check at the end still catches the same class of problems, just less frequently.

Security candidatepytest: test for bcli crash with huge PSBTs.by Rusty Russell · 5d64eb9a · Nov 3, 2025 · 1 fileMessage 70 · AdequateLow 34Details
Commit message · Rusty Russell

pytest: test for bcli crash with huge PSBTs.

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

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
signing boundary
AI analysis · Low 34/100

This commit adds a test that checks whether Core Lightning's bitcoin backend plugin (bcli) crashes when handling very large transactions. The test is marked as expected to fail for now, meaning the underlying crash bug is known but not yet fixed. It does not itself change production code.

AI review queuedbookkeeper: fix assert() which happens with parallel queries.by Rusty Russell · bd179832 · Nov 3, 2025 · 2 filesMessage 73 · AdequateLow 43Details
Commit message · Rusty Russell

bookkeeper: fix assert() which happens with parallel queries.

```
bookkeeper: plugins/bkpr/bookkeeper.c:1226: parse_and_log_chain_move: Assertion `e->db_id > bkpr->chainmoves_index' failed.
bookkeeper: FATAL SIGNAL 6 (version v25.09-245-g901714b-modded)
0x5d7d8718b40f send_backtrace
common/daemon.c:36
0x5d7d8718b4ab crashdump
common/daemon.c:81
0x7a6086c4532f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7a6086c9eb2c __pthread_kill_implementation
./nptl/pthread_kill.c:44
0x7a6086c9eb2c __pthread_kill_internal
./nptl/pthread_kill.c:78
0x7a6086c9eb2c __GI___pthread_kill
./nptl/pthread_kill.c:89
0x7a6086c4527d __GI_raise
../sysdeps/posix/raise.c:26
0x7a6086c288fe __GI_abort
./stdlib/abort.c:79
0x7a6086c2881a __assert_fail_base
./assert/assert.c:96
0x7a6086c3b516 __assert_fail
./assert/assert.c:105
0x5d7d8717505d parse_and_log_chain_move
plugins/bkpr/bookkeeper.c:1226
0x5d7d871754f4 listchainmoves_done
plugins/bkpr/bookkeeper.c:169
0x5d7d87182a4b handle_rpc_reply
plugins/libplugin.c:1072
0x5d7d87182b5c rpc_conn_read_response
plugins/libplugin.c:1361
0x5d7d871ba660 next_plan
ccan/ccan/io/io.c:60
0x5d7d871bab31 do_plan
ccan/ccan/io/io.c:422
0x5d7d871babee io_ready
ccan/ccan/io/io.c:439
```

Reported-by: @michael1011
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: plugins: assertion crash in bookkeeper when fresh records arrive while multiple queries in progress.

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 · Low 43/100

This commit fixes a crash in Core Lightning's bookkeeper plugin. Under parallel queries, a bookkeeping record could arrive out of order, triggering an internal 'assertion' that immediately killed the plugin. The fix replaces the fatal assertion with a safe early return when an out-of-order race occurs, and removes the 'expected failure' marker from the related test so it now passes.

Lower-prioritypytest: test for parallel bookkeeper queries.by Rusty Russell · c3869955 · Nov 3, 2025 · 1 fileMessage 70 · AdequateLow 29Details
Commit message · Rusty Russell

pytest: test for parallel bookkeeper queries.

If both refresh new events, we will get an assertion:

```
```

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

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Low 29/100

This commit only adds a new test case for the bookkeeper plugin. The test runs two list-income queries at the same time and is currently marked as expected to fail (xfail), meaning the underlying crash or assertion failure it checks for has not been fixed yet. The commit itself does not change any production code, so it cannot directly fix a vulnerability.

Lower-priorityaskrene: implement 10-second deadline.by Rusty Russell · 07c57b60 · Nov 3, 2025 · 6 filesMessage 78 · AdequateLow 46Details
Commit message · Rusty Russell

askrene: implement 10-second deadline.

We have another report of looping. This maxparts code is being completely
rewritten, but it's good to have a catchall for any other cases which might
emerge.

I had to make it customizable since our tests under valgrind are SLOW!

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 · Low 46/100

This commit adds a 10-second safety cutoff to the routing plugin (askrene) that calculates payment paths in the Core Lightning node. Previously, the routing algorithm could keep looping or running for a long time while trying to find a way to send a payment. The change makes it stop and report failure if it exceeds the configured time limit, with a default of 10 seconds. It also exposes a new node option, askrene-timeout, so operators can adjust or disable it. This is a defensive hardening change rather than a fix for a specific remote exploit.

Lower-priorityaskrene: fix infinite loop if refine_flows() cuts down our last flow with 1 remaining before maxparts.by Rusty Russell · 03d38b61 · Nov 3, 2025 · 4 filesMessage 73 · AdequateLow 47Details
Commit message · Rusty Russell

askrene: fix infinite loop if refine_flows() cuts down our last flow with 1 remaining before maxparts.

1. We would find a flow.
2. refine_flow would reduce it so it doesn't deliver enough.
3. So we need to find another, but we are at the limit.
4. So we remove the flow we found.
5. Goto 1.

This can be fixed by disabling a channel which we caused us to reduce the flow,
so we should always make forward progress.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Plugins: `askrene` could enter an infinite loop when maxparts is restricted.

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

This commit fixes a bug in Core Lightning's `askrene` routing plugin where the program could get stuck in an infinite loop while trying to find payment routes. The loop happened when the route-finder kept finding a path, the path was then reduced because one channel couldn't handle the amount, and the reduced path was discarded because it was the only one found and the user had limited how many route pieces (maxparts) could be used. The fix marks the problematic channel as disabled so the algorithm makes forward progress instead of repeating the same dead-end path forever. It is a denial-of-service/availability issue rather than a loss-of-funds or code-execution vulnerability.

Lower-prioritypytest: test for askrene infinite loop with maxparts set.by Rusty Russell · 6b480c74 · Nov 3, 2025 · 1 fileMessage 75 · AdequateInformational 23Details
Commit message · Rusty Russell

pytest: test for askrene infinite loop with maxparts set.

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

This commit adds a new test case that demonstrates an apparent bug in Core Lightning's routing plugin (cln-askrene). When asked to find payment routes with a limit of two parts (maxparts=2), the plugin can enter an infinite loop instead of cleanly failing. The test is marked as expected to fail for now, meaning the underlying bug is not fixed by this commit—it is only being documented/reproduced.

Lower-prioritypytest: test for blockheight entries in bookkeeper being saved across restart.by Rusty Russell · 5f2e3248 · Nov 3, 2025 · 1 fileMessage 75 · AdequateInformational 11Details
Commit message · Rusty Russell

pytest: test for blockheight entries in bookkeeper being saved across restart.

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. It does not change any production code. The test is currently marked as expected to fail (xfail), meaning it documents a known bug where the bookkeeper plugin does not preserve certain block-height records after a node restart. By itself, this commit does not fix or introduce any security issue.

Lower-prioritybookkeeper: fix restoration of derived wallet blockheights on restart.by Rusty Russell · 5106440c · Nov 3, 2025 · 2 filesMessage 73 · AdequateInformational 21Details
Commit message · Rusty Russell

bookkeeper: fix restoration of derived wallet blockheights on restart.

We complain:
```
lightningd-1 2025-10-31T00:55:00.377Z **BROKEN** plugin-bookkeeper: Unparsable blockheight datastore entry: {"key":["bookkeeper","blockheights","756999f870a7a7c97f5c143f12b9096a50d1b1acd74aeb9ab2dc251a5c361494"],"generation":0,"hex":"00000067"}
```

And we don't have the blockheight:

```
{
'account': 'external',
- 'blockheight': 103,
? - -
+ 'blockheight': 0,
'credit_msat': 555555000,
'currency': 'bcrt',
'debit_msat': 0,
'origin': 'wallet',
'outpoint': '756999f870a7a7c97f5c143f12b9096a50d1b1acd74aeb9ab2dc251a5c361494:0',
'tag': 'deposit',
'timestamp': 1761872097,
'type': 'chain',
},
```

Reported-by: @michael1011
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Plugins: `bookkeeper` now correctly restores chain event blockheights it has derived.

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

This commit fixes a bookkeeping bug in Core Lightning's bookkeeper plugin. On restart, the plugin was reading the wrong part of a stored data key when trying to restore transaction block heights, causing it to log a 'BROKEN' error and set block heights to 0. The fix is a one-line change correcting an array index offset. It is a data-integrity/functional bug, not an exploitable security vulnerability.

Lower-priorityRemove libsodium and lowdown submodules to fix recursive cloneby Erick Cestari · c70b70b6 · Oct 31, 2025 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Erick Cestari

Remove libsodium and lowdown submodules to fix recursive clone

These submodules were causing failures during recursive git clone
operations. The submodule entries were still registered in the git
tree even though they were removed from .gitmodules, causing:
"fatal: No url found for submodule path 'external/lightning/external/libsodium'"
and similar errors for lowdown.

This removes both submodule references from the git index to resolve
recursive submodule initialization failures (exit code 128).

Changelog-None

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

This commit removes two leftover git submodule references (libsodium and lowdown) from the repository index. The submodules had already been removed from the project's configuration file, but their entries were still stuck in git's internal records, causing 'recursive clone' operations to fail with an error. The change only fixes a source-code checkout/build problem and does not alter any running code, cryptography, or network behavior.