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
73commits · 30 days
208commits · 60 days
663commits · 180 days
1488commits · 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 26 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 candidateRetransmit announcement_signatures if requestedby Jeffrey Czyz · ff98bbf5 · Sep 3, 2025 · 2 filesMessage 58 · ThinLow 35Details
Commit message · Jeffrey Czyz

Retransmit announcement_signatures if requested

The previous commit allowed requesting retransmission of
announcement_signatures during channel reestablishment. This commit
handles such requests.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 35/100

This commit completes a feature that lets a Lightning node ask its peer to resend 'announcement_signatures' messages during channel reestablishment. These signatures are needed to publicly announce a channel on the network. The change simply adds the logic to honor that request, matching a protocol rule. It is a follow-up implementation patch, not a fix for an active vulnerability.

Security candidateRequest announcement_signatures retransmissionby Jeffrey Czyz · 734452ca · Sep 3, 2025 · 2 filesMessage 58 · ThinLow 34Details
Commit message · Jeffrey Czyz

Request announcement_signatures retransmission

During channel reestablishment, announcement_signatures may need to be
retransmitted. The splicing spec allows doing so without retransmitting
splice_locked first, which could normally trigger retransmitting
announcement_signatures. Instead, my_current_funding_locked lets the
sender request retransmitting it.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 34/100

This commit changes how Lightning nodes request missing announcement signatures after a channel reconnects. It adds a flag to the FundingLocked message so a node can explicitly ask its peer to resend announcement_signatures when needed, rather than relying on the older splice_locked retransmission path. This is a protocol-correctness improvement for splicing; it does not appear to be a direct exploit fix.

Security candidateUpdate next_funding_txid logic for channel_reestablishby Jeffrey Czyz · 77747c0a · Sep 3, 2025 · 3 filesMessage 85 · StrongLow 43Details
Commit message · Jeffrey Czyz

Update next_funding_txid logic for channel_reestablish

The splicing spec updates the logic pertaining to next_funding_txid when
handling a channel_reestablish message. Specifically:

A receiving node:
- if `next_funding_txid` is set:
- if `next_funding_txid` matches the latest interactive funding transaction
or the current channel funding transaction:
- if `next_commitment_number` is equal to the commitment number of the
`commitment_signed` message it sent for this funding transaction:
- MUST retransmit its `commitment_signed` for that funding transaction.
- if it has already received `commitment_signed` and it should sign first,
as specified in the [`tx_signatures` requirements](#the-tx_signatures-message):
- MUST send its `tx_signatures` for that funding transaction.
- if it has already received `tx_signatures` for that funding transaction:
- MUST send its `tx_signatures` for that funding transaction.
- if it also sets `next_funding_txid` in its own `channel_reestablish`, but the
values don't match:
- MUST send an `error` and fail the channel.
- otherwise:
- MUST send `tx_abort` to let the sending node know that they can forget
this funding transaction.

Note that the spec is in flux. Instead, next_funding_txid is replaced
with next_funding, which contains both a txid and retransmit_flags. The
latter is used instead of next_commitment_number to determine whether
commitment_signed should be retransmitted.

This commit updates FundedChannel::channel_reestablish accordingly.

Co-authored-by: Wilmer Paulino <wilmer@wilmerpaulino.com>
Co-authored-by: Jeffrey Czyz <jkczyz@gmail.com>

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 boundary
AI analysis · Low 43/100

This commit updates how the Lightning Dev Kit (LDK) node handles reconnection messages for channels that are in the middle of creating a new funding transaction (a 'splicing' or interactive funding flow). It replaces a simple transaction ID field with a richer structure that also carries flags telling the peer which messages to re-send. The change is a protocol-conformance update for a still-evolving Lightning specification; it does not appear to be a fix for an active security vulnerability, but it prevents possible state mismatches during reconnections.

Security candidateClear announcement_sigs on FundingScope promotionby Jeffrey Czyz · 70508569 · Sep 3, 2025 · 1 fileMessage 80 · StrongLow 45Details
Commit message · Jeffrey Czyz

Clear announcement_sigs on FundingScope promotion

When a splice transaction is promoted (i.e., when splice_locked has been
exchanged), announcement_signatures must be sent. However, if we try to
send a channel_announcement before they are received, then the
signatures will be incorrect. To avoid this, clear the counterparty's
announcement_signatures upon promoting a FundingScope.

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 boundary
AI analysis · Low 45/100

This patch fixes a Lightning channel bug that could produce an invalid channel announcement after a splice is finalized. When a channel is spliced (its on-chain funds are moved to a new transaction), both sides must exchange fresh announcement signatures before re-announcing the channel to the network. The bug caused the old counterparty signature to be kept briefly after the splice was promoted, so if the node tried to build and send a channel_announcement before the new signature arrived, it would use a stale signature and create an invalid message. The fix simply clears the old signature when the splice is promoted, forcing the node to wait for the new one. There is no direct theft-of-funds path, but it could cause gossip inconsistencies or a peer to send invalid protocol messages.

Lower-priorityRemove unnecessary next_funding checkby Jeffrey Czyz · 976381a4 · Sep 3, 2025 · 1 fileMessage 58 · ThinLow 26Details
Commit message · Jeffrey Czyz

Remove unnecessary next_funding check

During channel_reestablish handling, next_local_commitment_number can
never be zero. Remove the unnecessary check conditioning on next_funding
not being set. Additionally, remove the spec requirement in the comment
that follows since it does not exist.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Low 26/100

This commit tightens a validation check during Lightning channel reconnection. It removes a special case that allowed a peer to send a zero commitment counter without also providing next_funding data. The change makes the code reject that zero-counter case outright, which is described as safe because the counter should never be zero at this stage. The commit also deletes an incorrect comment that cited a non-existent specification requirement.

Lower-priorityHandle implicit splice_locked during channel_reestablishby Jeffrey Czyz · d4ddbc4e · Sep 3, 2025 · 2 filesMessage 73 · AdequateModerate 54Details
Commit message · Jeffrey Czyz

Handle implicit splice_locked during channel_reestablish

When handling a counterparties channel_reestablish, the spec dictates
that a splice_locked may be implied by my_current_funding_locked.
Compare that against any pending splices and handle an implicit
splice_locked message when applicable.

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

This commit fixes a protocol-handling bug in LDK's Lightning splicing feature. When two peers reconnect after a splice, the Lightning spec says a 'splice_locked' message can be implied by the other peer's current funding state. LDK previously did not recognize this implied signal, which could leave a splice stuck or cause the channel to behave incorrectly after reconnection. The change detects the implicit splice_locked and processes it normally.

Security candidateDon't retransmit tx_signatures pending monitor updateby Jeffrey Czyz · 73639c3b · Sep 3, 2025 · 1 fileMessage 65 · AdequateModerate 60Details
Commit message · Jeffrey Czyz

Don't retransmit tx_signatures pending monitor update

The ChannelMonitor must be successfully persisted before transmitting
any messages.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing boundary
AI analysis · Moderate 60/100

This commit fixes a timing issue in the Lightning Dev Kit where a node could send transaction signatures to its peer before its own local safety record (the ChannelMonitor) had been saved. Sending signatures too early could, in edge cases, leave the node in a vulnerable or inconsistent state if something crashed or went wrong before the save completed. The fix simply waits to send signatures until the monitor update is finished.

Security candidateCorrectly order channel_ready on channel_reestablishby Jeffrey Czyz · a0b6dd60 · Sep 3, 2025 · 2 filesMessage 85 · StrongModerate 63Details
Commit message · Jeffrey Czyz

Correctly order channel_ready on channel_reestablish

When handling channel_reestablish, the order in which channel_ready is
sent depends on whether or not the initial commitment_signed /
tx_signatures are being retransmitted. When they are, then channel_ready
should come after them. Otherwise, channel_ready should come before any
commitment_signed.

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 boundary
AI analysis · Moderate 63/100

This patch fixes the order in which Lightning messages are resent when a connection comes back after being dropped. In some channel states, the node was sending 'channel_ready' before the initial signatures it depends on, or after them when it shouldn't. The fix adds a new ordering flag so the correct sequence is used depending on whether the channel is still finalizing its funding transaction or is already operational. A wrong order could confuse a peer and prevent the channel from resuming correctly, potentially causing a denial of service or funds to be stuck.

Security candidateMake BlindedMessagePath creation infallibleby Valentine Wallace · 11f3476c · Sep 3, 2025 · 7 filesMessage 63 · AdequateLow 36Details
Commit message · Valentine Wallace

Make BlindedMessagePath creation infallible

The LDK codebase in general is comfortable panicking if the entropy source
provided to it is dysfunctional. Up until now we made an exception for blinded
path creation, where we would handle an error that could occur on mul_tweak
that could only occur if the session_priv provided was not actually random.
In comparable cases in onion_utils, we would panic instead.

In upcoming commits, we will be including blinded paths in outbound
revoke_and_ack messages as part of implementing async payments, where it is
difficult to handle failing back an HTLC if blinded path creation fails. Thus
we now have an incentive to make the blinded path creation methods infallible,
so do so here.

63/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
entropy or randomness
AI analysis · Low 36/100

This commit changes how LDK builds private 'blinded' communication paths so that the creation process can no longer fail in normal use. Previously, a bad random number could cause path creation to return an error. Now the code will panic (crash the program) instead if that happens, matching how LDK already handles broken randomness elsewhere. The change is described by the developers as a cleanup to simplify upcoming async-payments work, not as a fix for an active security bug.

Lower-priorityDRY HTLCPreviousHopData creationby Valentine Wallace · 84c997df · Sep 3, 2025 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Valentine Wallace

DRY HTLCPreviousHopData creation

In upcoming commits, we will be adding several more conversions from
PendingAddHTLCInfo into HTLCPreviousHopData. This conversion gets repeated all
over the ChannelManager already, so lay some groundwork by DRYing it up.

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

This commit is a straightforward internal code cleanup in the Lightning Dev Kit's channel manager. It removes repeated code that builds a data structure called HTLCPreviousHopData by replacing those copies with a single helper method. There is no change to user-facing behavior, network protocol handling, or security logic.

Lower-priorityDRY PendingAddHTLCInfo creation in forward_htlcsby Valentine Wallace · 8173ac0c · Sep 3, 2025 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Valentine Wallace

DRY PendingAddHTLCInfo creation in forward_htlcs

Without this DRYing, we would be repeating the same code to instantiate the
PendingAddHTLCInfo several more times in this method, in upcoming commits.

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

This commit is a straightforward code cleanup with no security impact. It removes repeated construction of the same data structure in one function and replaces it with a single shared variable. The behavior of the program is unchanged.

AI review queuedAdd a method to avoid re-persisting monitors during startupby Matt Corallo · d3779580 · Sep 3, 2025 · 5 filesMessage 85 · StrongInformational 20Details
Commit message · Matt Corallo

Add a method to avoid re-persisting monitors during startup

Prior to LDK 0.1, in rare cases we could replay payment claims to
`ChannelMonitor`s on startup, which we then expected to be
persisted prior to normal node operation. This required
re-persisting `ChannelMonitor`s after deserializing the
`ChannelManager`, delaying startup in some cases substantially.

In 0.1 we fixed this, moving claim replays to the background to run
after the `ChannelManager` starts operating (and only
updating/persisting changes to the `ChannelMonitor`s which need
it). However, we didn't actually enable this meaningfully in our
API - nearly all users use our `ChainMonitor` and the only way to
get a chanel into `ChainMonitor` is through the normal flow which
expects to persist.

Here we add a simple method to load `ChannelMonitor`s into the
`ChainMonitor` without persisting them.

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 · Informational 20/100

This commit adds a new startup-only API method that lets LDK nodes load already-saved channel monitors without rewriting them to disk. It is a performance and reliability improvement, not a security fix, and does not change how normal channel watching works.

AI review queuedCheck v2 reserves after `funding_contribution_satoshis` is appliedby Leo Nash · 85a02cac · Sep 2, 2025 · 2 filesMessage 73 · AdequateModerate 59Details
Commit message · Leo Nash

Check v2 reserves after `funding_contribution_satoshis` is applied

We check this when validating `splice_init`, `splice_ack` messages, and
also when validating user-specified contributions.

From BOLT 2:
```
- If `funding_contribution_satoshis` is negative and its absolute value
is greater than the sending node's current channel balance:
- MUST send a `warning` and close the connection or send an `error`
and fail the channel.
```

and further down:
```
If a side does not meet the reserve requirements, that's OK: but if they
take funds out of the channel, they must ensure that they do meet them.
If your peer adds a massive amount to the channel, then you only have
to add more reserve if you want to contribute to the splice (and you
can use `tx_remove_output` and/or `tx_remove_input` part-way through if
this happens).
```

Therefore, we check the v2 reserve anytime
`funding_contribution_satoshis` is not equal to zero.

We allow parties to draw from their previous reserve, as long as they
satisfy their v2 reserve.

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 · Moderate 59/100

This commit tightens the rules for Lightning channel splicing (a way to add or remove funds from an existing channel). It makes sure that after a splice, each side still has enough money left in the channel to meet the required 'channel reserve'—a safety buffer meant to discourage cheating. Before this change, the code did not fully enforce that reserve check when a splice removed funds, which could have let one party drain too much money and leave the channel in a risky state. The patch also cleans up overflow checks and fee handling.

AI review queuedAdd `NextCommitmentStats::get_balances_including_fee`by Leo Nash · 13ccaa35 · Sep 2, 2025 · 1 fileMessage 63 · AdequateInformational 17Details
Commit message · Leo Nash

Add `NextCommitmentStats::get_balances_including_fee`

`NextCommitmentStats` provides the commitment transaction fee as a
separate value to assist with applying a multiplier on it in
`can_accept_incoming_htlc`.

Nonetheless in most cases, we want the balances to include the
commitment transaction fee, so here we add a helper that gives us these
balances.

Also make the style of `tx_builder::subtract_addl_outputs` consistent
with `get_balances_including_fee`.

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 17/100

This commit adds a small helper function to include transaction fees when calculating Lightning channel balances. It also makes an existing internal function's code style match the new helper. There is no obvious security bug being fixed; it appears to be a routine code cleanup and convenience addition.

AI review queuedMake `for_splice` infallibleby Leo Nash · bfa0f95c · Sep 2, 2025 · 1 fileMessage 35 · OpaqueLow 29Details
Commit message · Leo Nash

Make `for_splice` infallible

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

This commit changes an internal function called `for_splice` so it no longer returns an error. Previously, the function could fail and callers used `?` to propagate that failure. Now it always succeeds. The change is small and appears to be a code-cleanup step in the unfinished splicing feature, but the commit message gives no explanation of why the function was made infallible or what error conditions were removed. Without more context, it is unclear whether this removes a safety check that protected against invalid splice parameters.

Lower-priorityAdd `validate_splice_ack` helper functionby Leo Nash · 35d6f65c · Sep 2, 2025 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Leo Nash

Add `validate_splice_ack` helper function

As in `splice_init`, this helps clearly delineate `splice_ack` message
validation from the subsequent state mutations.

This is a code-move.

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

This commit is a pure code reorganization: it moves the validation logic for a 'splice_ack' message into a new helper function called validate_splice_ack, then makes the existing splice_ack handler call that helper. No behavior changes, no new checks, no security fixes, and no new vulnerabilities are introduced.

Lower-priorityCorrect the reserve minimums in `FundingScope::for_splice`by Leo Nash · 917ee4a3 · Sep 2, 2025 · 1 fileMessage 65 · AdequateModerate 57Details
Commit message · Leo Nash

Correct the reserve minimums in `FundingScope::for_splice`

The reserve we should maintain on our own transaction should be greater
than our own dust limit.

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

This commit fixes a swap in the Lightning channel splicing code. When a channel's funding is changed via splicing, each side must keep a minimum reserve balance to prevent the other side from pushing tiny, spammy transactions. The code had accidentally used the counterparty's dust limit when calculating the reserve that protects our own transactions, and used our own fixed minimum dust limit when calculating the reserve that protects the counterparty's transactions. The patch swaps them back so each side's reserve is based on the correct dust limit. A wrong reserve could let a peer set an abnormally low reserve, potentially enabling fee-griefing or dust-spam attacks against the channel.

Lower-priorityFinish validation in `splice_ack` before taking a `&mut self`by Leo Nash · a4796a44 · Sep 2, 2025 · 1 fileMessage 73 · AdequateInformational 24Details
Commit message · Leo Nash

Finish validation in `splice_ack` before taking a `&mut self`

As much as possible, we want to only mutate state once we are done with
input validation.

This also removes complaints when helper functions during validation
take a `&self`.

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

This change is a defensive code-quality refactor in a Lightning channel splicing feature. It moves input validation earlier so the function only mutates internal state after all checks pass. The commit message frames this as a hardening measure, but the diff itself does not fix a known exploitable bug or change observable behavior under normal operation.

Lower-priorityEnforce that the splice initiator set a non-zero funding contributionby Leo Nash · b5cf08d4 · Sep 2, 2025 · 1 fileMessage 50 · ThinLow 49Details
Commit message · Leo Nash

Enforce that the splice initiator set a non-zero funding contribution

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

This commit adds a check in the Lightning Dev Kit's channel code to reject splice attempts where the party initiating the splice contributes zero new funds. Previously, such a zero-contribution splice could be accepted, which may have allowed a peer to trigger invalid or unintended splice state transitions. The fix disconnects the peer with a warning when this happens.

Lower-priorityDescribe `ConfirmationTarget::MaximumFeeEstimate` more accuratelyby Matt Corallo · 580db460 · Sep 2, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Describe `ConfirmationTarget::MaximumFeeEstimate` more accurately

This isn't really just the maximum estimate that we want from our
fee estimator but rather the maximum estimate that we think is
reasonable to receive from our counterparty. Thus, we should really
describe it as such and suggest users add a fudge on top to
accomodate disagreements.

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

This commit only changes a documentation comment for an enum variant called MaximumFeeEstimate. It does not modify any code logic, function behavior, or security mechanism. The change clarifies that the value represents the highest fee rate the user considers reasonable from a counterparty, and suggests adding a small buffer to account for estimation disagreements. There is no security fix or vulnerability present in the diff.

Lower-priorityAdd further additional documentation to `Listen`by Matt Corallo · a5b745af · Sep 2, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Matt Corallo

Add further additional documentation to `Listen`

`Listen` is somewhat quiet on high-level use and even requirements,
which we document further here.

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

This commit only adds documentation comments to a Rust programming interface called `Listen`. It explains how callers should connect blocks, handle blockchain reorganizations, and what 'birthday' means for implementations. No code behavior was changed.

Lower-priorityDon't pass a latest-block-time to `Channel` unless we have oneby Matt Corallo · 22798994 · Sep 2, 2025 · 2 filesMessage 85 · StrongInformational 23Details
Commit message · Matt Corallo

Don't pass a latest-block-time to `Channel` unless we have one

When calling `Channel::best_block_updated` we pass it the timestamp
of the block we're connecting so that it can track the highest
timestamp it has seen.

However, in some cases, we don't actually have a timestamp to pass,
which `Channel::best_block_updated` will happily ignore as it
always takes the `max` of its existing value. Thus, we really
should pass a `None` to ensure the API is understandable, which we
do here.

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

This commit is a code-cleanup change in a Bitcoin Lightning Network library. It makes the 'latest block timestamp' parameter optional so that callers only provide a timestamp when they actually know it, rather than passing a placeholder or stale value. The underlying function already ignored stale values, so behavior is essentially unchanged. There is no direct evidence this fixes an exploitable security bug.

Lower-priorityAdd more robust functional test of `Listen::blocks_disconnected`by Matt Corallo · fea0beea · Sep 2, 2025 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Add more robust functional test of `Listen::blocks_disconnected`

Now that the `Listen` interface allows blocks to be disconnected in
batches rather than one at a time, we should test this. Here we add
a new `ConnectStyle` for the functional test framework which tests
doing so.

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 a new test mode to the Lightning Dev Kit's internal functional test framework. It exercises the existing ability to report multiple block disconnections at once through the chain::Listen interface. There is no change to production code, no bug fix, and no security-relevant behavior change.

Lower-priorityDrop the need for fork headers when calling `Listen`'s disconnectby Matt Corallo · 403dc1a4 · Sep 2, 2025 · 11 filesMessage 85 · StrongLow 33Details
Commit message · Matt Corallo

Drop the need for fork headers when calling `Listen`'s disconnect

The `Listen::block_disconnected` method is nice in that listeners
learn about each block disconnected in series. Further, it included
the header of the block that is being disconnected to allow the
listeners to do some checking that the interface is being used
correctly (namely, asserting that the header's block hash matches
their current understanding of the best chain).

However, this interface has some substantial drawbacks. Namely, the
requirement that fork headers be passed in means that restarting
with a new node that has no idea about a previous fork leaves us
unable to replay the chain at all. Further, while when various
listeners were initially written learning about each block
disconnected in series seemed useful, but now we no longer rely on
that anyway because the `Confirm` interface does not allow for it.

Thus, here, we replace `Listen::block_disconnected` with a new
`Listen::blocks_disconnected`, taking only information about the
fork point/new best chain tip (in the form of its block hash and
height) rather than information about previous fork blocks and only
requiring a single call to complete multiple block disconnections
during a reorg.

We also swap to using a single `BestBlock` to describe the new
chain tip, in anticipation of future extensions to `BestBlock`.

This requires removing some assertions on block disconnection
ordering, but because we now provide `lightning-block-sync` and
expect users to use it when using the `Listen` interface, these
assertions are much less critical.

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

This commit changes how the Lightning Dev Kit (LDK) library is told about blockchain reorganizations. Previously, callers had to provide the full headers of every block being disconnected, one at a time. Now they only provide the new 'fork point' (the last block that is still on both the old and new chain). This makes it easier to recover from deep reorgs or switch to a new node that doesn't have old fork headers. The change removes some internal consistency checks that relied on seeing each disconnected block in order, which slightly weakens defensive assumptions but is described by the authors as acceptable because LDK now provides its own block-sync helper.

Lower-priorityUse similar `blocks_disconnected` semantics in `OnchainTxHandler`by Matt Corallo · 2d3aaa57 · Sep 2, 2025 · 2 filesMessage 85 · StrongInformational 12Details
Commit message · Matt Corallo

Use similar `blocks_disconnected` semantics in `OnchainTxHandler`

`OnchainTxHandler` is an internal struct and doesn't implement
`Listen`, but its still nice to have its API mirror the `Listen`
API so that internal code all looks similar.

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 renames an internal method and adjusts how block heights are passed during blockchain reorganizations so the internal API matches the public `Listen` interface. It is a code-consistency refactor with no apparent security impact.