LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

225security candidates209second-pass queue1479AI analyses
64commits · 30 days
198commits · 60 days
661commits · 180 days
1478commits · 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.

69/100 average clarity
359Strong · 80–100
790Adequate · 60–79
288Thin · 40–59
60Opaque · 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 Corallo35847356473
Jeffrey Czyz17741177168
Wilmer Paulino14939149169
Leo Nash11613116162
Valentine Wallace13710135169
Vincenzo Palazzo10210184
Joost Jager16224162069
elnosh301330056
shaavan22622069
Carla Kirk-Cohen78366068
benthecarman18318071
Analysis record

Published AI watches

Last scanned 2 minutes ago

Low 32 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Only fetch TXIDs instead of entire block during gossip verification' (#4846)

This commit changes how the Lightning Dev Kit's block-sync module verifies Lightning network gossip announcements. Instead of downloading entire Bitcoin blocks (which can be large), it now downloads only the list of transaction IDs for a b…

API surface change in UtxoSource traitReduced data exposure: no longer fetches full blocks for gossip verificationNew JSON parsing for txid lists and TxOut values
ebe7a447by Matt Corallo+275−1025 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Allow filtered block rescans at the current tip' (#4847)

This commit changes how the Lightning Dev Kit (LDK) node software handles receiving the same block twice through its filtered-block interface. Previously, calling filtered_block_connected with the current tip again would trigger an asserti…

Assertion relaxation in block connection pathPotential denial-of-service vector removed: previously a malicious or buggy filter provider could crash the node by replaying the current tipNew test coverage for same-block filtered rescan
54ddbd0bby Matt Corallo+177−486 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add test framework coverage of `Listen` block connection replays

This commit only adds a new test mode to the project's internal testing framework. It lets developers simulate a specific way blocks are delivered to the Lightning node (a 'replay' through the Listen interface) so that behavior is covered …

bf6ad23eby Matt Corallo+18−32 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Update functional test block connection to detect block replays

This commit changes only internal test helper code in the Lightning Dev Kit repository. It makes the functional test framework smarter about 'block replays'—situations where the same block is fed to a test node more than once—so the fake b…

No production code modifiedNo cryptographic, consensus, or networking changesCommit message frames change as test-framework correctness, not security
477facb4by Matt Corallo+41−333 files
No security note in commit
Moderate 66 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct HTLC confusion on unrevoked counterparty commitment txs

This patch fixes a bug in the Lightning Dev Kit where the software could confuse HTLCs (payment contracts) on live, unrevoked counterparty commitment transactions with ones from old, revoked transactions. Previously, it relied only on whet…

Incorrect revocation state detection for counterparty commitment transactionsHTLC direction not previously checked when matching against pending HTLCsPromotion of debug assertions to full assertions for HTLC claim path consistency
f06a08a6by Matt Corallo+26−192 files
Vendor flagged security relevance
Low 47 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Return `Err`s` instead of panicking on oversized messages

This commit changes how the Lightning networking code handles oversized encrypted messages. Previously, certain conditions would cause the program to crash with a panic. Now the code returns errors instead, which is a defensive improvement…

panic-to-error conversion for oversized message encryption/decryptiondenial-of-service hardening against oversized peer messagesdebug_assert retained to preserve test coverage of invariant violations
08f12bc7by Matt Corallo+68−313 files
Vendor flagged security relevance
Moderate 62 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid panicking when attempting to send an oversized message

This commit fixes a crash bug in the Lightning Dev Kit's peer message handling. Previously, if a message grew too large to be sent over the encrypted peer connection, the code would panic (abruptly terminate the whole program). The patch m…

Replaces a `.expect()` panic path with a fallible `Result` in peer message encryptionAdds graceful peer disconnection when a critical message cannot be sentIncludes a regression test for oversized-message handling
c5fdc3bfby Matt Corallo+148−901 file
Vendor flagged security relevance
High 74 AI analysisMessage 78 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid oversized relayed failure messages

This patch fixes a crash bug in the Lightning Dev Kit's handling of HTLC failure messages. A downstream peer could send a maximally-sized failure message without attribution data. When the node added its own attribution data while relaying…

Denial-of-service via remote-triggered panic in message encryptionOversized message exceeding Noise/Lightning wire framing limitMissing length validation before adding attribution data during relay
6b1dfb1aby Matt Corallo+64−191 file
Vendor flagged security relevance
Moderate 64 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Reject attempts to advance one-hop blinded forward paths

This commit fixes a denial-of-service bug in rust-lightning where a maliciously crafted one-hop blinded reply path could cause the node to panic when it tried to respond. The fix rejects paths with too few hops before advancing them, and a…

Denial-of-service vector via malformed blinded pathPanic in onion construction due to zero-hop pathUntrusted reply path input validation gap
969a40cfby Matt Corallo+49−14 files
Vendor flagged security relevance
High 72 AI analysisMessage 96 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

lightning-types: replace Zl/Zp separators in `PrintableString`

This commit fixes a log-forgery risk in a Rust Lightning library helper called PrintableString. That helper is meant to make untrusted text safe to print by replacing dangerous characters with a placeholder. It already caught most control …

log injection / log forgery via U+2028/U+2029 line separatorsincomplete input sanitisation in PrintableStringpeer-controlled strings (node alias, BOLT 12 description/issuer/payer_note, peer_msg) as attack surface
75defa9cby Vincenzo Palazzo+63−83 files
Vendor flagged security relevance
Moderate 69 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Apply the unfunded channel peer limit to all unaccepted channels

This commit fixes a rate-limiting bug in the Lightning Dev Kit (LDK) that let a single peer bypass the cap on how many different peers can have unfunded (not-yet-funded) channels open. Previously, if a peer sent multiple channel requests q…

Denial-of-service resource exhaustion via rapid inbound channel open requestsLogic error in rate-limiting conditionRegression test added for the bypass scenario
56a4ee43by Matt Corallo+87−62 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 88 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Allow filtered block rescans at the current tip

This commit fixes a bug where replaying the current blockchain block through a normal listener callback could crash two core Lightning components (ChannelManager and OutputSweeper) with a panic. The fix recognizes a same-block replay as a …

panic in chain listener callbacksame-block replay/rescan mishandlingassertion failure on valid chain input
686f9860by Elias Rohrer+118−123 files
Vendor flagged security relevance
Moderate 57 AI analysisMessage 78 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid panic when reorged claims cannot merge

This commit fixes a crash bug in the Lightning Dev Kit's on-chain transaction handler. During a deep blockchain reorganization, a previously settled HTLC claim could be 'resurrected' at a block height where it could no longer be combined w…

Assertion/panic in reorg handling pathDeep blockchain reorg as trigger conditionHTLC claim resurrection after reorg
f1dc8487by Matt Corallo+219−52 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 45 · Thin
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Update crate repository links to forgejo

This commit simply updates the 'repository' web links in 15 package metadata files from GitHub to a self-hosted Forgejo instance. It does not change any program code, build logic, dependencies, or security behavior. There is no security is…

eb77676dby benthecarman+15−1515 files
No security note in commit
Low 45 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Account for message type prefix len in prevtx length enforcement

This commit fixes a small but real accounting bug in how rust-lightning checks whether a previous transaction (prevtx) attached to a funding input will make the resulting Lightning wire message too large. The code previously compared the m…

Off-by-constant length check in protocol message size enforcementPotential acceptance of a prevtx that produces an oversized Lightning wire messageDenial-of-service / protocol-interop risk from peer message rejection
d29e1415by Wilmer Paulino+21−41 file
No security note in commit
Moderate 54 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Retransmit splice_locked for 0-conf channels missing tx_signatures

This commit fixes a bug in the Lightning Dev Kit where, after a disconnection, a node could fail to retransmit a 'splice_locked' message to a peer that was still waiting for transaction signatures. Without this retransmission, the two peer…

Protocol state desynchronization between channel peers after reconnectionMissing retransmission of splice_locked for 0-conf splice channelsPotential channel unusability or stuck splice negotiation
5434015bby Wilmer Paulino+266−12 files
No security note in commit
Low 37 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

bolt12: add pay_for_bolt12_invoice for externally-sourced invoices

This commit adds a new API, pay_for_bolt12_invoice, that lets users pay a BOLT 12 invoice even if LDK did not originally request it. It is intended for advanced use cases like multi-sender payments and replaces an older, more restrictive A…

New API removes internal invoice-origin verification, shifting trust boundary to callerDocumentation explicitly warns caller to verify invoice via Bolt12Invoice::verify_using_metadata and to ensure unique payment_id to avoid duplicate paymentsInput validation added for zero amount, overpay, and partial-amount-without-MPP
5b80fe9cby Alkamal01+550−156 files
No security note in commit
Low 26 AI analysisMessage 90 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Include to_self_delay size in DelayedPaymentOutput weight calculation

This commit fixes a small accounting bug in how the Lightning wallet estimates the size (and therefore transaction fee) of a special Bitcoin transaction that sweeps funds back to the user after a channel closes. The old code always assumed…

debug assertion failure possible in development/testing buildstransaction weight/fee estimate overestimation up to 3 WUconstant replaced with per-descriptor length computation
e6652237by Matt Morehouse+97−83 files
No security note in commit
Informational 18 AI analysisMessage 65 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct docs on `ChannelSigner::get_per_commitment_point`

This commit only updates documentation comments for a Rust function called get_per_commitment_point. It removes an outdated warning that the method was non-asynchronous and that returning an error could cause a crash, and replaces it with …

Documentation-only changeRemoves outdated panic warningAdds retry/unblock guidance for signer errors
5057809bby Matt Corallo+6−31 file
No security note in commit
Informational 16 AI analysisMessage 35 · Opaque
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

ln/refactor: remove BlindedTrampolineEntrypoint

This commit is a small internal code cleanup in the Lightning Dev Kit's Trampoline routing code. It removes a separate 'BlindedTrampolineEntrypoint' payload variant and folds an optional blinding point into the existing 'Forward' variant. …

Refactor-only change with no added bounds checks or validationNo mention of vulnerability, CVE, security fix, or bug in commit messageTLV field changed from required to optional, but only for a newly unified variant used in internal construction
3e0c2697by Carla Kirk-Cohen+8−263 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.

Security candidateAdd a test for the new async `ChainMonitor` operationby Matt Corallo · 462a6479 · Sep 22, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Add a test for the new async `ChainMonitor` operation

We already have pretty good coverage of the
`MonitorUpdatingPersister` itself as well as `ChainMonitor`'s
update-completion handling, so here we just focus on an end-to-end
test to make sure `ChainMonitor` behaves at all correctly in the
new async mode.

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

This commit only adds a new automated test for an existing feature. It does not change any production code, so it cannot introduce a security vulnerability or fix one. The test checks that a new asynchronous mode of the ChainMonitor component correctly waits for background writes to finish before reporting them complete.

AI review queuedMarginally simplify `TestStore`by Matt Corallo · 6199bcbe · Sep 22, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Matt Corallo

Marginally simplify `TestStore`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This is a small code cleanup inside a test-only helper. It removes a special case that used a different key format when the secondary namespace was empty, replacing it with one consistent format. It also avoids an unnecessary copy of a byte buffer. The change only affects internal test utilities and does not alter production code or real user data handling.

AI review queuedCorrect `maximum_pending_updates` of 0 in MonitorUpdatingPersisterby Matt Corallo · 8d6ed644 · Sep 22, 2025 · 1 fileMessage 73 · AdequateLow 29Details
Commit message · Matt Corallo

Correct `maximum_pending_updates` of 0 in MonitorUpdatingPersister

Though users maybe shouldn't use `MonitorUpdatingPersister` if they
don't actually want to persist `ChannelMonitorUpdate`s, we also
shouldn't panic if `maximum_pending_updates` is set to zero.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Low 29/100

This commit fixes a bug where setting a configuration value called `maximum_pending_updates` to 0 in a Lightning node persistence helper would cause the program to crash (panic) due to division by zero. The fix makes the code skip storing incremental updates when the limit is 0, which is a valid 'do not store updates' setting. It is a robustness fix rather than an exploitable security vulnerability, and the crash would only affect the node operator who configured the value to 0.

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-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 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-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-priorityMigrate `MonitorUpdatingPersister` to an async + async-sync wrapperby Matt Corallo · 14ceb428 · Sep 22, 2025 · 1 fileMessage 73 · AdequateInformational 12Details
Commit message · Matt Corallo

Migrate `MonitorUpdatingPersister` to an async + async-sync wrapper

As we've done with several other structs, this adds an async
variant of `MonitorUpdatingPersister` and adds an async-sync
wrapper for those using `KVStoreSync`. Unlike with other structs,
we leave `MonitorUpdatingPersister` as the sync variant and make
the new async logic a `MonitorUpdatingPersisterAsync` as the async
monitor updating flow is still considered beta.

This does not yet expose the async monitor updating logic anywhere,
as doing a standard `Persist` async variant would not work for
ensuring the `ChannelManager` and `ChainMonitor` don't block on
async writes or suddenly require a runtime.

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

This commit is a routine internal refactoring of a Lightning node storage helper. It rewrites the existing synchronous `MonitorUpdatingPersister` to be a thin wrapper around a new asynchronous implementation, without changing how data is stored, encrypted, or validated. The new async code is explicitly marked as beta and is not yet exposed to users. There is no indication this fixes or introduces a security vulnerability.

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.