LDK
← All projectsLightning Dev Kit

rust-lightning

Composable Rust libraries for building Lightning wallets, nodes, and services.

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

303security candidates262second-pass queue1610AI analyses
180commits · 30 days
268commits · 60 days
647commits · 180 days
1326commits · 365 days
Backfill bands
Aug 5 → Feb 6819 seen18 candidatesComplete
Feb 6 → Jun 6468 seen16 candidatesComplete
Jun 6 → Jul 6128 seen8 candidatesComplete
Jul 6 → Aug 561 seen3 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
717Strong · 80–100
856Adequate · 60–79
302Thin · 40–59
62Opaque · 0–39
3security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Matt Corallo59681421876
Elias Rohrer15415153667
auto-pr-bot571823287
Jeffrey Czyz19645182169
Wilmer Paulino15945155169
Valentine Wallace15715145169
Leo Nash11613116162
Vincenzo Palazzo11311183
Joost Jager16324162069
elnosh401434059
shaavan22622069
wpaulino2059082
Analysis record

Published AI watches

Last scanned 24 minutes ago

Low 29 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Make Path and Route fields private' (#5068)

This commit makes the internal fields of two data structures, Path and Route, private and adds controlled constructors and read-only accessors. It also adds validation so that empty paths or routes are rejected. The change is primarily a d…

Encapsulation of previously public struct fieldsAddition of input validation in constructors (non-empty hops/paths)Deserialization now rejects invalid empty paths/routes
8f8f95a2by Matt Corallo+83−205 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Populate non-witness UTXOs in bump PSBTs' (#5471)

This change fixes how transaction fee-bumping PSBTs (Partially Signed Bitcoin Transactions) are built in LDK. Previously, when a non-witness UTXO (a non-SegWit coin) was used as an input, the PSBT only had a witness UTXO field populated fo…

PSBT input metadata correctness fixNon-witness UTXO now populated for legacy inputs in fee-bump transactionsAffects CPFP anchor and HTLC transaction signing paths
f1688ce6by Matt Corallo+4−21 file
No security note in commit
Moderate 66 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Track refused monitor updates as pending until persisted' (#5663)

This commit fixes a bug in the Lightning Dev Kit's handling of channel monitor updates that are refused because the channel's funding transaction was already spent on-chain. Previously, such refused updates were persisted as a full monitor…

Durability ordering bug: later MonitorEvent::Completed could imply earlier refused update was persistedRefused monitor update may carry forwarded HTLC preimage, creating risk of inconsistent state across restartAsynchronous persistence tracking gap for refused updates
ea277539by Matt Corallo+56−354 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Expand coverage of splices confirmed before tx_signatures complete' (#5691)

This commit only adds and modifies test code in rust-lightning. It expands test coverage for a specific edge case in Lightning channel splicing: when a splice transaction gets confirmed before both peers have finished exchanging signatures…

11a8e901by Val Wallace+102−411 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct FeeEstimator docs on the 253 sat/kW lower bound

This is a documentation-only edit. It corrects a misleading comment in the code that wrongly claimed all fee estimates returned to LDK are forced to be at least 253 satoshis per 1000 weight units. The new comment clarifies that this minimu…

ea2051feby auto-pr-bot+9−31 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Track splice confirmation while awaiting tx_signatures' (#5570)

This change fixes a bug in Lightning Dev Kit's splicing logic. During a splice, one side can broadcast the new funding transaction as soon as it has the other side's signatures. Previously, if that transaction confirmed on-chain before the…

State-machine inconsistency in channel funding lifecycleMissing chain-source watch for in-flight splice funding transactionPotential failure to send splice_locked after splice confirms during signature exchange
ca778e61by Matt Corallo+245−32 files
No security note in commit
Moderate 63 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Account for current HTLC fees in dust exposure' (#5690)

This change fixes how Lightning nodes calculate the financial risk from tiny ('dust') HTLCs when the current on-chain fee rate is higher than the node's own local fee estimate. Previously, the code only considered a buffered fee rate when …

Incorrect fee exposure accounting for dust HTLCsPotential to accept HTLCs whose commitment/HTLC-success fees exceed their value under current feerateEconomic griefing / forced-channel-closure cost manipulation
cc798f60by Matt Corallo+108−382 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Replace cloned array literal with slice::from_ref in reload test' (#5689)

This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.

03ca832fby Matt Corallo+1−11 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Replace cloned array literal with slice::from_ref in reload test

This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and …

93e0129cby auto-pr-bot+1−11 file
No security note in commit
Informational 12 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix CI: rebuild test coin-selection impl and rework reused-ID balance test' (#5684)

This commit is a test-only fix for a broken continuous integration (CI) build. It updates a test mock to match a new function signature and rewrites an existing test to use three nodes instead of two so the test scenario remains valid unde…

17bac68aby Matt Corallo+26−202 files
No security note in commit
Moderate 68 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Guard pending closing signatures before channel_ready' (#5681)

This change fixes a Lightning channel bug where a malicious peer could renegotiate the closing transaction fee while the local node was still waiting for its own signer to produce the final signature. If allowed, the local node might combi…

State-machine guard expansion to prevent fee renegotiation while a closing signature is pendingRisk of combining mismatched signatures across different closing feesRegression test demonstrates malicious peer renegotiation attempt and expected warning rejection
a01273a2by Matt Corallo+169−21 file
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Release wallet UTXOs when FundingBuilder rejects a coin selection' (#5634)

This change fixes a wallet bug in rust-lightning where a UTXO could be selected for a Lightning funding transaction, then rejected because its previous transaction was too large to fit in a Lightning peer message. Previously, that rejectio…

API change to CoinSelectionSource::select_confirmed_utxos adding max_input_prevtx_serialized_lenWalletSync filters UTXOs by prevtx serialized length before selectionFundingBuilder enforces Lightning tx_add_input message-size limit at selection time
56054190by Matt Corallo+148−155 files
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Refuse to pay BOLT 12 invoices with records above experimental range

This commit hardens LDK's BOLT 12 payment logic so it refuses to pay invoices containing very large unknown record types (4 billion and up). These records are legal under the Lightning spec, but LDK doesn't understand them, so the change t…

Defensive refusal to pay invoices with unknown high-numbered TLV recordsReuses existing UnknownRequiredFeatures failure path instead of adding a new oneAdds explicit checks before payment state insertion and route construction
2970372fby auto-pr-bot+106−177 files
No security note in commit
Moderate 64 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Read invoice TLV records above the experimental range

This commit fixes a backward-compatibility bug in LDK's BOLT 12 invoice parser. A previous change had capped the range of 'experimental' TLV record types at 4 billion, but the Lightning spec imposes no upper bound. As a result, invoices cr…

Backward-compatibility regression in deserialization of persisted channel monitorsDenial-of-service via unreadable monitor blocking all channel monitoringSpec compliance fix: TLV record types have no upper bound
9e28db58by auto-pr-bot+133−84 files
No security note in commit
High 74 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to sign messages that collide with gossip serializations' (#5677)

This change fixes a security issue where a signed text message could be crafted so that its prefixed form looks exactly like a Lightning 'node_announcement' gossip message. Because both use the same double-SHA256 hash and the same signing …

Signature replay / message confusion between signed messages and gossip announcementsForged `node_announcement` signatures via chosen-prefix message constructionNew validation rejects prefixed messages that deserialize as `UnsignedNodeAnnouncement`
ec40e097by Matt Corallo+74−148 files
Vendor flagged security relevance
Low 37 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Retry a single HTLC before abandoning an unfundable batch' (#5406)

This change fixes a corner case in how the Lightning node tries to claim multiple pending HTLCs (small Bitcoin payments locked in a channel) when the wallet cannot fund a single large batch transaction. Previously, if the multi-HTLC batch …

Funds-recovery robustness improvement: prevents premature abandonment of a single unbatched HTLCChange in error-handling arithmetic from checked_sub/saturating_sub with max(1)New unit tests covering both failed and successful singleton HTLC funding paths
643e8684by wpaulino+119−21 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to persist fresh monitors that alias archived monitors' (#5645)

This change prevents a Lightning node from accidentally overwriting an archived copy of a channel's security monitor with a brand-new one that happens to use the same identifier. In the old code, if a new channel reused the same identifier…

Data-loss prevention: stops archived ChannelMonitor from being overwritten by a later channel with the same keySafety guard added to both sync and async persistence pathsPersistence refusal surfaces as InProgress/UnrecoverableError rather than silent overwrite
3c606c11by Matt Corallo+298−332 files
No security note in commit
Moderate 52 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Handle fee multiplication overflow when merging MPP paths' (#5288)

This change fixes a place in the Lightning payment routing code where adding up fees could overflow the maximum number a computer can store in a 64-bit integer. Previously, the code assumed this could never happen and would crash (panic) i…

Integer overflow in fee computationPreviously unreachable!() panic path reachableMPP path merge could trigger overflow
25f8a740by Matt Corallo+42−171 file
No security note in commit
Low 43 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Resume channels stuck awaiting a completed monitor persistence on reload' (#5610)

This commit fixes a bug where a Lightning node could get stuck after restarting. If the node crashed or restarted while it was still saving the initial channel monitor to disk, and that save later finished in another process, the restarted…

Fixes a state-machine stall on node reload that could leave channels non-functionalRemoves an overstrict assertion that would panic on a legitimate post-reload stateAdds explicit detection of monitor persistence completed in a prior process
11815ed1by Matt Corallo+334−74 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Correct KeysManager docs on spliced channels' remote_key derivation' (#5609)

This change only updates documentation and code comments in the Lightning Dev Kit library. It clarifies that a particular key-derivation setting is fixed when a channel is first opened and is not changed by splicing. No code behavior was a…

83a4d243by Matt Corallo+17−91 file
No security note in commit
Repository ledger

Explore captured commits

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

Lower-priorityConvert InboundHTLCRemovalReason fields to structby Joost Jager · fb1fd4c5 · Nov 26, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Joost Jager

Convert InboundHTLCRemovalReason fields to struct

Preparation for serializing the enum. The serialization macros do not
support multiple unnamed fields.

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

This commit is a straightforward internal code cleanup in the Lightning Dev Kit's channel handling code. It changes how data is packaged inside an internal enum (InboundHTLCRemovalReason) from unnamed tuples to named struct fields, so that future serialization code can handle it more easily. There is no change to security logic, no bug fix, and no externally visible behavior change.

Lower-priorityln: enforce trampoline onion recipient constraintsby Carla Kirk-Cohen · 785c7813 · Nov 25, 2025 · 2 filesMessage 83 · StrongModerate 61Details
Commit message · Carla Kirk-Cohen

ln: enforce trampoline onion recipient constraints

Tests are added to cover validation of blinded and unblinded trampoline
payloads against their outer onion. These are consolidated with our
existing coverage for successful receives.

Co-authored-by: Arik Sosman <git@arik.io>
Co-authored-by: Maurice Poirrier <mpch@hey.com>

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

This commit adds safety checks in the Lightning Dev Kit (LDK) to ensure that the inner 'trampoline' payment instructions match the outer onion packet's amounts and deadlines. Without these checks, a malicious or buggy sender could craft a trampoline payment where the outer layer promises one amount or deadline while the inner layer demands a higher one, potentially allowing a node to be tricked into accepting or relaying an inconsistent payment. The patch enforces that the outer onion's amount and CLTV expiry are at least as large as the trampoline onion's, and adds tests for underpayment and deadline mismatch cases.

Lower-priorityAdd millisatoshi truncation 0FC test vectors from the specby Leo Nash · fd122059 · Nov 20, 2025 · 1 fileMessage 75 · AdequateInformational 12Details
Commit message · Leo Nash

Add millisatoshi truncation 0FC test vectors from the spec

Millisatoshi truncation also contributes to the value of the anchor
output on a zero-fee commitment transaction.

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
fuzzing or regression evidence
AI analysis · Informational 12/100

This commit only adds new test cases to the project's test suite. It does not change any production code. The tests verify that the software correctly handles tiny fractions of Bitcoin (millisatoshis) when building special zero-fee Lightning commitment transactions, including cases where dust amounts add up. There is no indication of a security fix or vulnerability being patched here.

Lower-priorityAdd funding redeem script to `SplicePending' eventby benthecarman · e3ebe7a8 · Nov 20, 2025 · 3 filesMessage 50 · ThinInformational 19Details
Commit message · benthecarman

Add funding redeem script to `SplicePending' event

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

This commit adds the funding redeem script (the cryptographic lock script for a Lightning channel's funding output) to the SplicePending event that LDK emits when a splice is being negotiated. It is an API/data-visibility change, not a logic fix. There is no direct evidence in the commit that this resolves a security vulnerability; it appears to give downstream wallet software the information it needs to recognize and spend the new funding output after a splice.

Lower-priorityAdd funding redeem script to `ChannelDetails` and `ChannelPending` eventby benthecarman · add202ea · Nov 20, 2025 · 6 filesMessage 93 · StrongInformational 19Details
Commit message · benthecarman

Add funding redeem script to `ChannelDetails` and `ChannelPending` event

Original context and motivation comes from here: https://github.com/lightningdevkit/ldk-node/pull/677#discussion_r2505405974

When splicing-in, the default case is our channel utxo + our wallet utxos
being combined. This works great however, it can give our wallet issues
calculating fees after the fact because our wallet needs to know about
our channel's utxo. We currently have it's outpoint and satoshi value
available, but not its output script so we are unable to construct the
TxOut for the channel. This adds the redeem script to the
`ChannelDetails` and `ChannelPending` event which gives us enough
information to be able to construct it.

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
AI analysis · Informational 19/100

This commit adds a new piece of public information—the funding redeem script—to two existing data structures that describe Lightning channels. It does not change how funds are secured, how transactions are signed, or how peers communicate. It simply lets downstream wallet software reconstruct the channel's funding transaction output so it can calculate fees more accurately when splicing funds into a channel. There is no indication this fixes a vulnerability or introduces a new attack path.

Lower-priorityln: add trampoline LocalHTLCFailureReason variants per specby Maurice · 269eb6b5 · Nov 20, 2025 · 1 fileMessage 73 · AdequateInformational 19Details
Commit message · Maurice

ln: add trampoline LocalHTLCFailureReason variants per spec

This commit adds three new local htlc failure error reasons:
`TemporaryTrampolineFailure`, `TrampolineFeeOrExpiryInsufficient`,
and `UnknownNextTrampoline` for trampoline payment forwarding failures.

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

This commit adds three new error-code labels used when a Lightning payment fails while being forwarded through a special routing feature called Trampoline payments. It is essentially a standards-compliance update that maps new internal reasons to the correct numeric failure codes and serialization IDs. There is no direct evidence this fixes an active security bug or vulnerability.

Lower-priorityln/fmt: clean up ugly formatting of do_test_trampoline_unblinded_receiveby Carla Kirk-Cohen · 26a2222c · Nov 20, 2025 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · Carla Kirk-Cohen

ln/fmt: clean up ugly formatting of do_test_trampoline_unblinded_receive

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

This commit is purely a code cleanup: it tidies up formatting in a test function and extracts a small helper to reduce repetition. There is no change to production behavior, no bug fix, and no security relevance.

Lower-priorityln/fmt: remove rustfmt::skip from do_test_trampoline_unblinded_receiveby Carla Kirk-Cohen · 8c9e01e2 · Nov 20, 2025 · 1 fileMessage 77 · AdequateInformational 15Details
Commit message · Carla Kirk-Cohen

ln/fmt: remove rustfmt::skip from do_test_trampoline_unblinded_receive

Remove skip without fixing up any of the ugly formatting, so that the
diff is a bit more readable in review.

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

This commit is purely a code-formatting cleanup in a test file. It removes a directive that told the Rust formatter to ignore a particular test function, then re-wraps long lines so the code follows normal style rules. No program behavior, logic, or security-sensitive code is changed.

Lower-priorityln/fmt: move rustfmt_skip to per-function in blinded_payment_testsby Carla Kirk-Cohen · e11b30c2 · Nov 20, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Carla Kirk-Cohen

ln/fmt: move rustfmt_skip to per-function in blinded_payment_tests

To allow formatting on new code, move to per-function skips.

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

This commit is a code-style cleanup in a test file. It removes a file-wide directive that told the Rust formatter to ignore the file, and instead marks individual helper functions to skip formatting. The actual test logic and program behavior are unchanged.

AI review queuedSupport async fetching of commitment point during channel reestablishby Wilmer Paulino · 1f7b2490 · Nov 18, 2025 · 3 filesMessage 73 · AdequateLow 42Details
Commit message · Wilmer Paulino

Support async fetching of commitment point during channel reestablish

`HolderCommitmentPoint` currently tracks the current and next point used
on counterparty commitments, which are unrevoked. When we reestablish a
channel, the counterparty sends us the commitment height, along with the
corresponding secret, for the state they believe to be the latest. We
compare said secret to the derived point we fetch from the signer to
know if the peer is being honest.

Since the protocol does not allow peers (assuming no data loss) to be
behind the current state by more than one update, we can cache the two
latest revoked commitment points alongside `HolderCommitmentPoint`, such
that we no longer need to reach the signer asynchronously when handling
`channel_reestablish` messages throughout the happy path. By doing so,
we avoid complexity in needing to pause the state machine (which may
also result in needing to stash any update messages from the
counterparty) while the signer response is pending.

The only remaining case left to handle is when the counterparty presents
a `channel_reestablish` with a state later than what we know. This can
only result in two terminal cases: either they provided a valid
commitment secret proving we are behind and we need to panic, or they
lied and we force close the channel. This is the only case we choose to
handle asynchronously as it's relatively trivial to handle.

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: broader security terminologysecond-pass: security-sensitive path
AI analysis · Low 42/100

This commit improves how the Lightning node handles reconnections after a network interruption. Previously, when re-establishing a channel, the node sometimes had to ask an external signer for a cryptographic proof point and could not proceed until the signer responded. The change keeps the two most recent revoked proof points cached locally so the common case no longer needs to wait for the signer. It only defers to the signer asynchronously in the rare 'stale state' case, where the peer claims our node is behind. That stale case either proves data loss (causing a protective panic) or proves the peer is lying (causing a force-close). The commit is a defensive hardening/feature change, not a fix for an active exploit.

AI review queuedRustfmt modified fnsby Joost Jager · a6812c8e · Nov 18, 2025 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Joost Jager

Rustfmt modified fns

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

This commit is purely a code-formatting cleanup. It removes `#[rustfmt::skip]` annotations from a few functions in the Lightning channel manager and lets rustfmt reformat the code. No logic, behavior, or security properties of the program change.

Lower-priorityDeduplicate node id and payment hash loggingby Joost Jager · 2f6b1976 · Nov 18, 2025 · 3 filesMessage 80 · StrongInformational 15Details
Commit message · Joost Jager

Deduplicate node id and payment hash logging

Now that the default Display implementation of Record also outputs
structured log fields, that data can be removed from the log messages.
This declutters the log output and also helps with verticality in the
code.

Note that deduplication is only carried out for log statements that are
always called in a log context. For some statements this isn't the case
because not every caller sets up the context. Those are left unchanged.

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 is a code cleanup change. It removes repeated node IDs and payment hashes from individual log messages because the logging framework now automatically includes those details as structured fields. No security vulnerability is fixed or introduced; it only makes log output less cluttered.

Lower-priorityln/test: add new test vector for v3 duplicate dustby Carla Kirk-Cohen · 19946610 · Nov 18, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Carla Kirk-Cohen

ln/test: add new test vector for v3 duplicate dust

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
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit only adds a new unit test to the Lightning Dev Kit codebase. It does not change any production code, fix a bug, or alter behavior. The test exercises a specific scenario involving small ('dust') HTLCs in a v3 commitment transaction. There is no security-relevant change in the diff itself.

Lower-priorityAdd support for `Testnet4`by Elias Rohrer · 743f43fc · Nov 18, 2025 · 4 filesMessage 58 · ThinInformational 20Details
Commit message · Elias Rohrer

Add support for `Testnet4`

We simply add support for `bitcoin::Network::Testnet4`, which was added
with release v0.32.4, which we hence deem the new minimal requirement
for `lightning` and `lightning-invoice`.

As other Lightning implementations seem to simply map `Testnet4` coins
to be `Testnet` (also reusing the `tb` prefix), we here follow their
lead and choose not to introduce a separate `Currecy` variant, even
though that could lead to checks failing if someone validated the
returned `fallback_addresses` for the given `Network`.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
defensive validation
AI analysis · Informational 20/100

This commit adds support for Bitcoin's new Testnet4 network in the rust-lightning library. It mainly bumps a dependency version and maps Testnet4 invoices to use the existing Testnet currency type. The change is a routine compatibility update, not a security fix, though it removes a fallback that previously treated unknown networks as regtest.

AI review queuedInline error variableby Joost Jager · f63066ef · Nov 18, 2025 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Joost Jager

Inline error variable

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

This is a trivial code cleanup: a developer removed a temporary variable that held an error message and instead put the message text directly into the logging call. The program's behavior, error messages, and security posture are unchanged.

Lower-priorityMove `ChannelError`-handling logic down in `channelmanager.rs`by Matt Corallo · 2a650256 · Nov 17, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Move `ChannelError`-handling logic down in `channelmanager.rs`

In the next commit we'll functionize some of the
`ChannelError`-handling logic, requiring it have access to
`handle_new_monitor_update_locked_actions_handled_by_caller!` which
thus needs to be defined above it.

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

This commit is a pure code reorganization: it moves several large blocks of macro definitions lower in the same file so that a later commit can reuse them more easily. No behavior, logic, or security properties of the code change.

Lower-priorityFunctionize the FUNDED cases in `convert_channel_err`by Matt Corallo · 252a75a5 · Nov 17, 2025 · 1 fileMessage 73 · AdequateInformational 13Details
Commit message · Matt Corallo

Functionize the FUNDED cases in `convert_channel_err`

`convert_channel_err` is used extensively in `channelmanager.rs`
(often indirectly via `try_channel_entry`) and generates nontrivial
code (especially once you include `locked_close_channel`). Here we
take the `FUNDED` cases of it and move them to an internal function
reducing the generated code size.

On the same machine as described two commits ago, this further
reduces build times by about another second.

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

This commit is a code cleanup that moves some repeated logic into a new helper function. It does not change what the program does; it only reorganizes how the code is structured to make builds slightly faster. There is no indication of a security fix.

Lower-priorityFunctionize the UNFUNDED case in `convert_channel_err`by Matt Corallo · 0b0b56ba · Nov 17, 2025 · 1 fileMessage 73 · AdequateInformational 14Details
Commit message · Matt Corallo

Functionize the UNFUNDED case in `convert_channel_err`

`convert_channel_err` is used extensively in `channelmanager.rs`
(often indirectly via `try_channel_entry`) and generates nontrivial
code (especially once you include `locked_close_channel`). Here we
take the `UNFUNDED` case of it and move them to an internal
function reducing the generated code size.

On the same machine as described three commits ago, this further
reduces build times from the previous commit by about another
second.

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

This commit is a pure code cleanup: it extracts the handling of unfunded channels from a large macro into a small internal function. There is no change to user-visible behavior, no bug fix, and no security relevance.

Lower-priorityInline `locked_close_channel` in the new `convert_*_channel_err`by Matt Corallo · b6974a02 · Nov 17, 2025 · 1 fileMessage 73 · AdequateInformational 14Details
Commit message · Matt Corallo

Inline `locked_close_channel` in the new `convert_*_channel_err`

Now that `convert_channel_err` is primarily in two functions,
`locked_close_channel` is just a dumb macro that has two forms,
each only called once. Instead, drop it and inline its contents
into `convert_*_channel_err`.

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

This commit is a straightforward code cleanup: it removes a small internal macro and copies its contents directly into the two functions that used it. There is no change in behavior, no bug fix, and no security-relevant change. It is purely a refactoring to make the code easier to read and maintain.

Lower-priorityFormat `convert_*_channel_err` code moved out of macroby Matt Corallo · 7cea2e93 · Nov 17, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Format `convert_*_channel_err` code moved out of macro

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

This commit is purely a code formatting and minor refactoring change. It splits a few long single-line expressions into multiple shorter lines and introduces temporary variables for readability. There is no functional change, no bug fix, and no security relevance.

Lower-priorityFormat the code moved in the previous commitby Matt Corallo · 4e4e34e3 · Nov 17, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Matt Corallo

Format the code moved in the previous commit

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

This commit is purely a code-formatting cleanup of a macro and a few nearby functions in the Lightning channel manager. It renames local variables for brevity, wraps long argument lists, and shortens a couple of log/debug strings. There is no functional change and no security relevance.

Lower-priorityMove unlocked part of `handle_monitor_update_completion` into an fnby Matt Corallo · 639e2bae · Nov 17, 2025 · 1 fileMessage 83 · StrongInformational 14Details
Commit message · Matt Corallo

Move unlocked part of `handle_monitor_update_completion` into an fn

The `handle_monitor_update_completion` macro is called from a
number of places in `channelmanager.rs` and dumps quite a bit of
code into each callsite. Here we take the unlocked half of
`handle_monitor_update_completion` and move it into a function in
`ChannelManager`.

As a result, building the `lightning` crate tests after a
single-line `println` change in `channelmanager.rs` was reduced by
around a full second (out of ~28.5 originally) on my machine using
rustc 1.85.0. Memory usage of the `expand_crate` step went from
+554MB to +548MB in the same test.

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

This commit is a straightforward code cleanup: it takes a large block of code that was duplicated inside a macro and moves it into a regular function. The behavior is unchanged; the change only reduces compile time and memory usage slightly. There is no security fix or vulnerability here.

Lower-priorityLog structured peer id, channel id and payment hashby Joost Jager · 053933b5 · Nov 17, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Joost Jager

Log structured peer id, channel id and payment hash

Since most log messages no longer include the channel ID in their text,
this commit updates the test logger to output the structured channel ID
instead. The ID is truncated for readability. Similarly peer id and
payment hash are logged.

Co-authored-by: Matt Corallo <git@bluematt.me>

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 only changes how log messages are formatted. It makes peer IDs, channel IDs, and payment hashes appear more clearly in log output so developers and operators can more easily trace what a log entry refers to. There is no security vulnerability or behavior change to the Lightning protocol itself.

Security candidateRemove redundant channel ID loggingby Joost Jager · 65f7f7f3 · Nov 17, 2025 · 10 filesMessage 78 · AdequateInformational 15Details
Commit message · Joost Jager

Remove redundant channel ID logging

Previously, log messages often included the channel ID both in the
message text and in the structured `channel_id` field. This led to
redundant information and made it difficult to quickly identify which
log lines pertain to a given channel, as the ID could appear in
different positions or sometimes not at all.

This change removes the channel ID from the message in all cases where
it is already present in the structured field. A test run was used to
verify that the structured field always appeared in these log calls.
Some exceptions remain—for example, calls where the structured field
contains a temporary channel ID and the message contains the final ID
were left unchanged.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
boot or update path
AI analysis · Informational 15/100

This commit is a straightforward cleanup of log messages. It removes duplicate channel IDs from the text of log lines when the same ID is already attached as a structured field. There is no change to program logic, network behavior, cryptography, or access control. It only affects what developers and operators see in logs, making them more consistent and easier to read.

Lower-priorityUnify test logger outputby Joost Jager · 30715f58 · Nov 14, 2025 · 5 filesMessage 53 · ThinInformational 15Details
Commit message · Joost Jager

Unify test logger output

Now that we have Display implemented on Record, the various
test logger implementations can make use of that.

53/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit is a minor code cleanup in test-only logging code. It replaces several hand-written log formatting blocks with a single shared Display implementation for log records. There is no functional change to production code and no security relevance.