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
83commits · 30 days
182commits · 60 days
554commits · 180 days
1256commits · 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 38 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-priorityReplace `StateMachine::default` use with `core::mem::replace`by Matt Corallo · a8b990ad · Oct 30, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Replace `StateMachine::default` use with `core::mem::replace`

`clippy` now complains that `Default` for the interactive tx
constructor `StateMachine` can be auto-derived, but its a bit weird
to have a `Default` that loads an invalid ("indeterminate") state.
Instead, we replace the one line that actually cares about the
`Default` (which uses `core::mem::take`) with `core::mem::replace`,
making it more explict.

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 code cleanup change. It removes a manually-written 'default' value for an internal state-machine type and replaces one use of a standard-library helper (core::mem::take) with a slightly more explicit one (core::mem::swap). The behavior is functionally identical: the state machine is still briefly put into a placeholder 'Indeterminate' state while a transition runs. There is no security fix here.

AI review queuedAdd `readme` fields to most crates' `Cargo.toml`sby Matt Corallo · 1605291b · Oct 30, 2025 · 9 filesMessage 80 · StrongInformational 15Details
Commit message · Matt Corallo

Add `readme` fields to most crates' `Cargo.toml`s

`crates.io` will show any README/README.md which apears in the
crate which is uploaded, but it doesn't consider the README from
the workspace, only if its in the crate itself.

Instead, add the `readme` field so that the workspace README also
gets uploaded.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit only adds README file references to the packaging metadata for several Rust crates. It is a documentation/packaging improvement with no effect on program behavior or security.

Lower-priorityInclude monitor name in error when failing to load a monitorby Matt Corallo · a4f46639 · Oct 30, 2025 · 1 fileMessage 93 · StrongInformational 15Details
Commit message · Matt Corallo

Include monitor name in error when failing to load a monitor

If we fail to load a `ChannelMonitor` due to the new limits in LDK
0.2, its useful to communicate which monitor failed, which we do
here.

Requested at
https://github.com/lightningdevkit/rust-lightning/pull/4146#discussion_r2418136988

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 only improves an error message by adding the name of a ChannelMonitor that failed to load. It is a diagnostic/logging improvement, not a security fix.

Lower-priorityDont pass objects to anchor reserves calculator by ref-refby Matt Corallo · e4512d1c · Oct 30, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Dont pass objects to anchor reserves calculator by ref-ref

If we're already passing `AChannelManagerRef` and `ChainMonitorRef`
to `can_support_additional_anchor_channel` there's no need to take
them by reference.

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 minor code cleanup that changes how two objects are passed into an internal helper function. Instead of passing references to references, the function now takes the objects directly. There is no security issue here and no behavior change.

Lower-priorityDrop `WebhookNotification::new` in favor of explicit constructionby Matt Corallo · b10a4e87 · Oct 30, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Drop `WebhookNotification::new` in favor of explicit construction

`WebhookNotification` already has all fields `pub`, making its
`new` constructor somewhat redundant, but also conflicting with the
bindings-auto-generated `new` constructor. Thus we just drop it.

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

This commit removes a redundant internal constructor method from a Rust struct used for webhook notifications in a Lightning liquidity protocol. It is a routine code cleanup with no security implications.

Lower-priorityMake `LSPS5ServiceEvent::SendWebhookNotification::headers` a Vecby Matt Corallo · 031a987b · Oct 30, 2025 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Make `LSPS5ServiceEvent::SendWebhookNotification::headers` a Vec

While HTTP headers should be a unique K->V mapping, returning three
headers to a user in an event via a `HashMap` is substantially
overkill (and also not trivial to do in bindings). Instead, we
expose them as a `Vec`.

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 straightforward internal API refactor: it changes how three HTTP webhook headers are packaged in an event from a key-value map (HashMap) to a list of pairs (Vec). The commit message explicitly states the reason is to reduce complexity and improve compatibility with language bindings, not to fix a security bug. There is no security relevance in the diff itself.

Lower-priorityClarify that all removals must be well-ordered, even `lazy` onesby Matt Corallo · 0f9548bf · Oct 30, 2025 · 1 fileMessage 73 · AdequateInformational 20Details
Commit message · Matt Corallo

Clarify that all removals must be well-ordered, even `lazy` ones

In the previous commit we reverted
561da4cfb8cd27085b124ae1af96a8745f7f31dc. One of the motivations
for it (in addition to `lazy` removals being somewhat less, though
still arguably useful in an async context) was that the ordering
requirements of `lazy` removals is somewhat unclear.

Here we simply default to the simplest safe option, requiring a
total order across all `write` and `remove` operations to the same
key, `lazy` or not.

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

This commit only changes documentation comments in a Rust source file. It clarifies that storage removals (including lazy ones) must stay in a consistent order with writes to the same key. There is no code change, so it does not by itself fix a runnable bug or introduce a vulnerability. It is a safety clarification for developers building storage backends.

Lower-priorityRevert "Remove `lazy` flag from `{KVStore,KVStoreSync}::remove`"by Matt Corallo · 3b4c2ff2 · Oct 30, 2025 · 8 filesMessage 81 · StrongInformational 19Details
Commit message · Matt Corallo

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

This reverts commit 561da4cfb8cd27085b124ae1af96a8745f7f31dc.

A user pointed out, when looking to upgrade to LDK 0.2, that the
`lazy` flag is actually quite important for performance when using
a `MonitorUpdatingPersister`, especially in synchronous persistence
mode.

Thus, we add it back here.

Fixes #4188

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 19/100

This commit restores a `lazy` flag on the `remove` methods of LDK's key-value store traits. When `lazy=true`, deletions can be batched or delayed to reduce disk I/O, but they may not survive a crash. The change is framed by the authors as a performance fix, not a security fix. It does not introduce an exploitable vulnerability on its own; it gives callers explicit control over durability versus speed.

Lower-priorityAdd CHANGELOG entries for 0.1 patch releasesby Matt Corallo · 32b469f8 · Oct 29, 2025 · 1 fileMessage 45 · ThinCritical 90Details
Commit message · Matt Corallo

Add CHANGELOG entries for 0.1 patch releases

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Critical 90/100

This commit only adds text to the project's CHANGELOG, summarizing what was already fixed in prior 0.1.x patch releases. It does not change any code. However, the changelog text itself discloses several serious security bugs that were fixed in those earlier releases, including vulnerabilities that could allow loss of funds, denial of service, and forced channel closures. Because the commit is a documentation-only disclosure of already-patched security issues, the code change itself is harmless, but the changelog content is highly security-relevant.

Lower-priorityNote the mempool policy requirements of zero-fee commitment channelsby Leo Nash · 426c8817 · Oct 29, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Leo Nash

Note the mempool policy requirements of zero-fee commitment channels

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 a documentation comment explaining that a new type of Lightning channel (zero-fee commitment channels) needs specific Bitcoin network relay support to work properly during force-closes. No code behavior changed, so there is no security vulnerability in the patch itself.

AI review queuedRemove `Send + Sync` bounds when `no-std`by Fedeparma74 · 8e4b8e4c · Oct 29, 2025 · 8 filesMessage 45 · ThinInformational 17Details
Commit message · Fedeparma74

Remove `Send + Sync` bounds when `no-std`

45/100 · ThinMessage clarity
✓ 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 · Informational 17/100

This commit relaxes Rust type-system requirements (Send + Sync bounds) for the library's 'no-std' build mode and generalizes an internal future type alias. It is a portability and API cleanup change. There is no direct evidence in the commit that it fixes an exploitable security vulnerability; it is more likely a correctness/compatibility improvement for embedded or single-threaded environments.

AI review queuedAdd fmt::Debug implementation for FundedChannelby Joost Jager · 067d659a · Oct 29, 2025 · 7 filesMessage 55 · ThinInformational 15Details
Commit message · Joost Jager

Add fmt::Debug implementation for FundedChannel

To aid with debugging in tests.

55/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit only adds Rust Debug formatting implementations to internal data structures so developers can print them during tests. It does not change any logic, network behavior, cryptography, or access controls, and therefore has no security relevance.

Lower-priorityDrop unnecessary `&mut` on `self` in `ChannelMonitor::filter_block`by Matt Corallo · e1a42598 · Oct 29, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Drop unnecessary `&mut` on `self` in `ChannelMonitor::filter_block`

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

This commit changes a single Rust function signature from requiring a mutable (writable) reference to the channel monitor to only requiring a shared (read-only) reference. The function only reads watched outputs to filter transactions, so the mutable reference was unnecessary. This is a code-quality/API cleanup with no security-relevant behavior change.

AI review queuedDon't broadcast manual-funded chan closing txn on HTLC timeoutsby Matt Corallo · a979c33e · Oct 29, 2025 · 1 fileMessage 85 · StrongLow 44Details
Commit message · Matt Corallo

Don't broadcast manual-funded chan closing txn on HTLC timeouts

In 6c5ef049b8d0ec174d7368d48b7b429efffb4a61 we prevented broadcast
of the commitment transactions if the funding transaction has not
yet appeared on-chain for manual-broadcast channels to avoid
spurious bumps or unbroadcastable transactions. However, we missed
the case where a channel is closed due to HTLCs timing out.

Here we fix that by doing the same broadcast-gating when
automatically force-closing a channel due to HTLC timeouts.

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
second-pass: broader security terminology
AI analysis · Low 44/100

This patch fixes a follow-up bug in the Lightning Dev Kit's channel monitor. For channels where the user manually broadcasts the funding transaction, the software could incorrectly try to broadcast a force-closing transaction before the funding transaction had actually appeared on-chain—specifically when HTLC payments timed out. This could lead to wasted transaction fees, failed broadcasts, or unnecessary on-chain activity. The fix applies the same safety gate already used for normal commitment broadcasts to the HTLC-timeout force-close path.

Lower-priorityRewrite first manual-broadcast test to test several more casesby Matt Corallo · e2831cf7 · Oct 29, 2025 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Rewrite first manual-broadcast test to test several more cases

This rewrites
`test_manual_broadcast_skips_commitment_until_funding` to test
manual-broadcast channel closing for both forced-broadcast and
close-due-to-HTLC-expiry closes as well as 0-conf and non-0-conf
channels.

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 rewrites and expands an existing automated test. It adds more test cases for manually-funded Lightning channels (including zero-confirmation opens and timeout-based closes) and refactors test helper functions to support those scenarios. There is no change to production code, no bug fix, and no security patch.

Lower-priorityRemove remaining (now-redundant) manual-broadcast testsby Matt Corallo · 2ce69f6e · Oct 29, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Remove remaining (now-redundant) manual-broadcast tests

The remaining two manual-broadcast tests were made redundant by the
previous commit which expanded the coverage of the first test. Thus
we remove the two other tests.

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 simply deletes two automated test cases from the codebase because they were made redundant by a prior test expansion. No production code, user-facing behavior, or security-sensitive logic was changed. It is a routine test-maintenance cleanup.

Lower-priorityAvoid bothering to prep for broadcast if we aren't gonna broadcastby Matt Corallo · 91aeac1d · Oct 29, 2025 · 1 fileMessage 73 · AdequateInformational 24Details
Commit message · Matt Corallo

Avoid bothering to prep for broadcast if we aren't gonna broadcast

In `generate_claimable_outpoints_and_watch_outputs` if we're going
to decide to return nothing and defer broadcasting the commitment
transaction, there's no need to prepare the broadcast tracking
objects, so skip it.

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

This is a small internal cleanup in the code that handles Lightning channel closure broadcasts. It moves an early-exit check earlier in a function so that, in a special 'manual broadcast' mode, the code skips unnecessary setup work when it already knows it will not actually broadcast anything yet. The change does not alter the final return values or the conditions under which broadcasting happens; it only avoids doing some now-pointless work. There is no direct security fix here, but it reduces the chance of future logic mistakes by making the intent clearer.

AI review queuedImplement Holder HTLC claim chunking for 0FC channelsby Leo Nash · 4e4a4945 · Oct 28, 2025 · 12 filesMessage 85 · StrongModerate 58Details
Commit message · Leo Nash

Implement Holder HTLC claim chunking for 0FC channels

Otherwise, we could hit the max 10_000vB size limit on V3 transactions
(BIP 431 rule 4).

Also introduce a `max_tx_weight` parameter to `select_confirmed_utxos`.
This constraint makes sure anchor and HTLC transactions in 0FC channels
satisfy the `TRUC_MAX_WEIGHT` and the `TRUC_CHILD_MAX_WEIGHT`
maximums.

Expand the coin-selection algorithm provided for any `T: WalletSource`
to satisfy this new constraint.

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
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Moderate 58/100

This commit fixes a design limitation in Lightning Dev Kit's handling of zero-fee commitment (0FC) channels. In those channels, on-chain transactions must follow Bitcoin's version-3 (TRUC) rules, which impose strict size limits: a parent commitment transaction can be at most 10,000 vB, and its child anchor/HTLC transactions can be at most 1,000 vB. Previously, LDK could try to claim too many HTLCs in a single transaction or select too many wallet inputs for an anchor transaction, producing a transaction that the network would reject. The patch splits large HTLC claims into multiple smaller transactions and teaches the coin-selection algorithm to respect a maximum transaction weight. It also updates the public API for wallet coin selection to accept a new max_tx_weight parameter. This is a correctness/robustness improvement rather than a remote-exploitable vulnerability.

Lower-priorityAlways broadcast closing txn in monitor manually broadcastby Matt Corallo · 64bb44c4 · Oct 28, 2025 · 1 fileMessage 85 · StrongLow 44Details
Commit message · Matt Corallo

Always broadcast closing txn in monitor manually broadcast

In 6c5ef049b8d0ec174d7368d48b7b429efffb4a61 we prevented broadcast
of the commitment transactions if the funding transaction has not
yet appeared on-chain for manual-broadcast channels to avoid
spurious bumps or unbroadcastable transactions. It also updated
the documentation on
`ChanelMonitor::broadcast_latest_holder_commitment_txn` to
explicitly state that it will override the manual-broadcast state
and broadcast the latest commitment anyway.

However, 4131680db4c9ff934e83940be1158f8b1cc0f8cf accidentally
reverted this behavior by updating
`generate_claimable_outpoints_and_watch_outputs`, which is caled by
`broadcast_latest_holder_commitment_txn` to also refuse to
broadcast if funding has not been seen on chain.

Here we fix this, passing through the `require_funding_seen` bool
to allow `broadcast_latest_holder_commitment_txn` to broadcast
immediately.

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

This commit fixes a regression in the Lightning Dev Kit's channel monitor. A previous change accidentally made it impossible to manually force-broadcast a closing transaction for certain channels before the funding transaction was seen on-chain. The fix restores the intended behavior: when a user explicitly asks to broadcast the latest commitment transaction, the monitor will do so immediately, while other automatic paths still wait for the funding transaction to appear on-chain to avoid creating invalid or premature transactions.

Lower-priorityEnsure we call `send_data` when we need to pause/unpause readsby Matt Corallo · 77cbb61f · Oct 28, 2025 · 1 fileMessage 73 · AdequateLow 49Details
Commit message · Matt Corallo

Ensure we call `send_data` when we need to pause/unpause reads

In the previous commit, we moved the `send_data` `resume_read` flag
to also indicate that we should pause if its unset. This should
work as we mostly only set the flag when we're sending but may
cause us to fail to pause if we are blocked on gossip validation
but `awaiting_write_event` wasn't set as we had previously failed
to fully flush a buffer (which no longer implies read-pause).

Here we make this logic much more robust by ensuring we always make
at least one `send_data` call in `do_attempt_write_data` if we
need to pause read (or unpause read).

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

This commit fixes a logic bug in how Lightning Dev Kit tells the network layer to pause or resume reading data from a peer. Previously, after a partial buffer flush, the code could fail to tell the socket driver to pause reads even though it was busy validating gossip messages. The fix ensures at least one 'send_data' call is made whenever the desired read-pause state does not match the last state we told the driver about. This is a robustness fix in backpressure handling, not a clear-cut remote exploit.

Lower-priorityRename `PeerManager::peer_should_read` for clarityby Matt Corallo · 467d311c · Oct 28, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Rename `PeerManager::peer_should_read` for clarity

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 renames an internal method from `peer_should_read` to `should_read_from` to make its purpose clearer. No behavior, logic, or security properties of the code are changed.

Lower-priorityTest manual broadcast tracking and holder commit flowby Martin Saposnic · ea95a15e · Oct 28, 2025 · 3 filesMessage 83 · StrongInformational 15Details
Commit message · Martin Saposnic

Test manual broadcast tracking and holder commit flow

Tests that holder commitment broadcasts are properly deferred until
funding confirms, and that the full manual-funding flow works correctly.

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 new tests and a test helper for the 'manual broadcast' funding flow in a Lightning network library. It does not change production behavior, fix a bug, or alter security-critical code. The tiny code change in channelmonitor.rs is just adding a trailing comma in a test module. There is no security issue here.

Lower-priorityDefer claimable tracking until funding tx confirmsby Martin Saposnic · 4131680d · Oct 28, 2025 · 1 fileMessage 85 · StrongLow 32Details
Commit message · Martin Saposnic

Defer claimable tracking until funding tx confirms

For manually-broadcast funding, we can't track claimable outputs until
the funding tx is actually onchain. Otherwise we'd try to claim outputs
that don't exist yet.

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

This patch fixes a logic bug in rust-lightning's channel monitor for manually-broadcast funding transactions. Previously, the monitor could try to claim outputs and watch for spending transactions before the funding transaction had actually appeared on the blockchain, which could lead to wasted work, incorrect state, or spurious errors. The fix defers all claimable-output tracking until the funding transaction is confirmed on-chain, and avoids generating duplicate claims when a block is processed.

Lower-priorityQueue holder commit once funding tx confirmsby Martin Saposnic · be1955a2 · Oct 28, 2025 · 1 fileMessage 68 · AdequateModerate 57Details
Commit message · Martin Saposnic

Queue holder commit once funding tx confirms

Sets should_broadcast_commitment=true when funding confirms.

Since we skip the initial broadcast when funding_seen_onchain is false,
we need to queue it once funding actually hits the chain.

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

This patch fixes a logic gap in Lightning Dev Kit's channel monitoring. When a user manually chooses not to broadcast their side of a new channel immediately, the code was supposed to queue that broadcast for once the funding transaction is seen on the blockchain. Before this fix, the queueing did not happen, so the holder's commitment transaction might never be broadcast automatically. That could leave funds at risk if the counterparty misbehaved after the channel opened.

Lower-priorityGate holder broadcast queueing on funding confirmationby Martin Saposnic · 6c5ef049 · Oct 28, 2025 · 1 fileMessage 73 · AdequateLow 34Details
Commit message · Martin Saposnic

Gate holder broadcast queueing on funding confirmation

Don't queue holder commitment broadcasts until funding is confirmed,
unless explicitly overridden via broadcast_latest_holder_commitment_txn.

Attempting to broadcast commitments before funding confirms would fail
mempool validation since the funding output doesn't exist yet.

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

This change fixes a logic bug in Lightning Dev Kit's channel monitor. When a user manually broadcasts their own funding transaction (rather than letting LDK do it automatically), the software could previously try to broadcast a commitment transaction before the funding transaction had actually appeared on the blockchain. Because commitment transactions spend the funding output, broadcasting them too early would fail mempool validation and could generate unnecessary fee-bumping notifications for transactions that cannot yet confirm. The patch suppresses automatic commitment broadcasts until the funding transaction is observed on-chain, while still allowing an explicit override via a public API method.