LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1665 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
181commits · 60 days
555commits · 180 days
1254commits · 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
473Strong · 80–100
836Adequate · 60–79
294Thin · 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 29 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.

AI review queuedCheck that funder covers the fee spike buffer multiple after a spliceby Leo Nash · f784731e · Feb 25, 2026 · 5 filesMessage 73 · AdequateModerate 59Details
Commit message · Leo Nash

Check that funder covers the fee spike buffer multiple after a splice

We do this for HTLCs, so we should also do this for splices. This
only applies to channels with non-zero-fee HTLC transactions.

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 fixes a balance-checking gap in the Lightning Dev Kit's channel splicing logic. When a channel is spliced, the code now verifies that the funder still has enough funds set aside to cover a sudden fee increase, mirroring a check already performed when adding HTLCs. Without this check, a funder could splice out too much money, leaving the channel unable to pay higher fees later and potentially making it unusable or forcing a closure. The change only affects channels that do not use zero-fee HTLC transactions.

Lower-priorityGet rid of unnecessary clone when constructing page tokenby benthecarman · 0723ffdf · Feb 25, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · benthecarman

Get rid of unnecessary clone when constructing page token

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 minor code cleanup that removes an unnecessary clone of string keys when building a paginated list response. It changes the order of operations so the same data is moved rather than duplicated, with no functional change to behavior or outputs.

Security candidatePropagate unexpected metadata errors when preserving mtime in fs_storeby benthecarman · 6a43a451 · Feb 25, 2026 · 1 fileMessage 73 · AdequateLow 35Details
Commit message · benthecarman

Propagate unexpected metadata errors when preserving mtime in fs_store

Previously, all fs::metadata errors were silently ignored via .ok(),
which could hide permission or I/O errors. Now error are properly
handled.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
credential or privilege state
AI analysis · Low 35/100

This change fixes a bug in the file storage component where errors from checking a file's metadata (such as permission denied or disk I/O problems) were silently ignored. Now, most unexpected errors are reported up the chain instead of being swallowed, so the software can react appropriately rather than silently losing information about file modification times.

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

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

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