LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

252security candidates228second-pass queue1525AI analyses
82commits · 30 days
182commits · 60 days
554commits · 180 days
1255commits · 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.

70/100 average clarity
474Strong · 80–100
836Adequate · 60–79
295Thin · 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.
Elias Rohrer15315153667
Matt Corallo43553371574
Jeffrey Czyz19545182169
Wilmer Paulino15945155169
Leo Nash11613116162
Valentine Wallace14511138169
Vincenzo Palazzo11311183
Joost Jager16224162069
elnosh391333058
auto-pr-bot2478087
shaavan22622069
Carla Kirk-Cohen78366068
Analysis record

Published AI watches

Last scanned 55 minutes ago

Moderate 55 AI analysisMessage 76 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Persistent `MonitorEvent`s' (#4491)

This commit makes on-chain 'MonitorEvent' notifications durable and replay-safe. Previously, if a node crashed after a ChannelMonitor persisted a block update but before the ChannelManager processed the resulting event, the event could be …

Durability/atomicity fix for async persistence: prevents lost MonitorEvents across crashesNew ack-based event lifecycle with random event IDsArchival gating on unacknowledged events to avoid losing preimage/timeout information
9a324e72by wpaulino+467−45912 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix payment attribution edge cases and simplify claiming' (#5021)

This commit refactors how LDK nodes claim incoming Lightning payments. It replaces a separate 'claim with known custom TLVs' method with an options struct passed to the normal claim call, and fixes two edge cases in payment attribution dat…

API change: claim_funds now takes ClaimFundsOptions, consolidating TLV-known behavior into one pathFailure-packet length bound added to prevent oversized onion error messagesIncoming failure packet truncated at 32 KiB before processing
ee7c61c2by Matt Corallo+256−17322 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'release utxos from failed splices' (#4973)

This change fixes a wallet bookkeeping problem in rust-lightning's built-in coin-selection wrappers. Previously, when a splice attempt failed or coin selection errored after picking UTXOs, those UTXOs stayed marked as 'reserved' in memory …

Resource exhaustion / denial-of-service via permanent in-memory UTXO reservationIncorrect state tracking in coin-selection wrapperNew API method required for correct lifecycle management (release_utxos)
7220a6fdby jkczyz+295−383 files
No security note in commit
Low 49 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Restore `Wallet` UTXO locks when coin selection fails afterwards

This commit fixes a bug in the wallet's coin-selection code. When the wallet picked UTXOs to spend, it locked them immediately so they couldn't be reused. But if a later step—fetching the change address or the previous transaction—failed, …

Resource lock leak on error pathUTXO lock state inconsistency between selection and confirmationDenial-of-service/funds-unavailability risk from persistent UTXO locks
81afd9caby elnosh+146−331 file
No security note in commit
Informational 19 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'tx-sync: Parallelize esplora status queries' (#4913)

This commit rewrites how a Lightning wallet talks to Esplora block-explorer servers so that many status checks happen in parallel instead of one at a time. It is a performance/refactoring change. There is no direct evidence in the commit t…

Concurrency/timing change in transaction confirmation logicNew inconsistency check preserved when a previously-confirmed tx is reported unconfirmedAdded defensive error path for missing pre-fetched block status
c303f515by Matt Corallo+140−371 file
No security note in commit
Low 30 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Skip Electrum creator transaction downloads' (#4992)

This change stops the Electrum-based transaction sync client from downloading the very transaction that created an output it is watching. Previously, the client could request that transaction from Electrum, even though a transaction can ne…

Avoids unnecessary Electrum transaction.get requests for watched outputsReduces information disclosure to Electrum server about watched outpointsAdds regression test verifying request suppression
c36e50cbby Matt Corallo+142−02 files
No security note in commit
Low 44 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Use preferred sPK of watched txn in electrum, not rand ones' (#4867)

This change improves how the Lightning Dev Kit's Electrum and Esplora transaction-sync clients track watched Bitcoin transactions. Previously, the code ignored the script pubkey (the 'address' associated with a transaction) supplied when r…

Previously ignored `script_pubkey` argument in `register_tx` for transaction watchersElectrum script-history queries previously used an arbitrary transaction output, which could be OP_RETURN and therefore unindexed by some Electrum serversNew logic prefers caller-supplied script pubkey and falls back to non-OP_RETURN outputs
bfe5ca89by tnull+52−243 files
No security note in commit
Low 33 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Serialize transient Event variants; move persist decision into ChannelManager' (#4791)

This commit changes how LDK stores pending event notifications. It adds serialization support for several event types that previously were not fully saved to disk, and introduces a helper method so the code can decide which events are wort…

Data-loss prevention: previously non-round-trippable event variants are now fully serialized, avoiding accidental event loss when users serialize Event queues themselvesState-consistency hardening: ChannelManager now explicitly skips events that describe non-surviving restart state, preventing replay of stale eventsDefensive assertion: debug builds assert that every persisted event round-trips to Some(event), catching serialization mismatches
a0d4632eby Matt Corallo+694−818 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Document that funding signing events can go stale' (#4960)

This commit only adds documentation comments to two source files. It explains that certain funding-signing events can become stale if the underlying negotiation fails, and that callers may see specific harmless errors as a result. No code …

26eecf2dby Matt Corallo+15−02 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add `Wallet::release_utxos` to free UTXOs from abandoned transactions

This commit fixes a design flaw in LDK's built-in wallet helper where coins selected for a splice-in (or other unclaimed funding) were permanently reserved in memory if the transaction was abandoned. Over repeated failed splices, all spend…

Denial-of-service via UTXO exhaustion from repeated failed splice negotiationsRisk of inability to broadcast fee-bumping/claim transactions due to lack of available UTXOsNew API surface (release_utxos) introduced to mitigate resource leak
52ab13fdby elnosh+148−43 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop the honggfuzz version pin from the CI fuzz job

This commit removes a fixed-version pin for the honggfuzz fuzzing tool in a continuous-integration script. The project now uses the current release of honggfuzz instead of an older pinned version. There is no change to the actual Lightning…

4a1635efby auto-pr-bot+1−51 file
No security note in commit
Informational 15 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Run the CI fuzz job on the stable toolchain

This commit changes the Rust toolchain used in the continuous integration (CI) fuzzing job from a fixed older version (1.75) to the latest stable release. It is purely a build/test infrastructure change to fix a dependency compatibility is…

21c4ed2bby auto-pr-bot+3−32 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Expose the dummy-hop tail constructor publicly

This commit makes a previously internal helper function public so that outside developers can build dummy-hop tails for blinded payment paths without recreating the logic themselves. It is an API usability change, not a fix for a known sec…

No security-relevant behavior change in the diffAPI visibility broadened from crate-public to publicCLTV expiry overflow check already present and unchanged
c5443353by auto-pr-bot+14−71 file
No security note in commit
Moderate 54 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Fail commitment sig verification without counterparty params

This change adds a safety check in a Bitcoin Lightning Network library (LDK). Previously, if the software tried to verify a peer's commitment signature before it had learned the peer's channel parameters, it could crash with a panic. Now i…

Defensive check added on peer-driven code path to prevent panicMissing counterparty_parameters could previously cause panic during commitment transaction constructionChannel closure returned instead of panic
de7ecc2fby auto-pr-bot+24−01 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Clarify the commitment validation failure message

This commit only changes the wording of an error message sent to peers when a commitment transaction fails validation. It replaces the vague phrase 'Failed to validate our commitment' with the clearer 'Received commitment failed validation…

3284a006by auto-pr-bot+11−114 files
No security note in commit
Moderate 61 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Move holder commit sig checks to `InMemorySigner`' (#4885)

This commit moves the checks that validate a counterparty's signatures on the holder's commitment and HTLC transactions out of the general channel code and into the signer module (InMemorySigner). Previously, these signature checks were do…

Moved signature validation from channel state machine into signer moduleAdded new tests that corrupt signatures and verify rejectionChanged error message from 'Invalid commitment tx signature from peer' / 'Invalid funding_created signature from peer' to 'Failed to validate our commitment'
83f5ba55by Matt Corallo+626−31024 files
No security note in commit
Low 42 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Drop stale splice signature on disconnect' (#4954)

This change fixes a Lightning channel splicing bug: when two peers temporarily disconnect during a splice, any half-finished signature the other side already sent is now discarded. Before the fix, that stale signature could be reused after…

State-invalidation bug in multi-step protocol (splice negotiation)Stale cryptographic signature not cleared on disconnectPotential reuse of old commitment state after reconnect
c9a77251by Matt Corallo+22−12 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop stale splice signature on disconnect

This fix prevents a Lightning channel from being accidentally force-closed. During a splice (a way to resize a payment channel), one side's initial signature could be kept in memory after the peers disconnected. If the peers later reconnec…

State inconsistency: in-memory buffered message not cleared on disconnectDuplicate message processing after reconnectionForce-close consequence for active Lightning channel
71405b4bby Wilmer Paulino+22−12 files
Vendor flagged security relevance
Informational 20 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice' (#4942)

This commit is a simple rename of a public function from `matches_invoice_signing_pubkey` to `key_can_sign_invoice`, plus matching updates to its documentation, callers, tests, and changelog. No behavior changed. It is not a security fix.

a476cf92by Matt Corallo+13−133 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice

This commit is a simple rename of a function and its documentation from matches_invoice_signing_pubkey to key_can_sign_invoice. No logic, behavior, or security properties changed. It is a follow-up code-review naming cleanup.

388187caby Vincenzo Palazzo+13−133 files
No security note in commit
Repository ledger

Explore captured commits

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

Lower-priorityMake `TestStore` async writes actually async, with manual completeby Matt Corallo · 9ba7c16c · Sep 22, 2025 · 1 fileMessage 83 · StrongInformational 14Details
Commit message · Matt Corallo

Make `TestStore` async writes actually async, with manual complete

`TestStore` recently got the ability to make async writes, but
wasn't a very useful test as all writes actually completed
immediately. Instead, here, we make the writes actually-async,
forcing the test to mark writes complete as required.

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 changes a test-only mock storage helper (TestStore) so that its simulated asynchronous file writes no longer finish instantly. Instead, tests can now manually control when those writes complete. It is purely a testing-infrastructure improvement and does not change any production code, real user data handling, or network behavior.

Lower-prioritySimplify legacy closed-channel monitor update persistence handlingby Matt Corallo · 71a10e70 · Sep 22, 2025 · 1 fileMessage 73 · AdequateInformational 17Details
Commit message · Matt Corallo

Simplify legacy closed-channel monitor update persistence handling

Pre-0.1, after a channel was closed we generated
`ChannelMonitorUpdate`s with a static `update_id` of `u64::MAX`. In
this case, when using `MonitorUpdatingPersister`, we had to read
the persisted `ChannelMonitor` to figure out what range of monitor
updates to remove from disk. However, now that we have a `list`
method there's no reason to do this anymore, we can just use that.

Simplifying code that we anticipate never hitting anymore is always
a win.

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

This commit is a code cleanup in the Lightning Dev Kit's storage layer. It removes a special-case code path that read an old channel monitor just to decide which stale monitor updates to delete. Instead, it reuses an existing list-and-delete helper. The change only affects how old data is cleaned up after a channel is closed, and the commit message explicitly says the removed path is no longer expected to be hit. There is no direct evidence this fixes a security vulnerability.

Lower-priorityAdd async persistence logic in `MonitorUpdatingPersister`by Matt Corallo · 57e4526f · Sep 22, 2025 · 1 fileMessage 85 · StrongLow 26Details
Commit message · Matt Corallo

Add async persistence logic in `MonitorUpdatingPersister`

In the next commit we'll add the ability to use an async `KVStore`
as the backing for a `ChainMonitor`. Here we tee this up by adding
an async API to `MonitorUpdatingPersisterAsync`. Its not intended
for public use and is thus only `pub(crate)` but allows spawning
all operations via a generic `FutureSpawner` trait, initiating the
write via the `KVStore` before any `await`s (or async functions).

Because we aren't going to make the `ChannelManager` (or
`ChainMonitor`) fully async, we need a way to alert the
`ChainMonitor` when a persistence completes, but we leave that for
the next commit.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 26/100

This commit refactors internal persistence code in the Lightning Dev Kit to support asynchronous storage backends. It does not fix a known bug or add a user-facing feature. The main risk is that the new async plumbing could, if misused in future commits, allow monitor writes to complete out of order or fail silently. Right now the code is marked pub(crate), uses a placeholder spawner that panics in the synchronous wrapper, and includes TODO comments noting that completion notification is not yet implemented. There is no evidence this commit itself introduces an exploitable vulnerability.

Lower-priorityAdd a generic public `FutureSpawner` in LDK directlyby Matt Corallo · f7c2c6a9 · Sep 22, 2025 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Add a generic public `FutureSpawner` in LDK directly

In the next commit we'll use this to spawn async persistence
operations in the background, but for now we just move the
`lightning-block-sync` `FutureSpawner` into `lightning`.

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

This commit simply moves an existing Rust trait called FutureSpawner from one internal crate (lightning-block-sync) into the main lightning crate so it can be reused more widely. It does not change any behavior, fix a bug, or alter security logic. There is no security issue visible in this patch.

Lower-priorityAdd a test implementation of `FutureSpawner` to track spawned futsby Matt Corallo · 628812fa · Sep 22, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Matt Corallo

Add a test implementation of `FutureSpawner` to track spawned futs

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit adds a new test-only helper that lets the project's own test suite collect and manually run background async tasks. It is not used in production code and does not change any existing behavior that could affect real users.

Lower-priorityAdd support for native async `KVStore` persist to `ChainMonitor`by Matt Corallo · c0847675 · Sep 22, 2025 · 2 filesMessage 85 · StrongLow 27Details
Commit message · Matt Corallo

Add support for native async `KVStore` persist to `ChainMonitor`

This finally adds support for full native Rust `async` persistence
to `ChainMonitor`.

Way back when, before we had any other persistence, we added the
`Persist` trait to persist `ChannelMonitor`s. It eventualy grew
homegrown async persistence support via a simple immediate return
and callback upon completion. We later added a persistence trait
in `lightning-background-processor` to persist the few fields that
it needed to drive writes for. Over time, we found more places
where persistence was useful, and we eventually added a generic
`KVStore` trait.

In dc75436c673fad8b5b8ed8d5a9db1ac95650685a we removed the
`lightning-background-processor` `Persister` in favor of simply
using the native `KVStore` directly.

Here we continue that trend, building native `async`
`ChannelMonitor` persistence on top of our native `KVStore` rather
than hacking support for it into the `chain::Persist` trait.
Because `MonitorUpdatingPersister` already exists as a common way
to wrap a `KVStore` into a `ChannelMonitor` persister, we build
exclusively on that (though note that the "monitor updating" part
is now optional), utilizing its new async option as our native
async driver.

Thus, we end up with a `ChainMonitor::new_async_beta` which takes
a `MonitorUpdatingPersisterAsync` rather than a classic
`chain::Persist` and then operates the same as a normal
`ChainMonitor`.

While the requirement that users now use a
`MonitorUpdatingPersister` to wrap their `KVStore` before providing
it to `ChainMonitor` is somewhat awkward, as we move towards a
`KVStore`-only world it seems like `MonitorUpdatingPersister`
should eventually merge into `ChainMonitor`.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 27/100

This commit adds a new beta way for the Lightning Dev Kit's ChainMonitor to save channel state using native Rust async/await. It is a feature/refactoring change, not a fix for a known vulnerability. The commit message explicitly labels the new API as beta and warns that bugs may be triggered by its use. There is no claim in the commit or supplied references that this resolves a security issue.

Lower-priorityUse public `MonitorUpdatingPersister` API in testsby Matt Corallo · 9d5a177f · Sep 22, 2025 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · Matt Corallo

Use public `MonitorUpdatingPersister` API in tests

In the coming commits `MonitorUpdatingPersister`'s internal state
will be reworked. To avoid spurious test diff, we instead use the
public API of `MonitorUpdatingPersister` rather than internal bits
in tests.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only changes test code. It replaces direct construction of a test helper object with its public constructor and swaps one test logger for another. There is no change to production code or user-facing behavior, and no security issue is present.

Lower-prioritySupport `maximum_pending_updates` = 0 in `MonitorUpdatingPersister`by Matt Corallo · e32e376b · Sep 22, 2025 · 1 fileMessage 73 · AdequateInformational 19Details
Commit message · Matt Corallo

Support `maximum_pending_updates` = 0 in `MonitorUpdatingPersister`

In the coming commits, we'll use the `MonitorUpdatingPersister` as
*the* way to do async monitor updating in the `ChainMonitor`.
However, to support folks who don't actually want a
`MonitorUpdatingPersister` in that case, we explicitly support them
setting `maximum_pending_updates` to 0, disabling all of the
update-writing behavior.

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

This is a small, intentional behavior change in a Lightning node library. It lets users set a configuration value to 0 to fully turn off a special monitor-update writing mode, making the component act like a simpler default version. The change itself is not a security fix; it is groundwork for a later feature and removes a special marker byte from saved files when the feature is disabled. There is no indication of a vulnerability being patched.

Lower-priorityMake `FutureSpawner` only require `Send + Sync` in `std` buildsby Matt Corallo · ec221f0c · Sep 22, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Make `FutureSpawner` only require `Send + Sync` in `std` builds

We only require `Send + Sync` on the `Future`s which are spawned
in std builds, so its weird to require them on the trait itself in
all builds. Instead, make them consistent.

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

This is a small Rust code cleanup change. It relaxes the compiler requirements on a trait called FutureSpawner so that it only demands thread-safety guarantees in standard (std) builds, matching the requirements already placed on the spawned futures themselves. There is no security-relevant behavior change.

Lower-priorityClean up and rustfmt `persist.rs`by Matt Corallo · 595170c5 · Sep 22, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Matt Corallo

Clean up and rustfmt `persist.rs`

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 cleanup and formatting change in a single Rust file. It extracts repeated namespace constants into local variables and adjusts line wrapping to satisfy rustfmt. There is no functional change, no bug fix, and no security relevance.

Security candidateCorrect gossip forwarding criteria while doing background syncby Matt Corallo · edc7903f · Sep 22, 2025 · 3 filesMessage 73 · AdequateLow 36Details
Commit message · Matt Corallo

Correct gossip forwarding criteria while doing background sync

If we're doing gossip backfill to a peer, we first forward all our
`channel_announcement`s and `channel_update`s in SCID-order. While
doing so, we don't forward any fresh `channel_update` messages for
any channels which we haven't yet backfilled (as we'll eventually
send the new update anyway, and it might get rejected without the
corresponding `channel_announcement`).

Sadly, our comparison for this was the wrong way, so we actually
*only* forwarded updates which were for channels we haven't yet
backfilled, and dropped updates for channels we already had
backfilled.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
cryptography-sensitive path
AI analysis · Low 36/100

This commit fixes a flipped comparison in Lightning Dev Kit's gossip message forwarding. During a background sync, nodes share old channel announcements in order. To avoid sending updates before their matching announcements, the code was supposed to temporarily hold back fresh updates for channels not yet synced. Instead, the comparison was backwards, so it held back updates for already-synced channels and forwarded only updates for not-yet-synced channels. The fix changes the comparison direction and adds a test to confirm the correct behavior.

Lower-priorityAdd concrete `NO_*` consts to avoid users having to specify typesby Matt Corallo · 0d59d73c · Sep 22, 2025 · 1 fileMessage 93 · StrongInformational 15Details
Commit message · Matt Corallo

Add concrete `NO_*` consts to avoid users having to specify types

When building a background processor without an onion messenger or
liquidity manager, users still need to pass `None` into the
background processor initialization methods. Sadly, Rust will
require a concrete type for the (unused) `Some` variant of the
`Option` passed in, which requires specifying out a lot of type
gook.

Instead, provide some constants which users can pass in trivially.

Fixes #3612

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

This commit is a developer-convenience change only. It adds named constants like NO_ONION_MESSENGER and NO_LIQUIDITY_MANAGER so users don't have to write out complex Rust type names when they don't need those optional features. There is no security fix or behavior change.

AI review queuedSet HTLC tx version 3 on handling `BumpTransactionEvent::HTLCResolution`by Leo Nash · 67ed89dd · Sep 22, 2025 · 1 fileMessage 50 · ThinLow 44Details
Commit message · Leo Nash

Set HTLC tx version 3 on handling `BumpTransactionEvent::HTLCResolution`

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 44/100

This commit changes the transaction version used when creating HTLC (Hashed Timelocked Contract) resolution transactions during fee-bumping. For channels that support a specific anchor-based commitment type, the code now uses version 3 instead of version 2. Transaction version 3 enables package relay rules that help ensure child transactions can be broadcast alongside their parents, which is important for anchor-based fee bumping to work reliably on the Bitcoin network. The change appears to be a protocol correctness or compatibility fix rather than a direct vulnerability patch, but using the wrong version could in theory cause transactions to be rejected or fail to propagate, potentially affecting fund recovery in dispute scenarios.

AI review queuedAdd forwards-compatibility logic in `LocalHTLCFailureReason` serby Matt Corallo · 21a8b757 · Sep 21, 2025 · 1 fileMessage 93 · StrongLow 31Details
Commit message · Matt Corallo

Add forwards-compatibility logic in `LocalHTLCFailureReason` ser

We recently created a `LocalHTLCFailureReason` enum to cover
detailed reasons why an HTLC may have failed, in excess of the
on-the-wire failure encoding.

Sadly, when we did so we introduced a serialization format which
isn't particularly conducive to introducing new failure reasons in
the future. Luckily, `LocalHTLCFailureReason` already has logic
that works for forwards-compatibility - it can be converted to, and
from, the on-the-wire error codes.

Thus, here, we take advantage of that, writing both the on-the-wire
error code as well as a code for the specific case. If we don't
recognize the specific case on deserialization, we'll fall back to
the default case for the on-the-wire code we've written.

We also, of course, include a length-prefixed TLV stream to allow
for additional fields in the future.

Fixes #4087

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
AI analysis · Low 31/100

This commit changes how a Lightning node stores and reloads its own internal reasons for payment failures. The old format used a single fixed list of numeric codes, which would have made future upgrades fragile. The new format writes both the standard on-the-wire failure code and a separate internal reason code, plus a placeholder for future extra fields. If an older or newer version reads a reason it does not know, it now falls back to the standard failure code instead of potentially failing to load the data. This is a forward-compatibility improvement, not a fix for an active exploit.

Lower-priorityDocument some channel_reestablish spec requirementsby Jeffrey Czyz · e083a2de · Sep 19, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Document some channel_reestablish spec requirements

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

This commit only adds explanatory comments to existing code in the Lightning channel re-establishment logic. No behavior was changed, no bugs were fixed, and no security vulnerability was introduced or patched.

Security candidateUpdate commitment_signed retransmission for next_fundingby Jeffrey Czyz · 9c2ead2a · Sep 19, 2025 · 1 fileMessage 73 · AdequateLow 42Details
Commit message · Jeffrey Czyz

Update commitment_signed retransmission for next_funding

The next_funding TLV is included in channel_reestablish when either
tx_signatures or commitment_signed is needed for an interactive-tx
session. This commit largely includes the spec requirements in the
comments, including when to retransmit commitment_signed. But it also
adds an additional check that tx_signatures has not yet been received.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 42/100

This commit tightens the rules for re-sending a 'commitment_signed' message during Lightning channel reconnection when a new interactive funding transaction (such as a splice) is in progress. Previously, the code retransmitted commitment_signed whenever a flag was set; now it also requires that the peer's transaction signatures ('tx_signatures') have not yet been received. This avoids redundant or incorrect retransmissions and better aligns the implementation with the Lightning protocol specification.

Lower-priorityCompute ConstructedTransaction weight from Transactionby Jeffrey Czyz · e2623263 · Sep 19, 2025 · 3 filesMessage 85 · StrongInformational 12Details
Commit message · Jeffrey Czyz

Compute ConstructedTransaction weight from Transaction

Instead of defining a custom function for calculating a transaction's
weight, have ConstructedTransaction hold a Transaction so that its
weight method can be re-used. As a result NegotiatedTxInput no longer
needs to store the transaction inputs.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 12/100

This commit is a straightforward internal code cleanup in LDK's interactive transaction construction. It replaces a hand-written transaction weight calculation with the standard Bitcoin library's weight method by storing the actual Transaction object inside ConstructedTransaction. There is no indication this fixes a security bug; it appears to be a refactor to remove duplicated logic and simplify serialization.

Lower-priorityRemove NegotiatedTxInput::weightby Jeffrey Czyz · 0a1d445e · Sep 19, 2025 · 1 fileMessage 50 · ThinInformational 23Details
Commit message · Jeffrey Czyz

Remove NegotiatedTxInput::weight

The weight is no longer needed once a ConstructedTransaction is created,
so it doesn't need to be persisted.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Informational 23/100

This commit removes a stored 'weight' field from a transaction-input data structure and instead calculates the weight on the fly when building a transaction. It is a code-cleanup and data-format simplification. There is no direct evidence in the commit that this fixes a security vulnerability, but any change to fee/weight calculations in Bitcoin-related code deserves a careful look because mistakes there can affect transaction validity or fees.

Lower-priorityTrack satisfaction_weight in InteractiveTxInputby Jeffrey Czyz · 1e510cc0 · Sep 19, 2025 · 1 fileMessage 58 · ThinInformational 12Details
Commit message · Jeffrey Czyz

Track satisfaction_weight in InteractiveTxInput

Instead of estimating the input weight, track the satisfaction_weight in
InteractiveTxInput. This then can be used compute the transaction weight
without storing individual weights in NegotiatedTxInput in an upcoming
commit.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 12/100

This commit is a straightforward internal refactoring of how transaction input weights are tracked during interactive transaction construction in the Lightning Dev Kit. It splits the previous estimated input weight into a fixed base weight plus a separately stored 'satisfaction weight' (the variable signature/script portion). The total weight used for fee calculations remains the same, and there is no indication of a security bug being fixed.

Lower-priorityUse FundingTxInput in InteractiveTxConstructorArgsby Jeffrey Czyz · 91845e48 · Sep 19, 2025 · 3 filesMessage 63 · AdequateInformational 14Details
Commit message · Jeffrey Czyz

Use FundingTxInput in InteractiveTxConstructorArgs

InteractiveTxConstructor::new converts inputs given in channel.rs to
InputOwned. Instead of converting FundingTxInput in channel.rs to the
type needed by that constructor, pass in FundingTxInput and have it
converted directly to InputOwned there. This saves one conversion and
Vec allocation. It also lets us use the satisfaction_weight in an
upcoming refactor.

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 14/100

This is a routine internal code cleanup in a Bitcoin Lightning library. It changes how funding transaction inputs are passed between components so that one data type (FundingTxInput) is carried further through the code instead of being converted earlier. The commit message says this removes an unnecessary conversion and memory allocation, and prepares for a future refactor. There is no indication of a security fix or behavior change that would affect users.

Security candidateSimplify test_trampoline_unblinded_receiveby Valentine Wallace · c997f22a · Sep 19, 2025 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · Valentine Wallace

Simplify test_trampoline_unblinded_receive

No need to construct unused blinded hop data or hardcode session privs/prng
seeds.

40/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body! Too few words to establish purpose
Why it was queued
entropy or randomness
AI analysis · Informational 15/100

This commit is a test-only cleanup. It simplifies a single unit test by removing unused setup code and replacing hardcoded cryptographic secrets with deterministic test helpers. There is no change to production code, no security fix, and no vulnerability introduced.

Lower-priorityCompute trampoline session_priv from outer session_privby Valentine Wallace · 445ca831 · Sep 19, 2025 · 2 filesMessage 95 · StrongLow 29Details
Commit message · Valentine Wallace

Compute trampoline session_priv from outer session_priv

This simplifies the code and makes it more straightforward to test unblinded
trampoline receives where we need to compute the trampoline session_priv when
manually creating the inner onion. (The trampoline onion needs to be manually
created because LDK does not natively support sending to unblinded trampolines,
just receiving.)

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Low 29/100

This commit refactors how a secret key used inside trampoline-style Lightning payments is derived. Previously, the inner (trampoline) onion's session key was the original key, and the outer onion's key was a hash of it. The commit flips this: the outer onion uses the original key, and the trampoline onion key is computed as a hash of the outer key. The change is described by the author as a code simplification and test-helper improvement, not as a security fix. There is no direct evidence in the commit or supplied references that this resolves an exploitable vulnerability.

Lower-priorityDebug-Assert that there are no queued messages when a peer connectsby Matt Corallo · 47a3e5c6 · Sep 19, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Debug-Assert that there are no queued messages when a peer connects

In the previous two commits we stopped enqueueing messages for
disconnected peers. Here we add some basic test coverage of these
changes by asserting that there are no queued messages for a peer
when they (re-)connect.

We also add a few assertions that a peer is connected when we push
a message onto the queu, in cases where we expect a peer to be
connected.

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 adds internal safety checks (debug-only assertions) to the Lightning Dev Kit code. It ensures that when a peer reconnects, there are no leftover queued messages from before, and that messages are only queued for peers that are currently connected. These assertions help catch programming mistakes during testing but do not change behavior in production builds. There is no indication this fixes an active security vulnerability.

Security candidateStop enqueueing error messages for disconnected peersby Matt Corallo · a06ebee0 · Sep 19, 2025 · 6 filesMessage 73 · AdequateInformational 18Details
Commit message · Matt Corallo

Stop enqueueing error messages for disconnected peers

If a channel is failed while a peer is disconnected, we'll still
have a `PeerState` for that peer. Historically, we haven't bothered
to check if a peer is actually connected before we push the `error`
message onto the `PeerState::pending_msg_events` queue, leaving us
sending messages into the void.

This is generally not an issue as
`ChannelManager::get_and_clear_pending_msg_events` should be called
very regularly, removing these messages and then dropping them as
`PeerManager` won't have anything to do with them. Further, when
the the message is an `error`, if a peer happens to connect between
when we push the message and when `get_and_clear_pending_msg_events`
is called the worst that happens is they get the `error` message
we'd end up sending them when they try to reestablish the channel
anyway.

Still, its awkward to leave the `error`s lying around in a message
queue for a disconnected peer, so we remove them here.

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

This change stops a Lightning node from queuing 'error' messages for peers that are currently disconnected. Previously, when a channel failed while a peer was offline, the node would still put an error message in that peer's outgoing message queue. The message would normally be discarded harmlessly later, but it was untidy and could briefly sit in the queue. The patch simply checks whether the peer is connected before adding the message. It is described by the authors as a cleanup rather than a security fix, with no practical exploit identified.

Security candidateStop enqueueing messages for disconnected peersby Matt Corallo · 92e79ab1 · Sep 19, 2025 · 3 filesMessage 68 · AdequateModerate 50Details
Commit message · Matt Corallo

Stop enqueueing messages for disconnected peers

If a channel operation occurs while a peer is disconnected, we'll
still have a `PeerState` for that peer. Historically, we haven't
bothered to check if a peer is actually connected before we push
new messages onto the `PeerState::pending_msg_events` field,
leaving us sending messages into the void.

This is generally not an issue as
`ChannelManager::get_and_clear_pending_msg_events` should be called
very regularly, removing these messages and then dropping them as
`PeerManager` won't have anything to do with them.

Still, there is a race condition here - if a peer manages to
connect between the generation of one such message and when
`get_and_clear_pending_msg_events` is called, we may enqueue a
message to the peer which makes no sense and could lead to a
spurious channel closure (especially in the case of an async
`ChannelMonitorUpdate` completion or async signing operation, which
often lead to normal channel message generation).

Further, if a peer is slow to send their `channel_reestablish`
message after connection this race could be substantially more
likely, as such normal channel messages may be nonsense until we've
completed the reestablish dance (i.e. the later reestablish dance
may lead us to re-send the same messages again immediately).

Here we remove most of the cases where we enqueue messages for
disconnected peers.

Note that we differentiate between two different checks for
connected-ness - for cases where we're sending an `error` or gossip
messages, we allow the messages to be enqueued if the peer is
connected at all. For most other cases, we only allow messages to
be enqueued if the peer is connected *and* the channel has
completed its reestablish dance (if required, i.e. the channel is
"connected").

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Moderate 50/100

This commit fixes a race condition in the Lightning Dev Kit where the software could queue up messages for a peer that was temporarily disconnected. If that peer reconnected at just the right moment, it could receive messages that don't make sense for the current channel state, potentially causing a channel to close unexpectedly. The fix adds checks to avoid enqueueing most channel messages unless the peer is connected and the channel re-establishment handshake is complete. Error and gossip messages are still allowed when the peer is simply connected.