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
65commits · 30 days
203commits · 60 days
662commits · 180 days
1482commits · 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 36 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.

Lower-priorityDrop excess `Transaction` `clone` in LSPS2 serviceby Matt Corallo · 3292ef10 · Sep 26, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Drop excess `Transaction` `clone` in LSPS2 service

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 a minor code cleanup in the LSPS2 liquidity service. It removes an unnecessary copy (clone) of a Bitcoin transaction when retrieving and broadcasting a funding transaction. The change returns a reference to the existing transaction instead of duplicating it. There is no security issue here—only a small performance improvement and cleaner code.

Lower-priorityNote that balance entries remain as long as a splice has < 6 confsby Matt Corallo · 84a220d2 · Sep 26, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Matt Corallo

Note that balance entries remain as long as a splice has < 6 confs

This may be somewhat surprising, so it seems worth noting.

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

This commit only adds a documentation comment explaining an existing behavior in the code. It does not change any logic, fix any bug, or alter how the software operates. There is no security issue present in the change itself.

AI review queuedSupport client_trusts_lsp on LSPS2by Martin Saposnic · 8ce4147e · Sep 25, 2025 · 9 filesMessage 35 · OpaqueLow 34Details
Commit message · Martin Saposnic

Support client_trusts_lsp on LSPS2

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

This commit adds a new LSPS2 trust model called client_trusts_lsp. In this model, a Lightning Service Provider (LSP) delays broadcasting the Bitcoin funding transaction for a new channel until the client has actually paid the channel-opening fee via a forwarded payment. The commit also adds a new ChannelManager method that lets LDK validate a funding transaction without immediately broadcasting it. The changes are primarily a feature addition with safety checks to avoid broadcasting funding transactions after a channel has closed or force-closed.

Lower-priorityFix races when removing per-peer state from KVStore in LSPS2/5by Matt Corallo · 0f237961 · Sep 25, 2025 · 2 filesMessage 73 · AdequateModerate 61Details
Commit message · Matt Corallo

Fix races when removing per-peer state from KVStore in LSPS2/5

If we note that a peer should be removed in LSPS2/5 handling, we
need to make sure that the peer wasn't re-added between dropping
its state in memory and going to remove its state from disk. If it
is, we need to overwrite the current on-disk state instead.

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

This patch fixes a race condition in the Lightning Dev Kit's liquidity service plugins (LSPS2 and LSPS5). Previously, when the code decided a peer's state should be removed from disk, it could drop the in-memory lock before deleting the stored data. In that gap, another operation could re-add state for the same peer. The removal could then delete the newly-written state, or an outdated write could overwrite newer data, leading to lost or inconsistent peer records. The fix holds the appropriate locks until the storage write or remove operation is started, and re-checks whether the peer is still removable before deleting anything. If the peer was re-added, it now forces a fresh persist instead of removing.

Lower-priorityEnsure mutual exclusion in LSPS2/5 persistenceby Matt Corallo · a9ddf3f1 · Sep 25, 2025 · 2 filesMessage 68 · AdequateModerate 57Details
Commit message · Matt Corallo

Ensure mutual exclusion in LSPS2/5 persistence

There are various race conditions between `persist` calls on the
LSPS2 and LSPS5 services. Thus, we simply ensure that no two
`persist` calls can be in-flight at the same time, ensuring that
any new state updates between them will ultimately be persisted by
re-persisting from the top in the originally-running `persist` call
if another is started before it finishes.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Moderate 57/100

This commit fixes race conditions in how two liquidity-service modules (LSPS2 and LSPS5) save their state to disk. Previously, multiple 'persist' operations could run at the same time, which could cause stale or partially-written state to overwrite newer data, or cause a peer's state to be removed incorrectly. The fix adds a simple in-flight flag so only one persist runs at a time, and if new changes arrive during a persist, the process loops around and saves them before finishing.

Lower-priorityCorrect idempotency key docs on `LSPS2ServiceEvent::OpenChannel`by Matt Corallo · c202d35f · Sep 25, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Correct idempotency key docs on `LSPS2ServiceEvent::OpenChannel`

While it would be correct to use `(their_network_key,
intercept_scid)` as the idempotency key when handling
`LSPS2ServiceEvent::OpenChannel`, we don't actually expect anyone
to do so as it would require separate storage to track the
`intercept_scid` -> opened channel mappings.

Thus, we update the documentation to note that the correct
idempotency key is `(their_network_key, user_channel_id)`.

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 one-word documentation correction in a Rust comment. It changes the recommended idempotency key for handling an LSPS2 service event from a temporary routing identifier (intercept_scid) to a stable user-supplied identifier (user_channel_id). There is no code change, no security fix, and no vulnerability.

Lower-priorityAdd `lightning-persister` `tokio` feature to `Cargo.toml`by Elias Rohrer · 67fd854f · Sep 25, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Elias Rohrer

Add `lightning-persister` `tokio` feature to `Cargo.toml`

.. to indicate its existence

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

This commit simply declares an existing optional dependency as a named Cargo feature. It is a build/package metadata change with no functional code changes and no security relevance.

Lower-priorityAdd tests for `lightning-persister` with `tokio` feature to CIby Elias Rohrer · 96ad2409 · Sep 25, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Elias Rohrer

Add tests for `lightning-persister` with `tokio` feature to CI

We recently introduced a new `tokio` feature to `lightning-persister`,
but never added it to CI which has us never run the tests that depend on
it. Here we fix this omission.

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 adds automated CI test commands for a newly added optional 'tokio' feature in the lightning-persister crate. It does not change application code, fix a bug, or alter any security-relevant behavior. It is purely a testing/continuous integration configuration change.

Lower-priorityRemove `lazy` flag from `{KVStore,KVStoreSync}::remove`by Elias Rohrer · 561da4cf · Sep 25, 2025 · 8 filesMessage 73 · AdequateInformational 23Details
Commit message · Elias Rohrer

Remove `lazy` flag from `{KVStore,KVStoreSync}::remove`

The utility of the `lazy` flag was always not entirely clear mod some
cloud environments where you actually could save an explicit call in
some scenarios by batching the remove with subsequent calls. However,
given the recent addition of the async `KVStore` introduced addtional
ordering constraints its unclear how implementation could actually still
benefit from the 'eventual' consistency properties originally
envisioned.

As the `lazy` flag then just amounts to a bunch of additonal complexity
everywhere, we here simply drop it from the `KVStore`/`KVStoreSync`
interfaces, simplifying implementations on both ends.

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

This commit removes a 'lazy' option from the key-value store's delete operation. Previously, callers could choose to delay or batch deletions for performance, but that created complexity and potential consistency problems with the new async store. Now all deletions are immediate and durable. The change is an API cleanup and simplification; it is not described by the project as a security fix, but it does reduce a small reliability risk where lazy deletes could be lost after a crash.

Lower-priority`LSPS2ServiceHandler` API: Avoid explictly `drop`ping locksby Elias Rohrer · acb584d2 · Sep 25, 2025 · 1 fileMessage 85 · StrongLow 37Details
Commit message · Elias Rohrer

`LSPS2ServiceHandler` API: Avoid explictly `drop`ping locks

We previously added some explict `drop`s to make sure to drop locks
before persisting. While clippy warned us about them, they seemed
perfectly functional. However, it weirdly seems that `cargo` will run
the same static analysis on dependencies, which has LDK Node builds fail
with many dreaded 'isn't `Send`' error whenever we touch the async
`LSPS2ServiceHandler` API.

Here, we simply believe clippy that this is a bad idea and use scoping
over explict `drop`s to ensure we don't hold them anymore when
persisting.

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

This commit fixes a Rust async/locking issue in the LSPS2 service handler. Previously, the code used explicit `drop` calls to release locks before awaiting asynchronous persistence operations, and suppressed clippy warnings about holding locks across await points. The commit replaces those explicit drops with scoped blocks so locks are released automatically. This resolves build failures in downstream LDK Node caused by the lock guard type not being `Send`, which matters for async code. It is a code-quality and correctness fix rather than a direct exploit fix, but holding locks across await points can cause deadlocks or async runtime problems.

Lower-priorityDrop unnecessary `Arc`s in `lightning-liquidity`'s `EventQueue`by Matt Corallo · 5e679b43 · Sep 25, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Drop unnecessary `Arc`s in `lightning-liquidity`'s `EventQueue`

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 a straightforward internal code cleanup in the rust-lightning project's liquidity module. It removes unnecessary Arc (reference-counted pointer) wrappers around a few fields and switches an internal future type to borrow from its parent queue instead of cloning Arcs. There is no indication this fixes a security bug; it appears to be a refactor for simplicity and reduced overhead.

AI review queuedAllow passing an `OutputSweeperSync` to the sync-KVStore-async-BPby Matt Corallo · b68f128c · Sep 25, 2025 · 3 filesMessage 73 · AdequateInformational 19Details
Commit message · Matt Corallo

Allow passing an `OutputSweeperSync` to the sync-KVStore-async-BP

`OutputSweeper::new_with_kv_store_sync` is a pretty strange API -
it allows building an async `OutputSweeper` where the only `await`s
are on a sync `KVStore`, ie will immediately block until the IO
operation completes.

While this isn't broken (futures are allowed to take their time,
and async runtimes have to handle this, though they often don't
handle it particularly well), its pretty weird. It seems to exist
largely for `process_events_async_with_kv_store_sync`, which does
async `Event` handling but sync `KVStore` operations (like the
existing pre-0.2 "async" background processor).

Instead, we allow passing an `OutputSweeperSync` to
`process_events_async_with_kv_store_sync`, keeping the API
consistent such that a user would use the appropriate
`OutputSweeper` variant, but fetching the inner async
`OutputSweeper` inside the BP.

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: security-sensitive path
AI analysis · Informational 19/100

This commit is a code cleanup in the Lightning Dev Kit Rust library. It removes an awkward API that mixed synchronous storage with an asynchronous sweeper component, and instead lets callers pass a fully synchronous sweeper where synchronous storage is expected. There is no direct security vulnerability being fixed; it is an API-consistency and maintainability change.

Lower-priorityDrop `Arc`s around `lightning-liquidity`'s `DefaultTimeProvider`by Matt Corallo · 552cd39f · Sep 25, 2025 · 3 filesMessage 65 · AdequateInformational 15Details
Commit message · Matt Corallo

Drop `Arc`s around `lightning-liquidity`'s `DefaultTimeProvider`

There's no need for these given `DefaultTimeProvider` is a unit
struct.

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 small internal cleanup in the rust-lightning project. It removes unnecessary reference-counting wrappers (Arc) around a simple, zero-sized clock helper called DefaultTimeProvider, and adds a Deref implementation so the helper can be passed directly where an Arc was previously expected. There is no security-relevant change here.

Lower-priorityMove NegotiationContext checks into ConstructedTransactionby Jeffrey Czyz · 89e1f337 · Sep 25, 2025 · 1 fileMessage 85 · StrongInformational 12Details
Commit message · Jeffrey Czyz

Move NegotiationContext checks into ConstructedTransaction

Both NegotiationContext::validate_tx and ConstructedTransaction::new
contain validity checks. Move the former into the latter in order to
consolidate the checks in a single place. This will also allow for
reusing error construction in an upcoming commit.

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

This commit is a straightforward internal code refactor in the interactive transaction negotiation code. It moves existing validity checks from one function into another without changing the rules being enforced. There is no indication this fixes or introduces a security vulnerability.

Lower-priorityRe-order ConstructedTransaction::new checksby Jeffrey Czyz · 9c4cb91f · Sep 25, 2025 · 1 fileMessage 80 · StrongInformational 12Details
Commit message · Jeffrey Czyz

Re-order ConstructedTransaction::new checks

An upcoming commit will include the contributed inputs and outputs in
an error whenever ConstructedTransaction::new fails. In order to DRY up
that logic, this commit updates the constructor to create the resulting
object prior to performing any checks. This way a conversion method can
be added that extracts the necessary input and output data.

80/100 · StrongMessage clarity
✓ 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 simple internal code cleanup in the rust-lightning library. It rearranges the order in which a transaction-building constructor validates its inputs, moving the creation of the transaction object earlier so that future error messages can include more detail. There is no functional security change visible in the diff itself.

AI review queuedFix race condition causing async payment failureby Valentine Wallace · ade1f348 · Sep 24, 2025 · 4 filesMessage 68 · AdequateLow 43Details
Commit message · Valentine Wallace

Fix race condition causing async payment failure

As the LSP of an async sender, when we receive an update_add with the hold_htlc
flag set, after its onion is decoded we transition the pending HTLC to the
ChannelManager::pending_intercepted_htlcs. However, if we receive the
release_held_htlc message from the receiver *before* we've had a chance to make
this transition, we'll fail to release the HTLC and it will sit in the pending
intercepts map until it is failed backwards.

To fix this race condition, if we receive release_held_htlc from the recipient
we'll not only check the pending_intercepted_htlcs map for the presence of this
HTLC but also check the map where we keep HTLCs prior to their onions being
decoded.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Low 43/100

This commit fixes a timing bug in Lightning Dev Kit's 'async payments' feature. When a payment is held for an offline recipient, the sender's Lightning Service Provider (LSP) normally moves the held HTLC into an internal 'pending intercepts' map after decoding its onion. If the recipient comes online and sends a 'release' message before that move happens, the old code would miss the release instruction and eventually fail the payment backward. The fix makes the release handler also look in the pre-decode map and mark the HTLC to be released as soon as it is ready. The commit adds a regression test and extends the release message format to carry the channel alias and HTLC id needed for that lookup.

AI review queuedAdd `test_p2a_anchor_values_under_trims_and_rounds`by Leo Nash · 1618c77e · Sep 24, 2025 · 2 filesMessage 30 · OpaqueInformational 12Details
Commit message · Leo Nash

Add `test_p2a_anchor_values_under_trims_and_rounds`

30/100 · OpaqueMessage clarity
✓ Specific, descriptive subject! Too few words to establish purpose! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 12/100

This commit only adds a new automated test file for the Lightning Dev Kit. It checks how tiny 'anchor' output amounts are calculated and rounded in zero-fee commitment transactions. There is no change to production code, so by itself it does not fix or introduce a security issue.

Lower-priorityAdd 0FC case to `functional_tests::test_multiple_package_conflicts`by Leo Nash · 0c54c513 · Sep 24, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Leo Nash

Add 0FC case to `functional_tests::test_multiple_package_conflicts`

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 changes a test file. It refactors an existing regression test so it can run in two modes (with and without a newer anchor-channel feature called zero-fee-commitment anchors, or '0FC'), and adds a helper call to set up test funds. No production code is modified, so it cannot introduce a runtime security vulnerability by itself.

Lower-priorityAdd `insane_zero_fee_channel_open` test to exported testsby Carla Kirk-Cohen · 6a697b1a · Sep 24, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Carla Kirk-Cohen

Add `insane_zero_fee_channel_open` test to exported tests

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 changes a single Rust test annotation so that an existing test named `test_insane_zero_fee_channel_open` is included in the project's exported/external test suite. It does not modify production code, protocol logic, or any behavior visible to users or network peers. There is no security-relevant change.

Lower-prioritySplicing fix: use outbound_alias in manager mapsby Valentine Wallace · d323b9c7 · Sep 24, 2025 · 1 fileMessage 80 · StrongModerate 64Details
Commit message · Valentine Wallace

Splicing fix: use outbound_alias in manager maps

Since we have added/are adding splicing support, the scid of a channel is
liable to change post-splice.

Some maps in the ChannelManager are keyed by the scid of a channel, which is an
issue now -- if we forward an HTLC from a channel and then splice that
channel before the HTLC is resolved, we'll end up with an HTLC source with an
scid that doesn't correspond to any open channel. This may result in loss of
the HTLC resolution.

The outbound scid alias of a channel is stable even post-splice, so for the
short term here we switch to using that instead. In the medium term we should
update these maps to use (PublicKey, ChannelId) like everything else.

We don't always use the alias for outbound forwarded HTLCs, since we tend to
use whatever outbound scid is in the onion. That's fine because we properly
handle the case where the outbound channel cannot be found; the main problem is
in inbound HTLCs and forgetting their resolution.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Moderate 64/100

This commit fixes a bug in LDK's Lightning channel splicing support. When a channel is 'spliced' (its on-chain funding is changed), its short channel ID can change. Several internal maps that track pending HTLCs (payments being forwarded) were keyed by that changeable ID. If a splice happened while an HTLC was still in flight, the software could lose track of the payment's source and fail to resolve it, potentially causing loss of funds. The fix switches those maps to use the 'outbound SCID alias,' a stable identifier that survives splicing.

Lower-priorityAdd coverage for 0FC channels in `monitor_tests`by Leo Nash · 175a3e3d · Sep 24, 2025 · 2 filesMessage 55 · ThinInformational 19Details
Commit message · Leo Nash

Add coverage for 0FC channels in `monitor_tests`

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 19/100

This commit is almost entirely a test-file change. It expands existing Lightning channel monitor tests to also cover a new channel type called '0FC' (zero-fee commitments with pay-to-anchor anchors). A tiny non-test change renames a script-weight constant to distinguish 'keyed anchors' from 'pay-to-anchor anchors', but the value stays the same and the constant is only used in tests. There is no production bug fix or security patch here.

Lower-priorityAdd coverage for 0FC channels in `reorg_tests`by Leo Nash · 25fce0a3 · Sep 24, 2025 · 1 fileMessage 55 · ThinInformational 15Details
Commit message · Leo Nash

Add coverage for 0FC channels in `reorg_tests`

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

This commit only adds and updates test code in a Rust test file. It expands existing reorganization ('reorg') tests to also cover a new channel type called '0FC' (zero-fee commitments / p2a anchors). There are no changes to production code, no bug fixes, and no security patches in the diff.

Security candidateRun `async_signer_tests::test_async_holder_signatures` with P2A anchorsby Leo Nash · 2eb7d311 · Sep 24, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Leo Nash

Run `async_signer_tests::test_async_holder_signatures` with P2A anchors

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

This commit only changes test code. It expands an existing test to also exercise a new type of anchor output (P2A anchors) alongside the existing keyed-anchor variant. There is no change to production code, so it does not introduce or fix a live security vulnerability on its own.

AI review queuedAdjust the weight of htlc success and timeout witnesses in 0FC channelsby Leo Nash · bb3eeeda · Sep 24, 2025 · 2 filesMessage 50 · ThinLow 42Details
Commit message · Leo Nash

Adjust the weight of htlc success and timeout witnesses in 0FC channels

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

This commit updates how transaction weight (a measure of data size) is estimated for Lightning channel fee bumping when handling HTLCs (conditional Bitcoin payments). It distinguishes between two newer channel types: one using 'keyed' anchors and one using 'pay-to-anchor' (P2A) outputs. The P2A variant is slightly lighter because it removes a 1-block CSV delay. The change is a correctness fix for fee estimation; if the weight were wrong, transactions could be under- or over-paying fees, potentially causing delays or stuck funds, but it is not a direct theft or key-leak vulnerability.

Lower-priorityAllow a single P2A output to be below dust in `check_spends!`by Leo Nash · 7a9d7133 · Sep 24, 2025 · 1 fileMessage 50 · ThinInformational 16Details
Commit message · Leo Nash

Allow a single P2A output to be below dust in `check_spends!`

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

This commit changes an internal test helper, not production code. It relaxes a test-only dust-check so that transactions containing one special below-dust output (a shared anchor used in zero-fee commitment transactions) no longer fail the assertion. There is no direct security vulnerability in the change itself; it is a test-infrastructure update to match new expected on-chain behavior.