EP
← All projectsElements Project

Core Lightning

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

BitcoinLightning NetworkActive incident
Repository coverage

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

228security candidates319second-pass queue1977AI analyses
99commits · 30 days
229commits · 60 days
709commits · 180 days
1578commits · 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.

71/100 average clarity
628Strong · 80–100
1399Adequate · 60–79
272Thin · 40–59
31Opaque · 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.
cdecker331217581
daywalker9019315113471
Níckolas Goline961252376
Amperstrand322278
Rusty Russell96977961173
Sangbida Chaudhuri18537157167
Vincenzo Palazzo19714185
Lagrang3115679170
dovgopoly18016165
Dusty Daemon821378066
ShahanaFarooqui931093063
Peter Neuroth1469110074
Analysis record

Published AI watches

Last scanned 18 minutes ago

Informational 15 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: bring lightning-downgrade's version list up to v26.12.

This commit only updates documentation. It adds new version entries to the manual page for the lightning-downgrade tool and mentions the tool in the upgrade guide. No code, database logic, or security behavior is changed.

2e7a9f5aby Ken Sedgwick+9−12 files
No security note in commit
Informational 23 AI analysisMessage 66 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Makefile: install lightning-downgrade.

This is a packaging/build fix, not a security vulnerability. The `lightning-downgrade` utility was being compiled but accidentally left out of the list of programs installed by `make install`. As a result, official release archives contain…

06ea9ba0by Ken Sedgwick+1−01 file
No security note in commit
Low 27 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: create bwatch tables before backfilling them

This commit fixes a database upgrade bug in Core Lightning. Wallets created with version v26.06.10 were missing two new tables (our_outputs and our_txs) because they skipped the migrations that create them. When users later upgraded, a fol…

Database migration failure could prevent node startup after upgradeFixes missing table creation before data backfillAdds regression test for upgrade path from v26.06.10
ce2a6836by daywalker90+105−02 files
No security note in commit
Informational 15 AI analysisMessage 5 · Opaque
EP Elements ProjectCore Lightning BitcoinLightning Network

v26.12rc1

This commit is a routine version bump from v26.06.10 to v26.12rc1 for Core Lightning. It only updates version strings in packaging files, a changelog, and a lockfile. There are no code changes that introduce, fix, or modify any security-se…

4002c4e9by Níckolas Goline+164−1110 files
No security note in commit
Low 30 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: store payment failure details per groupid

This commit fixes a database bug in Core Lightning where failure details for a payment attempt were being overwritten by later retry attempts that shared the same payment identifier fragment. The fix makes the failure record match on an ad…

Data integrity bug causing incorrect error reporting across payment retry groupsNo memory safety, authentication, authorization, or cryptographic issues presentNo external input is trusted or validated differently
24082c6dby daywalker90+6−34 files
No security note in commit
Low 43 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

cln-plugin: do not panic when the log writer task is gone

This commit fixes a bug in Core Lightning's Rust plugin library where a plugin could crash with a panic if it tried to log a message after the internal log-writing task had already stopped, such as during shutdown. The fix makes the plugin…

panic on send failure replaced with stderr fallbacklog message no longer silently dropped on writer task exitunit test added for dropped-receiver scenario
8661ffabby cdecker+29−11 file
No security note in commit
Informational 15 AI analysisMessage 90 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

docs: explain hsmtool HTLC recovery

This commit only adds documentation to the manual page for an existing command-line tool (hsmtool). It explains how to recover funds from old Lightning payment commitments (HTLCs) after losing channel state. There are no code changes, no n…

f90c140dby Sangbida Chaudhuri+85−01 file
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: make test_delpay_works deterministic

This commit only changes a test file to make a flaky test more reliable. It does not modify any production code, so it has no security impact on real users.

a224ca81by daywalker90+16−161 file
No security note in commit
Informational 20 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: say that listtransactions gives blockheight 0 for a tx not in a block

This commit only updates documentation to explain that the `listtransactions` command reports a block height and transaction index of 0 when a transaction is not currently in a block (for example, because it hasn't been mined yet or was re…

bc281be3by Peter Neuroth+4−42 files
No security note in commit
Informational 20 AI analysisMessage 50 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

fixup! pyln-client: don't crash Millisatoshi.to_approx_str() on zero

This is a small bug fix in a Python helper library used by Core Lightning. The Millisatoshi.to_approx_str() method previously crashed with a math error when converting a zero amount to a human-readable string. The patch makes zero return "…

No security-relevant signals presentFix is a routine correctness/robustness improvement
02612ed5by Amartya Singh+4−31 file
No security note in commit
Moderate 62 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: reject unmodifiable PSBTs in addpsbtoutput/addpsbtinput

This update fixes a crash in two wallet commands, addpsbtoutput and addpsbtinput. These commands let users add extra transaction outputs or inputs to a PSBT (a Bitcoin transaction planning file). If a user supplied a PSBT whose version 2 '…

Daemon crash (assertion failure) on crafted/strict PSBT inputMissing validation of PSBT v2 modifiable flags before mutationUser-controlled input directly passed to libwally without precondition check
42472816by daywalker90+14−12 files
Vendor flagged security relevance
Moderate 59 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: show addpsbtoutput/addpsbtinput crash on an unmodifiable v2 PSBT

This commit only adds a new test case that demonstrates two Core Lightning commands, addpsbtoutput and addpsbtinput, crash with an internal assertion when given a v2 PSBT that does not allow adding inputs or outputs. The test is marked as …

Daemon abort due to failed assertion in PSBT helper functionsRPC commands addpsbtoutput and addpsbtinput lack validation of PSBT modifiability flags before calling libwallyPotential denial-of-service vector: any caller able to submit a crafted v2 PSBT can crash lightningd
42e268abby daywalker90+60−01 file
No security note in commit
Informational 20 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

pyln-client: don't crash Millisatoshi.to_approx_str() on zero

This commit fixes a minor bug in Core Lightning's Python client library where calling a pretty-printing method on a zero-amount payment would crash with a ValueError. It is a routine correctness fix, not a security vulnerability. There is …

5ebe365dby Amartya Singh+3−12 files
No security note in commit
Moderate 59 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

dualopen and splicing: add minimal verification of tx_signatures

This commit adds missing safety checks in Core Lightning when a peer sends signatures for opening or splicing a dual-funded Lightning channel. Before the patch, the software accepted peer-provided transaction witnesses without verifying th…

Missing input validation on peer-provided witness dataBOLT-2 compliance fix for tx_signaturesRejection of empty witness stacks
c6be4f71by Lagrang3+633−97 files
Vendor flagged security relevance
Moderate 54 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

channeld: abort_channels no longer fails a channel with a signed splice

This fix prevents a user-issued 'abort channels' command from incorrectly failing a Lightning channel when a splice transaction has already been signed. Previously, the code would pass the latest in-flight splice to a routine that aborts i…

Denial-of-service/availability impact: user-initiated abort could inadvertently fail a funded channelProtocol compliance fix: avoids sending tx_abort after tx_signatures, which BOLT 2 forbidsState-handling bug in splice negotiation lifecycle
c87f5573by Andezion+22−11 file
No security note in commit
Moderate 51 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: fix crash on mutual close of an unconfirmed dual-funded channel

This update fixes a bug where a specific type of Lightning channel close could crash the node. It only happens when both parties cooperatively close a dual-funded channel that has not yet been confirmed and has gone through a funding bump …

NULL pointer dereference leading to daemon crash (denial of service)Crash occurs in cooperative-close path for unconfirmed dual-funded/RBF channelsFix uses canonical channel funding key instead of splice-only field
555143beby Sangbida Chaudhuri+9−31 file
Vendor flagged security relevance
High 74 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

cln-grpc: reject malformed request values instead of panicking

This commit fixes a security bug in Core Lightning's gRPC plugin (cln-grpc). Previously, a malformed request from a gRPC client could crash the plugin: bad public keys, hashes, secrets, channel IDs, or enum values triggered Rust 'unwrap()'…

Denial-of-service via malformed gRPC request causing tonic worker task panicDenial-of-service via std::process::exit(1) in ProofField conversion on missing oneofSilent integer truncation of u16/u8 fields via 'as' casts
b2703436by daywalker90+1558−12135 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 51 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

nix: drop protobuf again

This commit removes the protobuf package from the Nix build environment because it is no longer needed. A previous change made the cln-grpc component use its own bundled protoc compiler instead of relying on the system one. The Python bind…

a0459eeeby Peter Neuroth+0−11 file
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

make: check gRPC protos for breaking changes against the last release

This commit adds a new automated check to the project's build process that compares gRPC protocol definitions against the last release to catch accidental breaking changes early. It does not change any runtime code, fix a bug, or introduce…

db5fea70by daywalker90+43−84 files
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-prioritylightningd: test for very long log entriesby Lagrang3 · a9b43851 · Aug 4, 2026 · 1 fileMessage 78 · AdequateModerate 62Details
Commit message · Lagrang3

lightningd: test for very long log entries

We were using vasprintf to generate the log line and then using free to
deallocate the string. However, in the case of a very long log line
a new pointer was created with tal_fmt and then tried to use free on it.

This was introduced in commit: 4d8f923a9a1468b8987dbb48e8fc988747f8c62f

```
free(): invalid pointer
lightningd: FATAL SIGNAL 6 (version v26.06-21-gebc5dc2)
0x563dab20be43 send_backtrace
common/daemon.c:38
0x563dab20becd crashdump
common/daemon.c:83
0x7f0cf0c96def ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f0cf0ceb95c __pthread_kill_implementation
./nptl/pthread_kill.c:44
0x7f0cf0c96cc1 __GI_raise
../sysdeps/posix/raise.c:26
0x7f0cf0c7f4ab __GI_abort
./stdlib/abort.c:77
0x7f0cf0c80290 __libc_message_impl
../sysdeps/posix/libc_fatal.c:134
0x7f0cf0cf5464 malloc_printerr
./malloc/malloc.c:5832
0x7f0cf0cfa41b _int_free_check
./malloc/malloc.c:4560
0x7f0cf0cfa41b _int_free
./malloc/malloc.c:4692
0x7f0cf0cfa41b __GI___libc_free
./malloc/malloc.c:3476
0x563dab19be60 logv
lightningd/log.c:688
0x563dab19c0bc log_
lightningd/log.c:728
0x563dab1c1047 plugin_log_handle
lightningd/plugin.c:530
0x563dab1c5801 plugin_notification_handle
lightningd/plugin.c:609
0x563dab1c5a9a plugin_read_json
lightningd/plugin.c:753
0x563dab2388a5 next_plan
ccan/ccan/io/io.c:60
0x563dab238c83 do_plan
ccan/ccan/io/io.c:422
0x563dab238d3c io_ready
ccan/ccan/io/io.c:439
0x563dab239e5b io_loop
ccan/ccan/io/poll.c:470
0x563dab194399 io_loop_with_timers
lightningd/io_loop_with_timers.c:22
0x563dab199c29 main
lightningd/lightningd.c:1480
0x7f0cf0c80ca7 __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f0cf0c80d64 __libc_start_main_impl
../csu/libc-start.c:360
0x563dab169020 ???
_start+0x20:0
0xffffffffffffffff ???
???:0
```

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

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

This commit adds a test that reveals Core Lightning can crash when a plugin produces an extremely long log message. The crash happens because the logging code sometimes allocates memory using one method but tries to free it with another, leading to an invalid-pointer error and an abort. The commit only adds the failing test; it does not include the actual fix, so the vulnerability remains unpatched in this commit.

Security candidatetests: add regression test for hsmtool commands with passphraseby ekzyis · 8c42be35 · Aug 3, 2026 · 1 fileMessage 60 · AdequateInformational 12Details
Commit message · ekzyis

tests: add regression test for hsmtool commands with passphrase

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
access controlfuzzing or regression evidencesigning or wallet path
AI analysis · Informational 12/100

This commit only adds and updates a regression test in the project's test suite. It checks that the hsmtool utility correctly handles both empty and non-empty passphrases when working with BIP39 mnemonic-based wallet secrets. There is no change to the actual hsmtool or wallet code, so it does not introduce or fix a live security vulnerability on its own.

Security candidatelightning-hsmtool: Fix getsecret does not show mnemonic after typing passphraseby ekzyis · 8480f6c2 · Aug 3, 2026 · 1 fileMessage 65 · AdequateLow 25Details
Commit message · ekzyis

lightning-hsmtool: Fix getsecret does not show mnemonic after typing passphrase

Changelog-Fixed: `lightning-hsmtool`: `getsecret` does not show mnemonic after typing passphrase

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
access control
AI analysis · Low 25/100

This is a bug fix in a command-line helper tool used by Core Lightning node operators. The `getsecret` command was accidentally refusing to show the wallet recovery words (mnemonic) when the wallet was protected by a passphrase. After the fix, users who correctly type their passphrase can see their mnemonic again. There is no attacker-controlled path; it is a usability/availability issue for legitimate owners, not a security vulnerability that lets someone steal funds.

Lower-prioritylightningd: update graceful notifications when HTLC states changeby Ken Sedgwick · 2e5bc4fc · Aug 3, 2026 · 2 filesMessage 91 · StrongInformational 17Details
Commit message · Ken Sedgwick

lightningd: update graceful notifications when HTLC states change

The graceful command notifies watchers about the closest-expiry HTLC,
including its state, whenever that message changes. But nothing
re-evaluated the message when an HTLC changed state: only HTLC
removal, peer disconnect and another graceful invocation re-ran the
check. If graceful was invoked while a commitment dance was in
flight, the initial notification named a transient state (e.g.
RCVD_ADD_REVOCATION) and no follow-up ever announced the settled
state.

test_graceful_htlc waits for exactly that follow-up (since 6994681ae
"flake: Fix test_graceful_htlc to be flexible for notifs"), so it
times out whenever graceful catches the dance mid-flight, which
valgrind CI runs make likely. In one CI failure graceful caught the
outgoing HTLC in RCVD_ADD_REVOCATION, the dance completed 600ms
later, and no notification followed for the remaining 180 seconds.

Re-check graceful progress in the handlers that advance HTLC states
(peer_sending_commitsig, peer_got_commitsig, peer_got_revoke). The
check is a no-op unless a graceful command is outstanding, and
identical messages are already deduplicated.

The dance now generates transient-state notifications, so rewrite the
test to match expected notifications as an ordered subsequence
instead of by exact index. That also removes two accidents the old
indexing depended on: the RCVD_ADD_REVOCATION special case (the
settled state now always notifies), and the wait for a notification
after l1's disconnect, which was really satisfied by the graceful(1)
call's own initial notification arriving on the shared rpc socket --
the disconnect itself never notifies, since the message text
describes the still-connected peer l3 and does not change.

Fixes: https://github.com/ElementsProject/lightning/issues/9219
Changelog-Fixed: JSON-RPC: `graceful` notifications now update when a pending HTLC changes state.

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

This commit fixes a notification bug in Core Lightning's `graceful` JSON-RPC command. The `graceful` command tells users about the next pending payment (HTLC) that is closest to expiring, including its current state. Previously, if a user ran `graceful` while a channel update was in progress, the notification could show a temporary state (like RCVD_ADD_REVOCATION) and never update again when the HTLC reached its final settled state. The fix re-checks and sends updated notifications whenever HTLC states advance during the normal commitment dance. There is no security vulnerability here; it is a correctness and test-flakiness fix for user-facing status notifications.

Lower-priorityxpay: add traces for paymentsby Lagrang3 · 1e871ffd · Aug 3, 2026 · 1 fileMessage 80 · StrongInformational 15Details
Commit message · Lagrang3

xpay: add traces for payments

Produce traces (see common/trace.h) for every payment in order to gather
statistics about the duration of a full payment execution.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 15/100

This commit adds diagnostic tracing to the xpay plugin so developers can measure how long payments take. It does not change payment behavior, network handling, or access controls. There is no security issue visible in the change.

Lower-priorityxpay: added subtrace to measure getroutesby Lagrang3 · 5870ffb8 · Aug 3, 2026 · 1 fileMessage 60 · AdequateInformational 13Details
Commit message · Lagrang3

xpay: added subtrace to measure getroutes

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

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

This change adds a small tracing wrapper around an internal function call so developers can measure how long route-finding takes. It does not change payment logic, amounts, routing decisions, or network behavior. There is no indication it fixes a security issue or introduces a vulnerability.

Lower-priorityxpay: add sub-trace to measure injectpaymentonionby Lagrang3 · c48afd97 · Aug 3, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Lagrang3

xpay: add sub-trace to measure injectpaymentonion

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

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

This commit only adds tracing instrumentation to measure how long the injectpaymentonion operation takes in the xpay plugin. It does not change payment logic, cryptographic handling, network behavior, or access controls. There is no security issue here.

Security candidatewally: update libwally to v1.5.6by daywalker90 · 37526ca4 · Aug 3, 2026 · 2 filesMessage 76 · AdequateLow 33Details
Commit message · daywalker90

wally: update libwally to v1.5.6

This got fixed in libwally v1.5.2: https://github.com/ElementsProject/libwally-core/commit/7e483c049b0a4405801f010e60c9f0335d2a617f

```
def test_sign_signed_psbt(node_factory, bitcoind, chainparams):
l1 = node_factory.get_node()
l1.fundwallet(10**6)

psbt = l1.rpc.txprepare([{l1.rpc.newaddr('bech32')['bech32']: 10000}])['psbt']
signed_psbt = l1.rpc.signpsbt(psbt)['signed_psbt']

if TEST_NETWORK != 'liquid-regtest':
# FIXME: ideally this would succeed, as a noop. But it shouldn't crash
> with pytest.raises(RpcError):
^^^^^^^^^^^^^^^^^^^^^^^
E Failed: DID NOT RAISE <class 'pyln.client.lightning.RpcError'>
```

Changelog-Changed: Update libwally to v1.5.6
Changelog-Fixed: JSON-RPC: `signpsbt` on an already-signed PSBT with taproot paths now succeeds as a no-op instead of failing.

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet path
AI analysis · Low 33/100

This commit updates the bundled libwally library to version 1.5.6. The practical effect is that calling the JSON-RPC `signpsbt` command on a PSBT that is already signed now succeeds as a harmless no-op, instead of returning an error on Bitcoin networks. The underlying bug was in libwally's handling of duplicate Taproot keypath entries and was fixed in libwally v1.5.2.

Lower-prioritytests: fix test_low_fd_limit failing on RLIM_INFINITY platformsby Níckolas Goline · ae53e877 · Jul 31, 2026 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Níckolas Goline

tests: fix test_low_fd_limit failing on RLIM_INFINITY platforms

When RLIMIT_NOFILE hard limit is RLIM_INFINITY (macOS default) or
larger than UINT32_MAX, passing limits[1] and limits[1]+1 directly as
--dev-fd-limit-multiplier (a u32 option) causes lightningd to reject
the argument as out-of-range and exit(1), making both nodes fail to
start with "Unable to find Server started with public key" timeout.

Cap to TEST_CEILING=65536 when the hard limit is RLIM_INFINITY or
exceeds the ceiling, keeping the existing soft==hard halving path for
normal bounded limits.

Also add the test to the macOS CI list, so the platform it was broken
on now covers it.

Changelog-None

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 fixes a test that was failing on macOS and other systems where the operating system reports no practical upper bound on the number of open files (called RLIM_INFINITY). The test was passing values larger than a 32-bit unsigned integer to a command-line option that only accepts 32-bit values, causing the tested program to reject the argument and the test to time out. The fix caps the test's file-descriptor limit to 65,536 and adds the test to the macOS CI list so it stays working. There is no security issue here—only a test reliability fix.

AI review queuedopeningd: bound funding_satoshis by total bitcoin supplyby Matt Morehouse · 4b34ad33 · Jul 30, 2026 · 5 filesMessage 93 · StrongModerate 68Details
Commit message · Matt Morehouse

openingd: bound funding_satoshis by total bitcoin supply

funding_satoshis values above the total bitcoin supply were not rejected
during open_channel/accept_channel negotiation and would later cause
libwally to fail and openingd to crash during commitment transaction
construction.

Reject such funding_satoshis values immediately so that the negotiation
terminates gracefully.

Fixes: #9225
Changelog-Fixed: `openingd` no longer crashes when a peer opens a channel with a `funding_satoshis` value greater than the total bitcoin supply.

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

This update fixes a bug in Core Lightning's channel-opening code. A malicious or misconfigured peer could send an impossibly large channel funding amount. Previously, the software accepted the value during negotiation and only crashed later when it tried to build a real Bitcoin transaction. Now, these oversized values are rejected immediately and the negotiation ends cleanly instead of crashing the opening daemon.

Lower-priorityCI: restructure release workflowsby daywalker90 · 39b7f6df · Jul 30, 2026 · 10 filesMessage 70 · AdequateInformational 15Details
Commit message · daywalker90

CI: restructure release workflows

Binaries, docker images, and python packages are now separated into
build and publish flows. First everything gets built and if every build
step succeeds the publish step can continue.
Also fan out the docker build into a matrix to speed up the workflow.

Changelog-None

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit is a housekeeping change to the project's automated release pipelines on GitHub. It splits the existing release workflow into separate 'build' and 'publish' steps, adds a version/tag consistency check, and fans out Docker builds across multiple platforms. There is no change to the Core Lightning software itself, its network behavior, wallet handling, or cryptographic code.

AI review queuedDockerfile: add protobuf-compiler for vls signer stepby daywalker90 · 7f22da25 · Jul 30, 2026 · 1 fileMessage 93 · StrongInformational 15Details
Commit message · daywalker90

Dockerfile: add protobuf-compiler for vls signer step

After 608f6952ea2772a31f4699580bce75a8f82f7f1c the vls docker image build fails
because it is missing protoc.

```
> [vls-builder 9/10] RUN cargo build --release --target x86_64-unknown-linux-gnu:
177.2
177.2 Caused by:
177.2 process didn't exit successfully: `/opt/validating-lightning-signer/target/release/build/lightning-storage-server-85c73031cf3e0f51/build-script-build` (exit status: 1)
177.2 --- stdout
177.2 cargo:rerun-if-changed=proto/lss.proto
177.2 cargo:rerun-if-changed=proto
177.2
177.2 --- stderr
177.2 Error: Custom { kind: NotFound, error: "Could not find `protoc`. If `protoc` is installed, try setting the `PROTOC` environment variable to the path of the `protoc` binary. To install it on Debian, run `apt-get install protobuf-compiler`. It is also available at https://github.com/protocolbuffers/protobuf/releases For more information: https://docs.rs/prost-build/#sourcing-protoc" }
177.2 warning: build failed, waiting for other jobs to finish...
```

vls 0.14 also has an external dependency that requires protoc, so vls vendoring it would not be enough.

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

This commit fixes a Docker image build failure by adding the missing protobuf-compiler package. It is a build tooling fix with no security relevance.

Lower-prioritypyln-testing: don't let wait_for_log match its own forwarded announcementby Ken Sedgwick · ae8dee8a · Jul 30, 2026 · 3 filesMessage 100 · StrongInformational 21Details
Commit message · Ken Sedgwick

pyln-testing: don't let wait_for_log match its own forwarded announcement

An inline plugin's Plugin() object lives in the test process, and
Plugin() installs a PluginLogHandler on the root logger so that a
plugin author's logging calls reach lightningd. In the test process
that handler also forwards pyln's own machinery logs into the node's
log whenever the test-side logger emits at DEBUG. In particular
wait_for_logs() announces 'Waiting for [pattern]' with the pattern
embedded verbatim, so the announcement lands in the very log being
scanned and matches itself, silently reducing the wait to a no-op.
That let test_sendpay_notifications_nowaiter race its channel close
against the first payment (both payments then fail and the success
assertion sees an empty list); any literal-pattern wait_for_log on an
inline-plugin node is similarly voided under DEBUG logging.

Attach a filter to the inline plugin's log handler that only forwards
records originating outside the pyln packages, so author logging still
reaches the node log but pyln internals never do.

The new test covers both directions: an author log line is found by
wait_for_log, and a never-logged sentinel genuinely times out (it
matched instantly via the forwarded announcement before this fix).

The node directory embeds the test name, and this test's long name
pushes inline-plugin.sock past the AF_UNIX bind cap on some runs:
Linux's 108 bytes under liquid-regtest's longer network dir, and
Darwin's 104 with even the default path. Teach _inline_plugin() to
fall back to binding through a short symlink alias to the socket's
directory -- the same technique UnixSocket.connect already uses on
Darwin, aliasing the directory rather than the socket since bind
can't traverse a dangling final-component symlink. The socket file
still lands where the shim's cwd-relative connect expects it. The
test runs in the macOS smoke set too, so CI exercises the fallback on
the platform with the tighter cap.

Fixes: #9343
Changelog-None

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 21/100

This commit fixes a bug in Core Lightning's Python testing toolkit. When tests used an 'inline plugin' and ran with detailed (DEBUG) logging, the test helper wait_for_log() would accidentally see its own 'Waiting for...' message in the node's log and instantly match it, making the wait useless. This caused a real test failure (test_sendpay_notifications_nowaiter) because a payment raced ahead of channel setup. The patch filters out internal pyln log messages from being forwarded into the node log, so only the plugin author's own log lines go through. It also adds a workaround for long Unix socket paths on macOS/Linux so the new test can run. There is no direct security vulnerability here; it is a test-framework correctness fix that closes a small reliability hole in automated tests.

Security candidatecommon: saturate marginal_feerate() instead of overflowingby Matt Morehouse · f2a0fb2c · Jul 29, 2026 · 2 filesMessage 85 · StrongModerate 62Details
Commit message · Matt Morehouse

common: saturate marginal_feerate() instead of overflowing

marginal_feerate() computed current_feerate * 1.1 as a double and
converted the result back to u32. Since current_feerate is chosen by
the peer in open_channel or update_fee, they could choose an absurdly
high value that overflows u32 after the computation. UBSan reports:

common/fee_states.c:179:10: runtime error: 4.72446e+09 is outside the range of representable values of type 'unsigned int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior common/fee_states.c:179:10

Do the arithmetic with u64 and saturate at UINT32_MAX to avoid the
undefined behavior.

Found by fuzzing with smite.

Changelog-Fixed: JSON-RPC: `listpeerchannels` no longer derives `receivable_msat` from an overflowed fee estimate when the peer sets an absurd `feerate_per_kw`.

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
memory safetydefensive validationfuzzing or regression evidence
AI analysis · Moderate 62/100

This commit fixes a numeric overflow bug in Core Lightning's fee calculation. A peer could supply an extremely high transaction fee rate that, when increased by 10%, produced a value too large for the program's internal storage. That triggered undefined behavior (a C programming error) and could cause incorrect values, such as a distorted 'receivable_msat' shown by listpeerchannels. The fix performs the math in a larger integer type and caps the result at the maximum allowed value.

Lower-prioritytests: fix flaky test_bwatch_listwatchby Ken Sedgwick · 46702dad · Jul 29, 2026 · 1 fileMessage 76 · AdequateInformational 15Details
Commit message · Ken Sedgwick

tests: fix flaky test_bwatch_listwatch

The wallet registers its own scriptpubkey watches at node startup
since the bwatch series landed. The test anticipates them by
recording a total-count baseline first, but on a slow machine the
registration can land after the baseline is taken: an ASan CI run
caught a baseline of 0 and a final count of 105. A total-count
assertion races background registration no matter when the baseline
is read.

Count only the watches this test adds (their identifiers are
distinctive), which no background registration can perturb. The
test's per-watch assertions already work that way.

Fixes: #9360
Changelog-None

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit fixes a flaky automated test. It does not change production code or fix a security bug. The test was sometimes failing because it counted all 'watches' in a list, but the wallet also registers its own watches in the background, causing the total count to vary on slow machines. The fix makes the test count only the specific watches it creates, so it no longer races with background activity.

Lower-prioritylightningd: fail sendpay cleanly when the route does not fit the onionby Ken Sedgwick · 90c60d01 · Jul 29, 2026 · 2 filesMessage 83 · StrongModerate 66Details
Commit message · Ken Sedgwick

lightningd: fail sendpay cleanly when the route does not fit the onion

create_onionpacket returns NULL when the route's per-hop payloads
exceed the 1300-byte onion; send_payment passed the packet to
send_onion unchecked, and serialize_onionpacket dereferenced it,
killing lightningd with SIGSEGV. Observed in production on a
25-hop route submitted by a rebalancing plugin.

The sendonion path already checks this call and fails the command;
mirror it, and add a test.

Changelog-Fixed: JSON-RPC: `sendpay` with a route too long to fit the onion packet now fails cleanly instead of crashing lightningd.

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

This commit fixes a crash bug in Core Lightning's payment command. When a user or plugin submitted a payment route with too many hops to fit inside the cryptographic 'onion' envelope, the software failed to check whether the onion was actually created and then tried to use a non-existent object, causing the entire lightningd process to crash with a segmentation fault (SIGSEGV). The patch adds a simple missing check so the command now returns a clean error message instead of crashing the node.

Lower-priorityflake: fix in-flight statuses causing flakyness by waiting for all xpay-n layers to be removed from askrene before checking settlement outcomeby ScuttoZ · dafba953 · Jul 28, 2026 · 1 fileMessage 50 · ThinInformational 14Details
Commit message · ScuttoZ

flake: fix in-flight statuses causing flakyness by waiting for all xpay-n layers to be removed from askrene before checking settlement outcome

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

This commit fixes a flaky automated test, not a security bug. It adds a wait so the test only checks payment statuses after internal cleanup layers called 'xpay-<n>' have been removed. There is no change to production code or user-facing behavior.

AI review queuedwallet: handle bwatch wallet/utxo spend notificationsby Sangbida Chaudhuri · 4ba051ca · Jul 27, 2026 · 3 filesMessage 73 · AdequateInformational 24Details
Commit message · Sangbida Chaudhuri

wallet: handle bwatch wallet/utxo spend notifications

When bwatch_got_utxo() records a wallet output, it arms an outpoint
watch owned by wallet/utxo/<txid>:<outnum>. This adds the receiving
end of that watch: the dispatch entry plus the found/revert handlers.

On watch_found (a tx consumed the outpoint): mark the output spent in
our_outputs, store the spending tx in our_txs, and emit a withdrawal
coin movement. On watch_revert (a reorg removed that tx): clear
spendheight so the UTXO is spendable again.

Co-authored-by: Cursor <cursoragent@cursor.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 · Informational 24/100

This commit adds the missing bookkeeping that runs when Core Lightning's own on-chain wallet spends a UTXO. It makes the node mark the UTXO as spent, record the spending transaction, and log a withdrawal coin movement. It also handles blockchain reorgs by unmarking the UTXO so it can be spent again. There is no direct evidence this fixes an exploitable vulnerability; it appears to be a correctness/ledger-integrity improvement.

AI review queuedwallet: read UTXO state from our_outputsby Sangbida Chaudhuri · 0a10e74e · Jul 27, 2026 · 2 filesMessage 68 · AdequateLow 34Details
Commit message · Sangbida Chaudhuri

wallet: read UTXO state from our_outputs

With every writer dual-writing since the previous two commits, flip
the readers: all UTXO queries (listfunds, coin selection, reservations,
onchaind close info) now come from our_outputs, and the legacy-only
read helpers (wallet_stmt2output, gather_utxos, db_get_unspent_utxos)
are deleted.

our_output_row_to_utxo replaces wallet_stmt2output, using channel_dbid
to discriminate HD outputs from channel-close outputs, and
wallet_get_spendable_utxos centralizes the unspent+unreserved query
that wallet_find_utxo and wallet_has_funds previously duplicated.

migrate_setup_coinmoves keeps reading the legacy table directly: that
migration runs at v25.09, before our_outputs exists.

Co-authored-by: Cursor <cursoragent@cursor.com>

68/100 · AdequateMessage clarity
✓ 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 34/100

This commit switches Core Lightning's wallet code to read UTXO (unspent transaction output) data from a new database table called our_outputs instead of the older outputs table. It also deletes several old helper functions and updates tests to use the new data model. The change is part of an internal database migration and includes dual-writing safeguards so older versions of the software can still read the legacy table. There is no direct evidence in the commit of a security vulnerability being fixed.

Lower-prioritytests: query our_outputs in test_connection.pyby Sangbida Chaudhuri · 1cc6ae6e · Jul 27, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Sangbida Chaudhuri

tests: query our_outputs in test_connection.py

The wallet's live UTXO state now lives in our_outputs; point the raw-SQL
assertions at it (spent means spendheight IS NOT NULL, reserved means
reserved_til > 0).

Co-authored-by: Cursor <cursoragent@cursor.com>

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 updates test code to query a renamed database table (`our_outputs` instead of `outputs`) and adjusts column names/conditions. It does not change production wallet logic or fix a security bug. There is no security relevance.

Lower-prioritytests: query our_outputs in test_misc.pyby Sangbida Chaudhuri · 2eccf473 · Jul 27, 2026 · 2 filesMessage 78 · AdequateInformational 15Details
Commit message · Sangbida Chaudhuri

tests: query our_outputs in test_misc.py

Same raw-SQL switch as test_connection.py: read the wallet's UTXO state
from our_outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>

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 test code. It updates existing wallet tests to query a newer database table called our_outputs instead of the older outputs table, and adds one new test that checks a reorg correctly demotes a confirmed deposit back to unconfirmed without losing state. There is no change to production code, so it cannot directly affect live users or introduce a runtime security flaw.

Security candidatewallet: rename b32script to scriptpubkey in PSBT change pathsby Sangbida Chaudhuri · b8a60579 · Jul 27, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Sangbida Chaudhuri

wallet: rename b32script to scriptpubkey in PSBT change paths

Change addresses are no longer bech32-only (p2tr is the default form),
so the old name was misleading. Pure rename, no functional change;
also drop the unused txfilter.h include.

Co-authored-by: Cursor <cursoragent@cursor.com>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 15/100

This commit is a simple variable rename inside a Bitcoin/Lightning wallet file. The old name 'b32script' suggested all change addresses were bech32 format, but the project now uses a newer address type (p2tr) by default. The developer renamed the variable to 'scriptpubkey' to avoid confusion and removed an unused header file. No behavior of the program changes.

AI review queuedtests: update test_wallet.py raw-SQL queries for our_outputsby Sangbida Chaudhuri · d14ee378 · Jul 27, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Sangbida Chaudhuri

tests: update test_wallet.py raw-SQL queries for our_outputs

The wallet no longer writes UTXO state to the legacy outputs table's
status/spend_height columns, so tests that peek at the database
directly must read our_outputs instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

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 updates internal test code to query a new database table (our_outputs) instead of an old one (outputs). It does not change the actual wallet or node software that users run, so it cannot directly affect security.

Lower-prioritylightningd: only run watchman under --experimental-bwatchby Sangbida Chaudhuri · 92402cf6 · Jul 27, 2026 · 2 filesMessage 73 · AdequateLow 33Details
Commit message · Sangbida Chaudhuri

lightningd: only run watchman under --experimental-bwatch

The flag is registered by the bwatch plugin, not lightningd, so peek
at the parsed configvars. Without it ld->watchman stays NULL and the
watchman_* entry points are no-ops, leaving chain_topology as the only
chain watcher: bwatch and the legacy path must not race each other.

The bwatch pytests opt in explicitly (with rescan=0) instead of
enabling bwatch globally.

Changelog-Experimental: wallet: Add bwatch-driven wallet transaction and UTXO tracking behind --experimental-bwatch.

Co-authored-by: Cursor <cursoragent@cursor.com>

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

This commit gates a new experimental chain-watching subsystem called 'bwatch' behind an explicit --experimental-bwatch flag. Previously, the watchman helper was always created, which could have caused both the old chain watcher and the new bwatch watcher to run at the same time and race against each other. The change makes the watchman a no-op unless the user explicitly opts in, so ordinary users continue using the legacy path only.

Security candidatewallet: register scriptpubkey watches at startupby Sangbida Chaudhuri · 4a951d65 · Jul 27, 2026 · 4 filesMessage 78 · AdequateLow 44Details
Commit message · Sangbida Chaudhuri

wallet: register scriptpubkey watches at startup

init_wallet_scriptpubkey_watches walks every HD key (BIP32 + BIP86) up
to {bip32,bip86}_max_index + keyscan_gap and arms a watch for each
form, so bwatch can report deposits from the very first block it
scans. wallet_get_newindex does the same for fresh keys, keeping
coverage as the wallet grows.

The per-UTXO watch on unconfirmed change is now redundant (the
perennial per-key watch already covers that scriptpubkey), so drop it.

Co-authored-by: Cursor <cursoragent@cursor.com>

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
secret or key materialsigning or wallet path
AI analysis · Low 44/100

This change makes Core Lightning register long-lasting 'watches' for all wallet deposit addresses when the node starts up, so the new bwatch plugin can spot incoming payments from the first block it scans. It also removes a now-redundant per-transaction watch on unconfirmed change outputs. The patch is a functional improvement for the experimental bwatch feature, not a clear-cut security fix, but a missing or incomplete watch could in principle cause deposits to be overlooked.