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 queue137AI analyses
147commits · 30 days
225commits · 60 days
803commits · 180 days
1853commits · 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 Russell9587363072
Sangbida Chaudhuri1463129066
Dusty Daemon771310066
ShahanaFarooqui931010063
daywalker908953062
Níckolas Goline4054076
Lagrang37642069
Christian Decker3643072
Vincenzo Palazzo833080
Chandra Pratap5622082
ekzyis222063
Peter Neuroth9711070
Analysis record

Published AI watches

Last scanned 1 minute ago

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
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
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
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
Moderate 51 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: Update the max_index cache when issuing new addresses

This commit fixes a bug where Core Lightning's in-memory record of the highest address index could fall out of step with the database. When a user generated a new on-chain address, the code updated the database directly but left the cached…

Cache/database inconsistency in address index trackingPotential for stale lower index to overwrite newer persisted indexFreshly generated addresses invisible to wallet rescan/listing until restart
d05815f5by Christian Decker+37−292 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: Cache the max_index for bip32 and bip86 address indices

This commit is a straightforward performance optimization. It caches two address-index values in memory instead of reading them from the database twice for every transaction output in every scanned block. The change fixes a slowdown during…

565da833by Christian Decker+15−52 files
No security note in commit
Informational 18 AI analysisMessage 90 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

common: add randbytes() wrapper to override cryptographic entropy: $CLN_DEV_ENTROPY_SEED

This commit adds a developer-only feature that lets programmers override the randomness source used by Core Lightning during testing, via an environment variable. It is explicitly gated behind 'developer mode' and is not intended for produ…

New cryptographic-randomness override mechanism, but explicitly developer-mode onlyEnvironment-variable seeding could reduce entropy if accidentally enabled in productionNo production code changes visible in the diff
1c925e0aby Rusty Russell+29−05 files
No security note in commit
Low 37 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

common: don't consume deterministic randbytes stream for trace ids

This change fixes a subtle bug in Core Lightning's tracing code. When running with a special developer-only deterministic randomness override (CLN_DEV_ENTROPY_SEED), trace IDs were being drawn from the same predictable random stream used f…

Deterministic RNG stream contamination by observability codeTransaction output divergence between instrumented and non-instrumented buildsDeveloper-only entropy override affecting reproducibility of transaction generation
23b4b38aby ShahanaFarooqui+18−31 file
No security note in commit
Informational 19 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

common: don't trigger siphash_seed() init from span hashing either.

This is a small bug-fix commit in Core Lightning's tracing code. It fixes a situation where enabling tracing accidentally changed the sequence of random numbers used elsewhere in the program, causing test outputs to differ between builds w…

No direct memory safety issueNo input validation bypassNo authentication or authorization change
e54fe678by ShahanaFarooqui+6−01 file
No security note in commit
Informational 15 AI analysisMessage 70 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

autogenerate-rpc-examples.py: disable entropy for generation.

This commit changes Core Lightning's internal test tooling so that automatically generated RPC documentation examples use predictable randomness and a fixed clock time. It only affects test/example generation code, not the production Light…

81443075by Rusty Russell+14−12 files
No security note in commit
Informational 15 AI analysisMessage 50 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

autogenerate-rpc-examples.py: pin the full sorted UTXO set for multiwithdraw examples

This commit only changes an internal test script that automatically generates example RPC commands for documentation. It makes the examples more deterministic by explicitly selecting which coins the test wallet uses, so the generated docum…

6f464e46by ShahanaFarooqui+35−81 file
No security note in commit
Repository ledger

Explore captured commits

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

Security candidatepytest: make global exclusion for "That's weird: Request X took Y msec" under valgrind.by Rusty Russell · a9a72adc · Feb 20, 2026 · 3 filesMessage 91 · StrongInformational 15Details
Commit message · Rusty Russell

pytest: make global exclusion for "That's weird: Request X took Y msec" under valgrind.

Rather than playing whack-a-mole:

```
ERROR tests/test_misc.py::test_emergencyrecover - ValueError:
Node errors:
- lightningd-1: had BROKEN or That's weird messages
...
lightningd-1 2026-02-18T02:29:54.826Z UNUSUAL jsonrpc#76: That's weird: Request signpsbt took 7466 milliseconds
```

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

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 15/100

This is a test-only change that stops CI test failures caused by slow valgrind runs. It does not change the actual Core Lightning node software that users run, so it has no direct security impact on real systems.

Security candidatetools: delete gossip_store of needed for downgrade even if db hasn't changed.by Rusty Russell · d4c62f8c · Feb 16, 2026 · 2 filesMessage 65 · AdequateInformational 18Details
Commit message · Rusty Russell

tools: delete gossip_store of needed for downgrade even if db hasn't changed.

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

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
update trust
AI analysis · Informational 18/100

This is a small bug-fix in a downgrade helper tool. Previously, the tool only deleted an incompatible gossip data file when the database actually needed changes. Now it deletes that file even if the database is already compatible, preventing a scenario where downgrading leaves behind a gossip file that the older version cannot read. It is a correctness fix, not an exploitable security vulnerability.

Security candidatepytest: make sure to use old_hsmsecret on downgrade tests.by Rusty Russell · c7973b8a · Jan 26, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

pytest: make sure to use old_hsmsecret on downgrade tests.

We only support downgrade if you upgraded, so your hsm_secret will be old.

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
update trust
AI analysis · Informational 15/100

This change only updates a test file so that downgrade tests create nodes using an older-format secret key file. It does not change any production code, network protocol, or wallet behavior, and there is no security issue in the commit itself.

Security candidatepytest: changed old_hsmsecret to default to false.by Sangbida Chaudhuri · 1279a589 · Jan 26, 2026 · 10 filesMessage 83 · StrongInformational 15Details
Commit message · Sangbida Chaudhuri

pytest: changed old_hsmsecret to default to false.

This changes various tests in minor ways:

1. The "l2" secret key in tests/plugins/channeld_fakenet.c is updated.
2. The decompressed gossip data node id needs changing.
3. The coinmoves order changes in bookkeeper for anchors.
4. Various harcoded gossip constants change.
5. Some hardcoded makesecret results change.
6. zeroconf tests which hardcoded node ids change.
7. Arbitrary rune strings change.
8. A log message which uses node ids changes.

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
secret or key material
AI analysis · Informational 15/100

This commit only updates test files and test helpers to match a new default wallet-seed format. It does not change production code, does not fix a vulnerability, and has no direct security impact on running Core Lightning nodes.

Security candidatewallet: conduct unit tests with both bip86 and bip32.by Rusty Russell · fe5c3c95 · Jan 26, 2026 · 1 fileMessage 75 · AdequateInformational 15Details
Commit message · Rusty Russell

wallet: conduct unit tests with both bip86 and bip32.

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
Why it was queued
secret or key materialsigning or wallet path
AI analysis · Informational 15/100

This commit only changes test code. It makes the wallet unit tests run twice: once using the older BIP32 key derivation setup and once using the newer BIP86 setup. No production code is modified, so it cannot directly affect real users or introduce a runtime security flaw.

Security candidateMakefile: update next and prev versions now we've released.by Rusty Russell · ee0175b8 · Jan 20, 2026 · 7 filesMessage 85 · StrongInformational 18Details
Commit message · Rusty Russell

Makefile: update next and prev versions now we've released.

This means:
1. downgrade changes (we no longer fail due to node biases).
2. various deprecations no longer are

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

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
update trust
AI analysis · Informational 18/100

This is a routine post-release maintenance commit for Core Lightning. It updates version numbers in the build files and test infrastructure after a new release, adjusts downgrade tests to reflect that downgrading past the new release no longer fails on a recently-added database feature, and removes some temporary test workarounds for APIs that are no longer considered deprecated. There is no direct security fix here; it is housekeeping that keeps the CI and downgrade tooling aligned with the current release cycle.

Security candidatewallet/hsmd: fix signmessagewithkey for BIP86 walletsby Sangbida Chaudhuri · 5fdc56c5 · Jan 14, 2026 · 3 filesMessage 85 · StrongLow 28Details
Commit message · Sangbida Chaudhuri

wallet/hsmd: fix signmessagewithkey for BIP86 wallets

The signmessagewithkey RPC was failing for BIP86 (mnemonic-based)
wallets because:

1. The wallet RPC was iterating through BIP32-derived addresses only,
so it couldn't find BIP86-derived addresses.

2. The HSM's handle_bip137_sign_message always used bitcoin_key()
(BIP32 derivation) regardless of wallet type.

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
secret or key materialsigning or wallet path
AI analysis · Low 28/100

This commit fixes a bug where the `signmessagewithkey` RPC command did not work for newer BIP86-style wallets. Previously, the wallet RPC only searched through older BIP32-derived addresses, and the HSM signing code always used BIP32 key derivation. The fix makes both the wallet lookup and the HSM signing aware of BIP86 derivation, so users can sign messages with keys from BIP86 wallets. This is a functionality bug, not a clear security vulnerability, but it could have caused user confusion or application failures.

Security candidatejsonrpc: fix recover command for BIP86 walletsby Sangbida Chaudhuri · 0269d0c0 · Jan 14, 2026 · 1 fileMessage 78 · AdequateLow 34Details
Commit message · Sangbida Chaudhuri

jsonrpc: fix recover command for BIP86 wallets

The recover command checks if a node has already issued bitcoin
addresses before allowing recovery. This check only looked at
bip32_max_index, but with BIP86 wallets, newaddr() increments
bip86_max_index instead.

Also, the recover test asserted on hex but now it's asserting on codex32 instead. We should probably go in and fix the end point. @rustyrussell what do you think?

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 material
AI analysis · Low 34/100

This commit fixes the 'recover' command in Core Lightning so it correctly detects whether a wallet has already generated Bitcoin addresses. Previously, the check only looked at one counter used by older wallets, but a newer type of wallet (BIP86) uses a separate counter. As a result, a BIP86 wallet that had already issued addresses could wrongly be allowed to run recovery, which could overwrite or confuse wallet state. The fix adds the missing check.

Security candidatehsmd: fix derivation for non-taproot addresses in modern mnemonic (25.12+) nodes.by Rusty Russell · 9b85ce7b · Jan 14, 2026 · 1 fileMessage 91 · StrongModerate 62Details
Commit message · Rusty Russell

hsmd: fix derivation for non-taproot addresses in modern mnemonic (25.12+) nodes.

This is a fix from https://github.com/rauaap who correctly diagnosed the problem:

```
Error broadcasting transaction: error code: -26\nerror message\nmempool-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation), input 0 of ...
```

The decision to use the changed derivation for all addresses, not just
taproot, came up during review. Unfortunately, the signing code
(here) was not changed to match the address generation code (in the
wallet).

Reported-by: https://github.com/postanissue
Fixes: https://github.com/ElementsProject/lightning/issues/8804
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: lightningd: we now correctly sign for non-taproot addresses given by nodes created by v25.12 or newer.

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundary
AI analysis · Moderate 62/100

This commit fixes a bug where Core Lightning nodes created with a modern mnemonic (version 25.12 or newer) could not correctly sign transactions that spend from non-Taproot on-chain addresses. The address generation code was updated to use a new key derivation method for all address types, but the signing code still only used that method for Taproot addresses. As a result, the private key used to sign did not match the public key in the address, causing transaction broadcast failures with an OP_EQUALVERIFY script error. The fix makes the signing code use the new derivation for all address types when the node uses the modern mnemonic format.

Security candidatelightningd: use BIP86 derivation for P2TR in HTLC rebroadcast change outputsby Sangbida Chaudhuri · 4b1f2a07 · Jan 14, 2026 · 1 fileMessage 50 · ThinLow 42Details
Commit message · Sangbida Chaudhuri

lightningd: use BIP86 derivation for P2TR in HTLC rebroadcast change outputs

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundary
AI analysis · Low 42/100

This change fixes how Core Lightning derives the public key used for 'change' outputs when rebroadcasting on-chain HTLC (Hashed Time-Locked Contract) transactions that pay to a Taproot (P2TR) address. Previously, the code always used the older BIP32 derivation even when the wallet was configured for the newer BIP86 Taproot-specific derivation. Using the wrong derivation path could produce a change output that the wallet does not recognize or cannot spend later, potentially locking up funds. The patch checks whether BIP86 is available and uses it for P2TR change outputs, falling back to BIP32 otherwise.

Security candidatelightningd: use bip86 derivation for anchor spend change outputsby Sangbida Chaudhuri · fa96b601 · Jan 14, 2026 · 1 fileMessage 50 · ThinInformational 23Details
Commit message · Sangbida Chaudhuri

lightningd: use bip86 derivation for anchor spend change outputs

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing boundary
AI analysis · Informational 23/100

This small change updates how Core Lightning creates the 'change' output when spending an anchor output in a Lightning channel. It now uses a newer, Taproot-specific key derivation method (BIP86) when available, instead of the older BIP32 method. The change itself is a correctness/hardening improvement for Taproot key handling, not a fix for an active exploit or a clearly disclosed vulnerability.

Security candidatelightningd: Fix penalty tx output derivation for BIP86 walletsby Sangbida Chaudhuri · bf43fbb7 · Jan 14, 2026 · 1 fileMessage 73 · AdequateModerate 54Details
Commit message · Sangbida Chaudhuri

lightningd: Fix penalty tx output derivation for BIP86 wallets

When using the new BIP39 mnemonic HSM secret format, the wallet uses
BIP86 derivation for taproot addresses. However, onchaind_tx_unsigned() was always using bip32_pubkey() to derive the final key for penalty transaction outputs.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
secret or key material
AI analysis · Moderate 54/100

This fix corrects how Core Lightning derives wallet addresses used in penalty transactions when a newer BIP39-style secret is in use. Previously, the code always used the older BIP32 derivation even when the wallet was configured for BIP86 (taproot) addresses. That mismatch could cause penalty transaction outputs to be sent to addresses the wallet does not recognize or cannot spend, potentially making recovered funds inaccessible after a channel breach.

Security candidatepytest: don't record IO when we kill nodesby Rusty Russell · c10c54ff · Jan 14, 2026 · 2 filesMessage 78 · AdequateInformational 15Details
Commit message · Rusty Russell

pytest: don't record IO when we kill nodes

```
ERROR tests/test_connection.py::test_channel_persistence - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```

Similarly:

```
ERROR tests/test_opening.py::test_sendpsbt_crash - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```

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
Why it was queued
signing boundary
AI analysis · Informational 15/100

This change only adjusts two test cases so they no longer save plugin input/output logs before deliberately crashing a test node. It fixes flaky test failures where reading a partially-written JSON file produced a decode error. It does not change any production code or affect real users.

Security candidatepytest: fix test_bitcoin_backend_gianttx flake.by Rusty Russell · fd21b329 · Jan 8, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Rusty Russell

pytest: fix test_bitcoin_backend_gianttx flake.

signpsbt could be the one which takes a long time, so allow any
psbt event.

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

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Informational 15/100

This is a one-line change to a test file. It widens the expected log message pattern in a flaky test so that either 'fundpsbt' or 'signpsbt' slow operations are accepted, rather than only 'fundpsbt'. It does not change production code, user behavior, or security boundaries.

Security candidatepytest: fix feerate check in test_peer_anchor_pushby Rusty Russell · 8a60a276 · Jan 8, 2026 · 1 fileMessage 83 · StrongInformational 17Details
Commit message · Rusty Russell

pytest: fix feerate check in test_peer_anchor_push

We didn't log when anchor transactions had short signatures,
which causes this test to not assert (did_short_sig):

```
total_feerate_perkw = total_fees / total_weight * 1000
> check_feerate([l3, l2], total_feerate_perkw, feerate)

tests/test_closing.py:4063:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

nodes = [<fixtures.LightningNode object at 0x7f0fb322bb20>, <fixtures.LightningNode object at 0x7f0fb1b5ead0>]
actual_feerate = 14006.105538595726, expected_feerate = 14000

def check_feerate(nodes, actual_feerate, expected_feerate):
# Feerate can't be lower.
assert actual_feerate > expected_feerate - 2
if actual_feerate >= expected_feerate + 2:
if any([did_short_sig(n) for n in nodes]):
return
# Use assert as it shows the actual values on failure
> assert actual_feerate < expected_feerate + 2
E AssertionError
```

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

This commit fixes a test-only logging issue. A developer warning flag (dev_warn_on_overgrind) was not logging when an anchor transaction signature was shorter than expected, causing a pytest test to fail its feerate assertion. The fix adds a log message so the test can detect the short signature and skip the strict feerate check. There is no production security vulnerability here.

Security candidatepytest: don't get upset at slow multi-input signing under valgrind.by Rusty Russell · 7971e6aa · Jan 8, 2026 · 1 fileMessage 81 · StrongInformational 15Details
Commit message · Rusty Russell

pytest: don't get upset at slow multi-input signing under valgrind.

```
2026-01-06T07:46:35.5710043Z lightningd-1 2026-01-06T07:45:11.040Z UNUSUAL jsonrpc#68: That's weird: Request signpsbt took 5099 milliseconds
```

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

81/100 · StrongMessage clarity
✓ Specific, 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 · Informational 15/100

This is a test-only change. A developer made a test more tolerant of slow performance when the code is run under a debugging/performance-analysis tool called valgrind. It does not change the actual wallet or signing code, so it has no security impact on users.

Security candidatehsmd: check *all* anchor inputs for short sigs.by Rusty Russell · 21d4f684 · Jan 8, 2026 · 1 fileMessage 78 · AdequateInformational 19Details
Commit message · Rusty Russell

hsmd: check *all* anchor inputs for short sigs.

Anchors will have one input from the commitment tx, and at least on
more (in this case, 3 more); we were only checking the first one for
short signatures.

```
total_feerate_perkw = total_fees / total_weight * 1000
> check_feerate([l3, l2], total_feerate_perkw, feerate)

tests/test_closing.py:4064:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

nodes = [<fixtures.LightningNode object at 0x7f3e9a2c74f0>, <fixtures.LightningNode object at 0x7f3e991d5f30>]
actual_feerate = 14006.105538595726, expected_feerate = 14000

def check_feerate(nodes, actual_feerate, expected_feerate):
# Feerate can't be lower.
assert actual_feerate > expected_feerate - 2
if actual_feerate >= expected_feerate + 2:
if any([did_short_sig(n) for n in nodes]):
return
# Use assert as it shows the actual values on failure
> assert actual_feerate < expected_feerate + 2
E AssertionError
```

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

This commit fixes a test-only diagnostic check in Core Lightning's hardware signing daemon (HSM). The code warns developers if a Bitcoin signature is unusually short (a sign of 'overgrinding' during signature creation), but it only checked the first input of an anchor-spending transaction. Anchor transactions can have multiple inputs, so the check missed short signatures on the other inputs. This is a testing/quality fix, not a vulnerability that attackers can exploit.

Security candidatedocs: Updated schema for mdx compatibilityby ShahanaFarooqui · 3e841b35 · Dec 17, 2025 · 151 filesMessage 80 · StrongInformational 15Details
Commit message · ShahanaFarooqui

docs: Updated schema for mdx compatibility

Changelog-Fixed: Ensure documentation renders correctly when adding/updating new RPCs by detecting non-MDX-compatible pages.

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
signing or wallet pathboot or update pathauthentication pathparser or protocol path
AI analysis · Informational 15/100

This commit is a documentation-only change. It updates the project's documentation files and JSON schemas so that author email addresses, web links, and tables are written in a format compatible with MDX (a modern documentation rendering format). There are no changes to the actual Core Lightning software code, so it cannot affect node security, funds, or network behavior.

Security candidatechore: Downgrade tool diffby Christian Decker · 16735c95 · Dec 8, 2025 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · Christian Decker

chore: Downgrade tool diff

47/100 · ThinMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
update trust
AI analysis · Informational 15/100

This commit simply deletes a helper script named 'tools/lightning-downgrade'. No code changes to the actual Lightning node software are present, and no security issue is described or visible in the diff.

Security candidategitignore: Ignore lightning-downgrade and check-bolt toolsby ShahanaFarooqui · af5d02a9 · Dec 3, 2025 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · ShahanaFarooqui

gitignore: Ignore lightning-downgrade and check-bolt tools

Changelog-None.

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

This commit simply adds two generated tool names to .gitignore files so that Git does not accidentally track compiled binaries. It does not change any executable code, configuration defaults, or security behavior.

Security candidatewallet: separate migration table into its own source file.by Rusty Russell · 6dcf4e7b · Nov 27, 2025 · 13 filesMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

wallet: separate migration table into its own source file.

This will make it easier to share with the downgrade tool.

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

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
update trustsigning or wallet path
AI analysis · Informational 15/100

This commit is a pure code refactoring: it moves the large database migration table and related functions from wallet/db.c into a new pair of files, wallet/migrations.c and wallet/migrations.h. The goal stated in the commit message is to make the migration list easier to share with a future downgrade tool. No behavior of the migrations themselves is changed, no SQL statements are modified, and no security fixes or vulnerabilities are introduced.

Security candidatewallet: add optional sql and functions to downgrade db.by Rusty Russell · 378293d2 · Nov 27, 2025 · 1 fileMessage 73 · AdequateInformational 18Details
Commit message · Rusty Russell

wallet: add optional sql and functions to downgrade db.

This will allow a downgrade tool to attempt to downgrade a node to the
previous version.

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
update trustsigning or wallet path
AI analysis · Informational 18/100

This commit adds infrastructure to Core Lightning's database code so that future versions can, in some cases, roll back (downgrade) a database to the previous software version. It is a feature addition, not a fix for an active security bug. The new code includes safety checks to refuse downgrade when data would be lost, such as when a newly added 'withheld' column has actually been used. There is no direct evidence in the commit that this resolves a known vulnerability or that an attacker can exploit it.

Security candidateaskrene: move datastore wire functions into separate file for lightning-downgrade to use.by Rusty Russell · eb83a205 · Nov 27, 2025 · 4 filesMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

askrene: move datastore wire functions into separate file for lightning-downgrade to use.

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

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

This commit is a straightforward code reorganization: it moves existing data-serialization helper functions for the askrene plugin into a new shared file (datastore_wire.c/h) so another tool (lightning-downgrade) can reuse them. No security bug is introduced or fixed; the logic is essentially unchanged.

Security candidatewallet: separate datastore access functions for the lightning-downgrade tool to access.by Rusty Russell · 2a066b92 · Nov 27, 2025 · 8 filesMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

wallet: separate datastore access functions for the lightning-downgrade tool to access.

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

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
update trustsigning or wallet path
AI analysis · Informational 15/100

This commit is a straightforward code reorganization: it moves existing datastore (key-value storage) database access functions out of wallet.c into a new pair of files, datastore.c and datastore.h, so a separate downgrade tool can reuse them. No behavior changes, no new features, and no security fixes are visible in the diff.

Security candidatetools/lightning-downgrade: tool to downgrade (offline) v25.12 to v25.09.by Rusty Russell · 9981e238 · Nov 27, 2025 · 5 filesMessage 73 · AdequateInformational 24Details
Commit message · Rusty Russell

tools/lightning-downgrade: tool to downgrade (offline) v25.12 to v25.09.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: tools: `lightningd-downgrade` can downgrade your database from v25.12 to v25.09 if something goes wrong.

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

This commit adds a new offline command-line tool, lightning-downgrade, that lets a user roll back a Core Lightning node's database from the upcoming v25.12 release to the previous v25.09 release. It is meant as a recovery aid if an upgrade goes wrong. The tool only works when the lightning node is stopped, checks for a running process, and reverses database migrations one by one using built-in revert SQL and functions. It also deletes an incompatible gossip store file after downgrading. There is no direct evidence in the commit that this fixes an active security bug; it is a new operational utility.