EP
← All projectsElements Project

Core Lightning

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

BitcoinLightning NetworkNormal
Repository coverage

1853 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

158security candidates263second-pass queue197AI analyses
146commits · 30 days
225commits · 60 days
803commits · 180 days
1849commits · 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
430Strong · 80–100
1163Adequate · 60–79
231Thin · 40–59
29Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Rusty Russell9587395072
Sangbida Chaudhuri1463139066
Dusty Daemon771313066
ShahanaFarooqui931010063
daywalker908957062
Níckolas Goline4057076
Lagrang37644069
Christian Decker3645072
Vincenzo Palazzo833080
Chandra Pratap5624082
ekzyis222063
Peter Neuroth9711070
Analysis record

Published AI watches

Last scanned 48 minutes ago

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

lightningd: internal cleanups since all non-command JSON IDs are strings.

This is a routine internal cleanup commit in Core Lightning. It removes an unused helper function and simplifies how JSON-RPC request IDs are stored and formatted, since the project now always uses string IDs for non-command JSON traffic. …

No security-relevant keywords in commit title or messageNo CVE, advisory, or bug reference presentChanges are refactor/cleanup in nature
a70ae963by Rusty Russell+25−378 files
No security note in commit
Informational 23 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

downgrade: we need to remove "impressions" from askrene datastore when downgrading to v26.06.

This is a database downgrade helper fix, not a live network vulnerability. Core Lightning's downgrade tool previously failed to strip out new 'channel impression' records when rolling a database back to version v26.06. The patch teaches th…

Database downgrade path could leave incompatible records in older schemaOffline tool only; no remote or on-chain triggerFix prevents potential node startup failure after version rollback
4d926285by Rusty Russell+43−111 file
No security note in commit
Low 31 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

downgrade tool: fix invalid memory bug

This commit fixes a typo in a database downgrade helper tool. The bug caused the tool to pass a negative number (turned into a huge positive size) when copying data, which led to an out-of-memory (OOM) error. The fix swaps two variable nam…

Integer underflow / negative-to-size_t wrap leading to excessive allocationOut-of-memory crash in maintenance toolMemory corruption potential if allocation somehow succeeded
42995326by Lagrang3+8−81 file
No security note in commit
Informational 16 AI analysisMessage 90 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

add a test for downgrading askrene datastore

This commit adds a regression test for Core Lightning's database downgrade path. It ensures that when a user downgrades from an upcoming v26.09 release to an older version (v26.06), the new 'impressions' data added by the askrene routing s…

Database downgrade path for new askrene schema (impressions table)Regression test only; no production code changeNo input validation, cryptography, network, or authorization changes
1818553eby Lagrang3+156−13 files
No security note in commit
Low 25 AI analysisMessage 65 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

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

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 …

Functional bug in secret-recovery pathError path blocked legitimate mnemonic recoveryNo input validation, memory-safety, or cryptographic change
8480f6c2by ekzyis+1−21 file
No security note in commit
Informational 12 AI analysisMessage 60 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: add regression test for hsmtool commands with passphrase

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 c…

Regression test added for passphrase handling in hsmtoolNo production code changes observedTest-only change to tests/test_wallet.py
8c42be35by ekzyis+47−201 file
No security note in commit
Low 33 AI analysisMessage 76 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wally: update libwally to v1.5.6

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 Bit…

Dependency update to incorporate upstream bug fixBehavior change from error to no-op on re-signing signed PSBTsTaproot keypath handling change in upstream cryptographic library
37526ca4by daywalker90+7−82 files
No security note in commit
Low 31 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: make datastore helpers self-wrap a wallet transaction

This change fixes a crash bug in Core Lightning's wallet datastore helpers. Previously, four datastore functions required the caller to already be inside a database transaction, and would fatally crash if called outside one. The patch make…

Fixes fatal assertion/crash in database statement preparationResolves transaction-context mismatch in wallet datastore helperswatchman plugin persistence path was affected
ae1a3347by Sangbida Chaudhuri+23−11 file
No security note in commit
Informational 24 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: handle bwatch wallet/utxo spend notifications

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 bloc…

Missing spend tracking for wallet-owned UTXOs could lead to stale UTXO state or incorrect coin-movement accountingReorg handling clears spendheight, preventing a spent output from becoming permanently unspendable in the wallet's viewDefensive log_broken calls on unexpected missing UTXO or malformed watch suffix
4ba051caby Sangbida Chaudhuri+149−03 files
No security note in commit
Moderate 54 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: handle reorgs for our_outputs/our_txs by hand

This commit fixes how Core Lightning's wallet records handle blockchain reorganizations (reorgs) for two newer database tables, our_outputs and our_txs. Previously, these tables were not properly updated when blocks were removed or rolled …

Incorrect state persistence across blockchain reorgsMissing reorg handling for wallet tables without foreign-key cascadePotential stale spend/confirmation metadata in our_outputs/our_txs
bcdea215by Sangbida Chaudhuri+40−01 file
No security note in commit
Low 34 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: read UTXO state from our_outputs

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 test…

Large internal data-model migration with reader/writer split between old and new tablesDual-write mirroring to legacy outputs table for downgrade compatibilityDeletion of legacy UTXO reading helpers
0a10e74eby Sangbida Chaudhuri+433−5772 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: rename b32script to scriptpubkey in PSBT change paths

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 rena…

b8a60579by Sangbida Chaudhuri+12−141 file
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

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

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.

d14ee378by Sangbida Chaudhuri+31−281 file
No security note in commit
Low 44 AI analysisMessage 78 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: register scriptpubkey watches at startup

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 p…

Change is part of an experimental chain-watcher (bwatch) featureAdds startup registration of scriptPubKey watches for all derived wallet keysRemoves a redundant unconfirmed-change watch, relying on the new blanket coverage
4a951d65by Sangbida Chaudhuri+89−114 files
No security note in commit
Low 29 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: dual-write chaintopology UTXO changes into our_outputs

This is a database refactoring commit in Core Lightning. It makes the wallet write UTXO (unspent transaction output) state to a new table called our_outputs in addition to the legacy outputs table, while reads still use the old table. The …

Database schema migration with dual-write mirror patternNo security claim in commit title or messageNo CVE, advisory, or researcher attribution in commit metadata
824e8195by Sangbida Chaudhuri+118−162 files
No security note in commit
Low 32 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: record bwatch-discovered wallet outputs

This commit adds new wallet bookkeeping code for Core Lightning. It records Bitcoin deposits found by a new chain-watcher ('bwatch') into database tables and handles blockchain reorganizations by demoting transactions back to unconfirmed r…

New database write paths for wallet UTXOs and transactionsReorg revert logic demotes rather than deletes rows to preserve metadataOwner-string constructors added to avoid silent unwatch failures from format mismatches
bc021011by Sangbida Chaudhuri+543−07 files
No security note in commit
Low 32 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: route transaction reads/writes through our_txs

This commit changes how Core Lightning stores and reads wallet-related transactions. It moves most reads to a new table called our_txs while still keeping the old transactions table updated for compatibility. The main concern is that the c…

Dual-write consistency risk between our_txs and legacy transactions tableNew anti-downgrade logic for confirmed transactions in our_txsRemoval of legacy NULL handling for unconfirmed transactions
2c1ab4d0by Sangbida Chaudhuri+89−642 files
No security note in commit
Informational 18 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: add our_outputs + our_txs schema migrations

This commit only adds two new empty database tables (our_outputs and our_txs) to Core Lightning's wallet. It is a preparatory schema change for a future feature; no code reads from or writes to these tables yet, and no existing behavior is…

Schema-only migration with no runtime codeNew tables are not yet populated or queried by any code pathDesign note: sentinel 0 replaces NULL for blockheight/txindex/reserved_til, which could reduce NULL-handling bugs in future code
ea4d1fcaby Sangbida Chaudhuri+38−01 file
No security note in commit
Low 28 AI analysisMessage 70 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: add migrate_backfill_bwatch_tables

This commit adds a database migration that copies existing wallet data into new tables used by an upcoming 'bwatch' wallet component. It is a data backfill, not a code fix for an active vulnerability. The main risk is that if the migration…

Database migration touching wallet UTXO and transaction tablesPotential for data inconsistency if mapping logic is wrongON CONFLICT DO NOTHING prevents overwrite but could hide duplicate-key anomalies
2e23893bby Sangbida Chaudhuri+513−04 files
No security note in commit
Low 27 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: mirror bwatch writes into legacy outputs table

This change is a behind-the-scenes bookkeeping patch for Core Lightning's wallet database. The project is moving to a new table (`our_outputs`) for tracking spendable coins, but older versions of the software still read from the old table …

Race-condition guard for foreign-key-backed confirmation_height and spend_height when bwatch is ahead of chaintopologyTemporary mirroring to keep legacy outputs table consistent with new our_outputs tableON CONFLICT DO NOTHING used for legacy insert to avoid duplicate-key failures
bba68e0aby Sangbida Chaudhuri+101−62 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.

AI review queuedUpdate tests after changing deadline from `blockheight + 12` to `blockheight + 72` blocks.by Níckolas Goline · 4a0538a1 · Jun 16, 2026 · 1 fileMessage 87 · StrongInformational 15Details
Commit message · Níckolas Goline

Update tests after changing deadline from `blockheight + 12` to `blockheight + 72` blocks.

Added 60 blocks to all tests that relied on this parameter in order to fix them. i.e. 12 -> 72, 13 -> 73, etc...

87/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Explains rationale or failure mode✓ 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 test numbers to match a previously made code change that extended a timeout/deadline from 12 blocks to 72 blocks. It does not change any production code, so it cannot directly affect real users or introduce a security vulnerability.

Lower-priorityUpdate outdated BOLT quotes in several files. update BOLT quotes that drifted from the current spec without changing the meaning or expected functionality.by Níckolas Goline · 35d6dd6b · Jun 16, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline

Update outdated BOLT quotes in several files.
update BOLT quotes that drifted from the current spec without changing the meaning or expected functionality.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityUpdate outdated BOLT quotes bolt12.c: - quote update on `bolt12_chains_match`; - add a new condition to `offer_decode` to check if the amount is greater than 0;by Níckolas Goline · 1a58dd3c · Jun 16, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · Níckolas Goline

Update outdated BOLT quotes
bolt12.c:
- quote update on `bolt12_chains_match`;
- add a new condition to `offer_decode` to check if the amount is greater than 0;

run-bolt-12-encode-test.c: add check for `offer_amount > 0`

run-bolt12-format-string-test.c: update BOLT quote

bolt12-cli.c: update BOLT quote

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritygossmap_manage.c: update BOLT quote and logic to wait for 72 blocks instead of 12 blocks before forgetting a channel.by Níckolas Goline · 80f2ac64 · Jun 16, 2026 · 1 fileMessage 75 · AdequateTriage 0Details
Commit message · Níckolas Goline

gossmap_manage.c: update BOLT quote and logic to wait for 72 blocks instead of 12 blocks before forgetting a channel.

test_gossip.py: Update the tests to reflect the changes.

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Lower-priorityUpdate BOLT quotes for channel open flow. The TLV `channel_type` is now mandatory. The code was correct but the quote was not.by Níckolas Goline · b9dc9919 · Jun 16, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline

Update BOLT quotes for channel open flow.
The TLV `channel_type` is now mandatory. The code was correct but the quote was not.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityFix tests for bolt12-decode. new cases added by autogenerated mocks after updating the default BOLT spec version.by Níckolas Goline · d218756e · Jun 16, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · Níckolas Goline

Fix tests for bolt12-decode.
new cases added by autogenerated mocks after updating the default BOLT spec version.

bolt12.c: add new rules to satisfy case `offer_chains with zero entries`.

bech32_util.c: fix padding on `from_bech32_charset` to satisfy case `Bech32 padding exceeds 4-bit limit`

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-priorityUpdate BOLT quote for `channel_ready` re-transmission guards.by Níckolas Goline · 878ecdb2 · Jun 16, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · Níckolas Goline

Update BOLT quote for `channel_ready` re-transmission guards.

channeld.c: update logic to comply with BOLT quote.

tests/test_splicing.py: update test to confirm we are not re-transmiting `channel_ready` for that specific case.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritychanneld.c: update logic for retransmitting channel_ready Extracted logic from if clause to variable for readability, and add extra checks to make sure a splice is activeby Níckolas Goline · 204240c2 · Jun 16, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline

channeld.c: update logic for retransmitting channel_ready
Extracted logic from if clause to variable for readability, and add extra checks to make sure a splice is active

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityUpdate BOLT quotes channeld/channeld.c: Some BOLT quotes had changed slightly.by Níckolas Goline · f1633e0b · Jun 16, 2026 · 1 fileMessage 65 · AdequateTriage 0Details
Commit message · Níckolas Goline

Update BOLT quotes
channeld/channeld.c: Some BOLT quotes had changed slightly.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Lower-prioritytest: fix block generation in `test_close_72_block_delay` to reflect correct depthby Níckolas Goline · aa6ecad9 · Jun 16, 2026 · 1 fileMessage 72 · AdequateTriage 0Details
Commit message · Níckolas Goline

test: fix block generation in `test_close_72_block_delay` to reflect correct depth

72/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Mentions testing or verification! No meaningful explanatory body
Lower-priorityDEV.md: cheat sheet for developers and LLMs.by Rusty Russell · fb8b81d0 · Jun 16, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
Commit message · Rusty Russell

DEV.md: cheat sheet for developers and LLMs.

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

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
documentation-only discount
Lower-priorityCI: Update Mac CI to use gmakeby Dusty Daemon · aff06192 · Jun 16, 2026 · 1 fileMessage 80 · StrongTriage 0Details
Commit message · Dusty Daemon

CI: Update Mac CI to use gmake

`gmake` is kept up to date while `make` is apple’s built in mac that is not updated and very old at this point.

Changelog-None

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
Security candidatecargo: update dependenciesby daywalker90 · fe0c4522 · Jun 16, 2026 · 2 filesMessage 58 · ThinInformational 21Details
Commit message · daywalker90

cargo: update dependencies

cargo update output:
Updating bitflags v2.11.1 -> v2.13.0
Updating cc v1.2.63 -> v1.2.64
Updating chrono v0.4.44 -> v0.4.45
Updating h2 v0.4.14 -> v0.4.15
Updating http v1.4.1 -> v1.4.2
Updating js-sys v0.3.99 -> v0.3.102
Updating log v0.4.30 -> v0.4.32
Updating memchr v2.8.1 -> v2.8.2
Updating prost v0.14.3 -> v0.14.4
Updating prost-build v0.14.3 -> v0.14.4
Updating prost-derive v0.14.3 -> v0.14.4
Updating prost-types v0.14.3 -> v0.14.4
Updating regex v1.12.3 -> v1.12.4
Updating regex-syntax v0.8.10 -> v0.8.11
Updating rustls-native-certs v0.8.3 -> v0.8.4
Updating smallvec v1.15.1 -> v1.15.2
Updating wasm-bindgen v0.2.122 -> v0.2.125
Updating wasm-bindgen-futures v0.4.72 -> v0.4.75
Updating wasm-bindgen-macro v0.2.122 -> v0.2.125
Updating wasm-bindgen-macro-support v0.2.122 -> v0.2.125
Updating wasm-bindgen-shared v0.2.122 -> v0.2.125
Updating web-sys v0.3.99 -> v0.3.102
Updating yoke v0.8.2 -> v0.8.3
Updating zerocopy v0.8.50 -> v0.8.52
Updating zerocopy-derive v0.8.50 -> v0.8.52
Updating zeroize v1.8.2 -> v1.9.0

Also upgraded quick-xml to 0.40

Changelog-None

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
memory safety
AI analysis · Informational 21/100

This commit is a routine update of third-party Rust libraries used by Core Lightning's REST plugin. It bumps versions in the package lock file and raises one direct dependency (quick-xml) from 0.39 to 0.40. The commit message does not say it fixes any security bug, and no verified security advisory was supplied. Dependency updates can sometimes include security fixes, but this change alone does not demonstrate a vulnerability in Core Lightning.

Lower-priorityschemas: add offer_id to invoice_creation notificationby daywalker90 · 46b039d5 · Jun 10, 2026 · 8 filesMessage 65 · AdequateTriage 0Details
Commit message · daywalker90

schemas: add offer_id to invoice_creation notification

Also partially reverts f96099691bee5df41c4ce87f396bcabad0d547d3 which was not properly rebased

Changelog-None

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI review queuedlightningd: add send_to_bwatch and watchman_ackby Sangbida Chaudhuri · a202ae63 · Jun 10, 2026 · 1 fileMessage 80 · StrongTriage 0Details
Commit message · Sangbida Chaudhuri

lightningd: add send_to_bwatch and watchman_ack

Introduce the outbound RPC path from watchman to the bwatch plugin
plus the ack lifecycle that drops a pending op once bwatch confirms
it.

- struct pending_op carries an op_id of the form "{method}:{owner}"
(e.g. "addscriptpubkeywatch:wallet/p2wpkh/42"); method and owner
are recoverable without a separate field.
- Datastore helpers (make_key, db_save, db_remove) persist pending
ops at ["watchman", "pending", op_id] for crash recovery.
- send_to_bwatch finds the bwatch plugin via find_plugin_for_command
on the method name; if bwatch is not yet INIT_COMPLETE, the send is
silently dropped (the op stays queued and will be replayed when
bwatch comes up). Otherwise it builds a JSON-RPC request with the
owner suffix and the caller-supplied json_params body, registers
bwatch_ack_response as the callback, and sends it.
- watchman_ack searches pending_ops by op_id; on a hit it removes the
datastore entry and drops the in-memory op.

db_save and send_to_bwatch are marked __attribute__((unused)) here
because their callers (enqueue_op, watchman_replay_pending) land in
the next commit; the markers are removed there.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI review queuedlightningd: replay pending ops on plugin readyby Sangbida Chaudhuri · 549ca307 · Jun 10, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

lightningd: replay pending ops on plugin ready

Both bwatch and watchman must be crash-resistant: a watch_send or an
add_watch/del_watch op may be in flight when lightningd crashes, and
neither side is allowed to lose it. We solve this by persisting every
pending op to the datastore in enqueue_op and dropping it from the
datastore in watchman_ack. On startup load_pending_ops rebuilds the
in-memory queue from the datastore, and watchman_on_plugin_ready
replays it once bwatch reaches INIT_COMPLETE.

watchman_add cancels any prior add for the same owner; watchman_del
cancels any pending add for the same owner before queueing the
delete. This keeps the queue from accumulating stale or
self-cancelling op pairs across restarts.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
Lower-prioritylightningd: register getwatchmanheight + chaininfo bwatch RPCsby Sangbida Chaudhuri · 5b64c92b · Jun 10, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

lightningd: register getwatchmanheight + chaininfo bwatch RPCs

Register the two startup RPCs that bwatch calls on launch:

- getwatchmanheight: bwatch asks how far we've already processed the
chain so it knows what height to (re)scan from. Returns
{height, blockhash?} from wm->last_processed_{height,hash}.
- chaininfo: bwatch reports the chain name, header/block counts, and
IBD status. We fatal() on a network mismatch (wrong bitcoind),
toggle bitcoind->synced based on IBD/header-vs-block lag, fire
notify_new_block on the transition to synced, and remember the
blockcount on watchman.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritylightningd: add watchman RPC handlers and typed watch APIby Sangbida Chaudhuri · f3d1c5d6 · Jun 10, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

lightningd: add watchman RPC handlers and typed watch API

Register watch_found, watch_revert, block_processed, revert_block_processed,
getwatchmanheight, and chaininfo handlers. Add typed watchman_watch_* helpers
and the dispatch-table skeleton for future subsystem handlers.

Changelog-Added: lightningd: watchman module registers getwatchmanheight, chaininfo, watch_found, watch_revert, block_processed and revert_block_processed RPCs for bwatch plugin integration.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritylightningd: instantiate watchman at startupby Sangbida Chaudhuri · 3df0fbbb · Jun 10, 2026 · 5 filesMessage 68 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

lightningd: instantiate watchman at startup

Create watchman after setup_topology so it can queue bwatch RPC requests
and replay pending ops once the plugin is ready. No subsystems register
watches yet — that lands in the wallet migration PR.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritylightningd: add watchman.h declarationsby Sangbida Chaudhuri · 8be2335a · Jun 10, 2026 · 3 filesMessage 68 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

lightningd: add watchman.h declarations

watchman is the lightningd-side counterpart to the bwatch plugin
landed in the previous group: it tracks how far we've processed
the chain, queues outbound watch ops while bwatch is starting up,
and dispatches watch_found/watch_revert/blockdepth notifications
to subdaemon-specific handlers.

This commit adds only the public surface (struct watchman, the
three handler typedefs, and prototypes for watchman_new,
watchman_ack, watchman_replay_pending) plus an empty watchman.c
so the header is exercised by the build. Definitions land in
subsequent commits.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritylightningd: add watchman storage and persistence skeletonby Sangbida Chaudhuri · dbbd7579 · Jun 10, 2026 · 5 filesMessage 73 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

lightningd: add watchman storage and persistence skeleton

Introduce the minimal storage scaffolding for the watchman module:

- db_set_blobvar / db_get_blobvar helpers for persisting binary
values (e.g. block hashes) in the SQL `vars` table.
- load_tip(): recover last_processed_height and last_processed_hash
from the wallet db.
- apply_rescan(): honour --rescan by adjusting the loaded tip
downward (negative = absolute height, positive = N blocks back).
- watchman_new(): allocate the struct, initialise the pending-op
array, and call load_tip + apply_rescan.

Wire the watchman field into struct lightningd via a forward
declaration; instantiation at startup lands in a later commit
along with the rest of the wiring.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritycurrencyrate: propagate http errors to currencyrate rpc if a source is providedby daywalker90 · 97700774 · Jun 10, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · daywalker90

currencyrate: propagate http errors to currencyrate rpc if a source is provided

specifically coindesk was constantly hitting API rate limits causing our tests to fail
so lets unit tests all endpoints with a snapshot of real responses and only allow for http
error 401/429 in integration tests

Also fix a flake in test_bkpr_currencyrate_persisted that would pick up a cached rate from CLN's own caching

Changelog-None

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritydocker: Fix base image inconsistency in reprobuild for noble and resoluteby ShahanaFarooqui · 0b43e919 · Jun 10, 2026 · 3 filesMessage 73 · AdequateTriage 0Details
Commit message · ShahanaFarooqui

docker: Fix base image inconsistency in reprobuild for noble and resolute

Switch `Dockerfile.noble` and `Dockerfile.resolute` to noble / resolute to match the debootstrap-based minimal image approach.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Security candidatetools: Fix `sign` and `docker` target detection when passed as single argumentby ShahanaFarooqui · 19992371 · Jun 10, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · ShahanaFarooqui

tools: Fix `sign` and `docker` target detection when passed as single argument

The sign target detection uses pattern matching that requires spaces on
both sides of "sign" in the TARGETS variable. When only "sign" is passed
as an argument, TARGETS becomes " sign" (leading space only), causing
the condition to fail.

Add an additional pattern match to detect "sign" with a leading space
but no trailing space, which occurs when "sign" is the only target or
the last target in the list.

This regression seems to have been exposed by GitHub Actions runner
updates (Ubuntu 22.04 → 24.04), which changed argument passing behavior.

Changelog-None: Fixes the release signing issue in CI only.

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

This commit fixes a shell-script pattern-matching bug in the release build tool. When a maintainer ran the release script with only 'sign' or 'docker' as the target, the script failed to detect it because it expected spaces on both sides of the word. The fix adds an extra check for when the word appears at the end of the target list. It is a CI/release workflow bug, not a vulnerability in the Lightning node software itself.

Lower-prioritypytest: fix broken test_pay_bolt11_metadataby Rusty Russell · d07eb809 · Jun 9, 2026 · 1 fileMessage 58 · ThinTriage 0Details
Commit message · Rusty Russell

pytest: fix broken test_pay_bolt11_metadata

It uses a canned, but now expired invoice. Instead, use bolt11-cli to add metadata to
an existing invoice.

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

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context