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
71commits · 30 days
207commits · 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 55 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.

AI review queuedCleanup unused codeby Elias Rohrer · 9a64a659 · Feb 25, 2026 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Elias Rohrer

Cleanup unused code

.. for which we got warnings

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit removes unused code and silences compiler warnings. It does not change any active behavior, fix a bug, or alter security logic. There is no security relevance.

Lower-priorityReplace `insert_outbound_channel` with `PeerState::new_order`by Elias Rohrer · 0c8e26a3 · Feb 25, 2026 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · Elias Rohrer

Replace `insert_outbound_channel` with `PeerState::new_order`

.. requiring less access to internals

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

This is a small internal code cleanup in the LSPS1 (liquidity service) module. It replaces a two-step process—creating a channel object in one file and inserting it in another—with a single method call. There is no user-visible behavior change and no security fix.

Lower-priorityDrop `chain_source` from `LSPS1ServiceHandler`by Elias Rohrer · 0d7408bf · Feb 25, 2026 · 2 filesMessage 58 · ThinInformational 15Details
Commit message · Elias Rohrer

Drop `chain_source` from `LSPS1ServiceHandler`

We previously considered tracking payment confirmations as part of the
handler. However, we can considerably simplify our logic if we stick
with the current approach of having the LSPs track the payment status
and update us when prompted through events.

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

This commit removes an unused `chain_source` field from a Lightning service handler. It is a straightforward internal cleanup that simplifies the code by no longer passing around a blockchain data source that was not actually being used. There is no indication this fixes or introduces a security issue.

Lower-priorityDrop `Listen`/`Confirm`/etc from `LiquidityManager`by Elias Rohrer · 8ad5101b · Feb 25, 2026 · 6 filesMessage 73 · AdequateInformational 15Details
Commit message · Elias Rohrer

Drop `Listen`/`Confirm`/etc from `LiquidityManager`

Now that we don't do on-chain tracking in LSPS1, we can drop quite a few
`LiquidityManager` parameters and generics, which were only added in
anticipation of tracking on-chain state.

Signed-off-by: Elias Rohrer <dev@tnull.de>

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 unused on-chain tracking code from the LiquidityManager component. It is a cleanup change that simplifies the API by removing parameters and traits that were added in anticipation of future LSPS1 on-chain tracking but are no longer needed. There is no indication this fixes a security vulnerability.

Lower-priorityDrop bogus channel state handlingby Elias Rohrer · fa867c27 · Feb 25, 2026 · 2 filesMessage 68 · AdequateInformational 18Details
Commit message · Elias Rohrer

Drop bogus channel state handling

.. we will re-add a proper state machine in a later commit, but for now
we can just drop all of this half-baked logic that doesn't actually do
anything.

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

This commit removes unused, half-implemented state tracking code from an experimental LSPS1 (Lightning Service Provider Specification 1) liquidity module. The deleted code tracked whether an outbound channel order was 'created' or 'awaiting payment', but the commit message says the logic 'doesn't actually do anything' and will be replaced later. There is no direct evidence this fixes an active security bug; it appears to be a cleanup/refactoring change.

Lower-priorityMove `PeerState` and related types to `peer_state.rs` moduleby Elias Rohrer · c6465f2f · Feb 25, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · Elias Rohrer

Move `PeerState` and related types to `peer_state.rs` module

We move the `PeerState` related types to a new module. In the following
commits we'll bit-by-bit drop the `pub(super)`s introduced here,
asserting better separation of state and logic going forward.

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 pure code reorganization: it moves the PeerState type and related helper types from the service.rs file into a new peer_state.rs module. No behavior changes, security fixes, or vulnerability patches are present.

Lower-priorityLSPS1: Add initial integration testby Martin Saposnic · a024a760 · Feb 25, 2026 · 1 fileMessage 86 · StrongInformational 15Details
Commit message · Martin Saposnic

LSPS1: Add initial integration test

We add the first LSPS1 integration test. This is based on the unfinished
work in https://github.com/lightningdevkit/rust-lightning/pull/3864, but
rebased to account for the new ways we now do integration test setup.

86/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit adds a new automated integration test for the LSPS1 (Lightning Service Provider Specification 1) feature in the rust-lightning project. It does not change any production code, only test code. There is no security issue here.

Lower-priorityAssert that a balance under a post-splice reserve did not budgeby Leo Nash · 0ea26165 · Feb 25, 2026 · 1 fileMessage 65 · AdequateInformational 21Details
Commit message · Leo Nash

Assert that a balance under a post-splice reserve did not budge

Notably, if a party splices funds into the channel, their new balance
must be above the new reserve.

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

This commit adds internal consistency checks (debug-only assertions) for the Lightning channel splicing logic. It verifies that if a party's balance after a splice would fall below the required channel reserve, that balance must not have changed from before the splice. In other words, a party cannot splice funds into a channel and end up with a balance below the new reserve. These checks only run in debug/test builds, so they do not by themselves prevent attacks in production releases.

Lower-priorityFormat all `get_available_balances` methods in `channel`by Leo Nash · 882a940c · Feb 24, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Leo Nash

Format all `get_available_balances` methods in `channel`

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 purely a code-formatting cleanup. It removes `#[rustfmt::skip]` annotations from two balance-calculation methods and lets rustfmt reformat the code. No logic, behavior, or security properties of the functions change.

AI review queuedLet callers handle errors on `get_available_balances_for_scope`by Leo Nash · 69b6b265 · Feb 24, 2026 · 3 filesMessage 85 · StrongLow 47Details
Commit message · Leo Nash

Let callers handle errors on `get_available_balances_for_scope`

`get_available_balances_for_scope` only errors if some party in the
channel cannot afford the HTLCs outbound from said party, and the
anchors and transaction fee if they are the funder. We do not account
for the channel reserve here, so this error should be exceedingly rare,
but could nonetheless happen due to concurrent updates on the channel's
state. The upcoming zero-reserve channel type could also make this case
more reachable.

`send_htlc` maps such an error to its own error type since it proposes
an update to the channel's state. The other callers only read the
channel's state, so it would not be a good fit to have them return an
error too. Hence, we choose to let these callers panic in debug mode,
and return saturated values in release mode.

Note that we now handle the if-we-removed-it-already-but-haven't
-fully-resolved-they-can-still-send-an-inbound-HTLC case, as
`LocalRemoved` HTLCs are considered resolved when calculating
`AvailableBalances`. We update the documentation accordingly.

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

This commit changes how a Lightning channel balance calculation reports rare error conditions. Previously the function could silently ignore an internal failure and return potentially incorrect balance numbers. Now it returns an explicit error, and callers that only read channel state either crash in debug builds or return conservative 'saturated' values in release builds. The main user-facing effect is more correct balance reporting and safer handling of an edge case where a party cannot actually afford its pending payments plus fees. It is a defensive fix, not a clear-cut exploit patch.

AI review queuedReturn `AvailableBalances` in `get_channel_stats`by Leo Nash · 5f44a098 · Feb 24, 2026 · 2 filesMessage 58 · ThinLow 28Details
Commit message · Leo Nash

Return `AvailableBalances` in `get_channel_stats`

Note that `AvailableBalances` will always refer to the holder's
balances, even when `local` is set to `false`, when calling
`TxBuilder::get_channel_stats`.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 28/100

This commit refactors how Lightning channel balance information is computed so that the same code path calculates both commitment statistics and available balances. The key behavioral change is that available-balance calculations now always use the holder's perspective, even when evaluating the counterparty's commitment. This is intended to prevent inconsistent or incorrect balance reporting, but the commit itself is a refactor rather than a clear-cut fix for an active vulnerability.

Lower-priorityErase `get_pending_htlc_stats`, `next_*_commit_tx_fee_msat` in `channel`by Leo Nash · 5a780bbf · Feb 24, 2026 · 1 fileMessage 50 · ThinInformational 12Details
Commit message · Leo Nash

Erase `get_pending_htlc_stats`, `next_*_commit_tx_fee_msat` in `channel`

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

This commit removes old, unused helper functions and data structures from the Lightning channel code and updates the tests to use newer replacement functions. There is no indication of a security vulnerability being fixed; it appears to be a code cleanup or refactoring change.

AI review queuedMove `ChannelContext::get_available_balances_for_scope` to `tx_builder`by Leo Nash · 415ad542 · Feb 24, 2026 · 2 filesMessage 65 · AdequateInformational 15Details
Commit message · Leo Nash

Move `ChannelContext::get_available_balances_for_scope` to `tx_builder`

This is a direct code move to `tx_builder::get_available_balances`.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a pure code refactor: it moves a balance-calculation function from one file to another without changing its behavior. There is no security-relevant change visible in the diff.

Security candidateMultiply the feerate by the spike multiple in `can_accept_incoming_htlc`by Leo Nash · 51f8c4c9 · Feb 24, 2026 · 3 filesMessage 73 · AdequateLow 45Details
Commit message · Leo Nash

Multiply the feerate by the spike multiple in `can_accept_incoming_htlc`

We choose to multiply `FEE_SPIKE_BUFFER_FEE_INCREASE_MULTIPLE` by the
feerate when checking the fee spike buffer in
`can_accept_incoming_htlc` instead of multiplying the multiple by the
commitment transaction fee. This allows us to delete
`NextCommitmentStats::commit_tx_fee_sat`, and return balances including
the commitment transaction fee in `TxBuilder::get_channel_stats`. This
unblocks a good amount of cleanup.

Note that this means LDK now rejects HTLCs that previous versions of LDK
would have accepted. We made the mirroring change in
`get_available_balances_for_scope` a few commits earlier.

We also now account for non-dust HTLCs turning to dust at the multiplied
feerate, decreasing the overall weight of the transaction.

We also remove other fields in `NextCommitmentStats` which can be easily
calculated in `channel` only.

`TxBuilder::get_channel_stats` could also check the reserve
requirements, given that it gets the reserves in `ChannelConstraints`.
I leave this to follow-up work.

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

This commit tightens how Lightning Dev Kit (LDK) checks whether an incoming payment (HTLC) can be safely accepted. It changes the fee-spike buffer calculation so that LDK now rejects more borderline HTLCs than before, reducing the risk that a sudden on-chain fee spike leaves the channel unable to close safely. The change is described by the authors as a stricter policy alignment, not a fix for a known active exploit.

AI review queuedFormat `tx_builder::get_available_balances`by Leo Nash · 121302e1 · Feb 24, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Leo Nash

Format `tx_builder::get_available_balances`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: opaque commit messagesecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is purely a code formatting and documentation cleanup of one internal function in the Lightning Dev Kit. It adds explanatory comments and rewraps long lines to match the project's style guide. No logic, calculations, or security behavior were changed.

AI review queuedExtract dust exposure calculation in `tx_builder` to its own functionby Leo Nash · f607ff89 · Feb 24, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Leo Nash

Extract dust exposure calculation in `tx_builder` to its own function

This snippet is currently used in
`tx_builder::get_next_commitent_stats`, and will be used in an upcoming
commit in `get_available_balances_for_scope`.

There are no functional changes in this commit, as the
`extra_accepted_htlc_dust_exposure` member of `NextCommitmentStats` was
not used.

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

This commit is a pure code cleanup: it moves an existing dust-exposure calculation into a new helper function and removes an unused struct field. The commit message explicitly states there are no functional changes, and the diff confirms the logic is identical and the removed field was never used.

AI review queuedRewrite `get_available_balances_for_scope` using `tx_builder` functionsby Leo Nash · e41259a4 · Feb 24, 2026 · 2 filesMessage 85 · StrongLow 45Details
Commit message · Leo Nash

Rewrite `get_available_balances_for_scope` using `tx_builder` functions

We no longer make use of `get_pending_htlc_stats`,
`get_dust_buffer_feerate`, `next_local_commit_tx_fee_msat`, and
`next_remote_commit_tx_fee_msat` in the `channel` module, and instead
make use of tooling from the `tx_builder` module.

`HTLCStats::pending_outbound_htlcs` and
`HTLCStats::pending_outbound_htlcs_value_msat` are now calculated in
`get_available_balances_for_scope`, and do not include outbound HTLCs in
states `AwaitingRemoteRevokeToRemove` and `AwaitingRemovedRemoteRevoke`.

`HTLCStats::pending_inbound_htlcs_value_msat` is now calculated in
`get_available_balances_for_scope`, and does not include inbound HTLCs
in state `LocalRemoved`.

To determine whether a HTLC is dust for the purpose of calculating total
dust exposure, we now refer only to `ChannelContext::feerate_per_kw`,
and ignore any upcoming fee updates stored in `pending_update_fee`.

The same applies for dust exposure due to excess fees; we ignore any fee
updates in `ChannelContext::pending_update_fee`, and only refer to
`ChannelContext::feerate_per_kw`.

For outbound feerate updates, this is ok because all such updates first
get placed in the holding cell. We validate dust exposure again upon
freeing the feerate update from the holding cell, and immediately
generate the corresponding commitment.

For inbound feerate updates, it is possible that the peer sends us a
feerate update that is in excess of our dust exposure limiting feerate,
at the same time that we send non-dust HTLCs that exhaust the max dust
exposure at the new feerate. This leads to a channel force-close when
the peer sends us their commitment signed including the HTLCs and the
new feerate.

Similar to the `HTLCStats` members above, when calculating dust
exposure on both holder and counterparty transactions in
`get_available_balances_for_scope`, we now do not include inbound HTLCs
in states `LocalRemoved`, and outbound HTLCs in states
`AwaitingRemoteRevokeToRemove` and `AwaitingRemovedRemoteRevoke`.

In the case where `is_outbound_from_holder` is true,
`max_reserved_commit_tx_fee_msat` and `min_reserved_commit_tx_fee_msat`
now do not include pending inbound HTLCs in state `LocalRemoved`.

In the case where `is_outbound_from_holder` is false,
`max_reserved_commit_tx_fee_msat` now also includes outbound HTLCs in
the holding cell, and does not include inbound HTLCs in state
`LocalRemoved`.

These fee values are also the result of the feerate getting multiplied
by the fee spike buffer increase multiple, instead of the final
commitment transaction fee getting multiplied by that multiple. This
results in higher values, as we multiply before the rounding down to the
nearest satoshi. This reduces the set of HTLC additions we would send.

Finally, these values also account for any non-dust HTLCs that
transition to dust at the higher feerate, resulting in lower values.
This increases the set of HTLC additions we would send, and previous
versions of LDK will fail only the single HTLC and not the channel in
case we breach their buffer.

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 validationsigning or wallet pathsecond-pass: near security thresholdsecond-pass: security-sensitive path
AI analysis · Low 45/100

This commit rewrites how LDK calculates how much money is available to send in a Lightning channel. It changes which pending payments are counted, how fees are estimated, and how 'dust' (very small) payments are handled. The commit message explicitly notes one risky side effect: under a specific timing of fee updates and HTLCs, the local node may force-close a channel that older LDK versions would have kept open. The change is a refactor with security-relevant behavioral differences, not a clear-cut fix for a known exploit.

AI review queuedCreate `ChannelConstraints` to hold parameters for balance calculationsby Leo Nash · 22b056ba · Feb 24, 2026 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Leo Nash

Create `ChannelConstraints` to hold parameters for balance calculations

In an upcoming commit, we move `get_available_balances_for_scope` behind
`TxBuilder::get_channel_stats`, and pass channel parameters relevant to
balance calculations in `TxBuilder::get_channel_stats` via
`ChannelConstraints`.

There are no functional changes in this commit.

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

This commit is a pure internal code reorganization. It creates a new ChannelConstraints container and copies existing channel parameters into it so a future change can pass them more easily. The values used in balance calculations are identical to before; nothing about user funds, network behavior, or security rules changes.

Lower-priorityPrint unexpected events upon assertion failureby Jeffrey Czyz · c9c01592 · Feb 24, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Print unexpected events upon assertion failure

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

This commit only improves an error message in test helper code. When a test expects exactly one event but gets a different number, the macro now prints the unexpected events for easier debugging. It does not change production behavior or fix any security issue.

Lower-priorityAdd pending changelog for SpliceFailed / DiscardFunding splitby Jeffrey Czyz · 24062c07 · Feb 24, 2026 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Jeffrey Czyz

Add pending changelog for SpliceFailed / DiscardFunding split

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only adds a pending changelog text file describing an already-merged API change. It does not modify any source code, cryptographic logic, network handling, or serialization behavior. There is no security-relevant content in the diff itself.

Lower-prioritySplit DiscardFunding from SpliceFailed eventby Jeffrey Czyz · 9901ee9c · Feb 24, 2026 · 6 filesMessage 78 · AdequateLow 29Details
Commit message · Jeffrey Czyz

Split DiscardFunding from SpliceFailed event

When a splice fails, users need to reclaim UTXOs they contributed to the
funding transaction. Previously, the contributed inputs and outputs were
included in the SpliceFailed event. This commit splits them into a
separate DiscardFunding event with a new FundingInfo::Contribution
variant, providing a consistent interface for UTXO cleanup across all
funding failure scenarios.

Changes:
- Add FundingInfo::Contribution variant to hold inputs/outputs for
DiscardFunding events
- Remove contributed_inputs/outputs fields from SpliceFailed event
- Add QuiescentError enum for better error handling in funding_contributed
- Emit DiscardFunding on all funding_contributed error paths
- Filter duplicate inputs/outputs when contribution overlaps existing
pending contribution
- Return Err(APIError) from funding_contributed on all error cases
- Add comprehensive test coverage for funding_contributed error paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Low 29/100

This commit is a defensive refactor of how a Lightning node library (LDK) tells wallet software to reclaim UTXOs after a splice or dual-funding attempt fails. It splits the cleanup signal out of the general 'splice failed' event into a dedicated 'DiscardFunding' event, and makes sure that signal is emitted on more error paths (wrong peer, unknown channel, duplicate contribution, channel shutting down, etc.). The change is primarily about preventing user funds from being accidentally left locked or double-spent by giving the wallet a clearer, more consistent reclaim signal. It is not a remote exploit fix; it is an API-hardening and reliability improvement.

Lower-priorityAdd expect_splice_failed_events helperby Jeffrey Czyz · 9c7783b3 · Feb 24, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Jeffrey Czyz

Add expect_splice_failed_events helper

Add a helper function to assert that SpliceFailed events contain the
expected channel_id and contributed inputs/outputs. This ensures that
tests verify the contributions match what was originally provided.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit only adds and uses a new test helper function. It makes existing tests check more details when a Lightning channel splice fails, but it does not change any production code or fix a security bug. There is no security relevance.

Security candidateExtract contributed_{inputs|outputs} iteratorsby Jeffrey Czyz · a4f2ea27 · Feb 24, 2026 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Jeffrey Czyz

Extract contributed_{inputs|outputs} iterators

The following types have methods for returning contributed inputs and
outputs:
- FundingNegotiationContext
- InteractiveTxConstructor
- InteractiveTxSigningSession
- ConstructedTransaction

Having iterators for these can avoid allocations, which is useful for
filtering contributed input and outputs when producing DiscardFunding
events.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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

This commit is a straightforward internal code cleanup in the Lightning Dev Kit's transaction-building code. It replaces a few methods that always built full lists of contributed inputs and outputs with new iterator methods that let callers decide when to build those lists. There is no change to security logic, no bug fix, and no externally visible behavior change.

Lower-priorityFix silent merge conflictby Jeffrey Czyz · 7e413a72 · Feb 24, 2026 · 1 fileMessage 58 · ThinInformational 16Details
Commit message · Jeffrey Czyz

Fix silent merge conflict

RecipientOnionFields::secret_only requires an amount now, but when
do_abandon_splice_quiescent_action_on_shutdown was introduced it was
based on an earlier commit.

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

This is a tiny fix to a single test file so the project compiles after a recent API change. A helper function called secret_only now requires a payment amount to be passed alongside the payment secret. The test was written against the older version of that helper and broke when both changes landed together. There is no indication this affects real user funds, live code paths, or network security.

Lower-priorityAdd a `Path::total_cltv_expiry_delta` accessorby Matt Corallo · 5ce6e42b · Feb 24, 2026 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · Matt Corallo

Add a `Path::total_cltv_expiry_delta` accessor

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

This commit adds a small public helper method that sums up the time-lock delays across all hops in a Lightning payment path. It also adds an internal consistency check to make sure the computed total matches what the code uses when building an onion packet. There is no security fix here—this is a routine code-quality and API-convenience change.