LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1667 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

252security candidates228second-pass queue1525AI analyses
82commits · 30 days
182commits · 60 days
554commits · 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
474Strong · 80–100
836Adequate · 60–79
295Thin · 40–59
62Opaque · 0–39
3security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Elias Rohrer15315153667
Matt Corallo43553371574
Jeffrey Czyz19545182169
Wilmer Paulino15945155169
Leo Nash11613116162
Valentine Wallace14511138169
Vincenzo Palazzo11311183
Joost Jager16224162069
elnosh391333058
auto-pr-bot2478087
shaavan22622069
Carla Kirk-Cohen78366068
Analysis record

Published AI watches

Last scanned 43 minutes ago

Moderate 55 AI analysisMessage 76 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Persistent `MonitorEvent`s' (#4491)

This commit makes on-chain 'MonitorEvent' notifications durable and replay-safe. Previously, if a node crashed after a ChannelMonitor persisted a block update but before the ChannelManager processed the resulting event, the event could be …

Durability/atomicity fix for async persistence: prevents lost MonitorEvents across crashesNew ack-based event lifecycle with random event IDsArchival gating on unacknowledged events to avoid losing preimage/timeout information
9a324e72by wpaulino+467−45912 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix payment attribution edge cases and simplify claiming' (#5021)

This commit refactors how LDK nodes claim incoming Lightning payments. It replaces a separate 'claim with known custom TLVs' method with an options struct passed to the normal claim call, and fixes two edge cases in payment attribution dat…

API change: claim_funds now takes ClaimFundsOptions, consolidating TLV-known behavior into one pathFailure-packet length bound added to prevent oversized onion error messagesIncoming failure packet truncated at 32 KiB before processing
ee7c61c2by Matt Corallo+256−17322 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'release utxos from failed splices' (#4973)

This change fixes a wallet bookkeeping problem in rust-lightning's built-in coin-selection wrappers. Previously, when a splice attempt failed or coin selection errored after picking UTXOs, those UTXOs stayed marked as 'reserved' in memory …

Resource exhaustion / denial-of-service via permanent in-memory UTXO reservationIncorrect state tracking in coin-selection wrapperNew API method required for correct lifecycle management (release_utxos)
7220a6fdby jkczyz+295−383 files
No security note in commit
Low 49 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Restore `Wallet` UTXO locks when coin selection fails afterwards

This commit fixes a bug in the wallet's coin-selection code. When the wallet picked UTXOs to spend, it locked them immediately so they couldn't be reused. But if a later step—fetching the change address or the previous transaction—failed, …

Resource lock leak on error pathUTXO lock state inconsistency between selection and confirmationDenial-of-service/funds-unavailability risk from persistent UTXO locks
81afd9caby elnosh+146−331 file
No security note in commit
Informational 19 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'tx-sync: Parallelize esplora status queries' (#4913)

This commit rewrites how a Lightning wallet talks to Esplora block-explorer servers so that many status checks happen in parallel instead of one at a time. It is a performance/refactoring change. There is no direct evidence in the commit t…

Concurrency/timing change in transaction confirmation logicNew inconsistency check preserved when a previously-confirmed tx is reported unconfirmedAdded defensive error path for missing pre-fetched block status
c303f515by Matt Corallo+140−371 file
No security note in commit
Low 30 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Skip Electrum creator transaction downloads' (#4992)

This change stops the Electrum-based transaction sync client from downloading the very transaction that created an output it is watching. Previously, the client could request that transaction from Electrum, even though a transaction can ne…

Avoids unnecessary Electrum transaction.get requests for watched outputsReduces information disclosure to Electrum server about watched outpointsAdds regression test verifying request suppression
c36e50cbby Matt Corallo+142−02 files
No security note in commit
Low 44 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Use preferred sPK of watched txn in electrum, not rand ones' (#4867)

This change improves how the Lightning Dev Kit's Electrum and Esplora transaction-sync clients track watched Bitcoin transactions. Previously, the code ignored the script pubkey (the 'address' associated with a transaction) supplied when r…

Previously ignored `script_pubkey` argument in `register_tx` for transaction watchersElectrum script-history queries previously used an arbitrary transaction output, which could be OP_RETURN and therefore unindexed by some Electrum serversNew logic prefers caller-supplied script pubkey and falls back to non-OP_RETURN outputs
bfe5ca89by tnull+52−243 files
No security note in commit
Low 33 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Serialize transient Event variants; move persist decision into ChannelManager' (#4791)

This commit changes how LDK stores pending event notifications. It adds serialization support for several event types that previously were not fully saved to disk, and introduces a helper method so the code can decide which events are wort…

Data-loss prevention: previously non-round-trippable event variants are now fully serialized, avoiding accidental event loss when users serialize Event queues themselvesState-consistency hardening: ChannelManager now explicitly skips events that describe non-surviving restart state, preventing replay of stale eventsDefensive assertion: debug builds assert that every persisted event round-trips to Some(event), catching serialization mismatches
a0d4632eby Matt Corallo+694−818 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Document that funding signing events can go stale' (#4960)

This commit only adds documentation comments to two source files. It explains that certain funding-signing events can become stale if the underlying negotiation fails, and that callers may see specific harmless errors as a result. No code …

26eecf2dby Matt Corallo+15−02 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add `Wallet::release_utxos` to free UTXOs from abandoned transactions

This commit fixes a design flaw in LDK's built-in wallet helper where coins selected for a splice-in (or other unclaimed funding) were permanently reserved in memory if the transaction was abandoned. Over repeated failed splices, all spend…

Denial-of-service via UTXO exhaustion from repeated failed splice negotiationsRisk of inability to broadcast fee-bumping/claim transactions due to lack of available UTXOsNew API surface (release_utxos) introduced to mitigate resource leak
52ab13fdby elnosh+148−43 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop the honggfuzz version pin from the CI fuzz job

This commit removes a fixed-version pin for the honggfuzz fuzzing tool in a continuous-integration script. The project now uses the current release of honggfuzz instead of an older pinned version. There is no change to the actual Lightning…

4a1635efby auto-pr-bot+1−51 file
No security note in commit
Informational 15 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Run the CI fuzz job on the stable toolchain

This commit changes the Rust toolchain used in the continuous integration (CI) fuzzing job from a fixed older version (1.75) to the latest stable release. It is purely a build/test infrastructure change to fix a dependency compatibility is…

21c4ed2bby auto-pr-bot+3−32 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Expose the dummy-hop tail constructor publicly

This commit makes a previously internal helper function public so that outside developers can build dummy-hop tails for blinded payment paths without recreating the logic themselves. It is an API usability change, not a fix for a known sec…

No security-relevant behavior change in the diffAPI visibility broadened from crate-public to publicCLTV expiry overflow check already present and unchanged
c5443353by auto-pr-bot+14−71 file
No security note in commit
Moderate 54 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Fail commitment sig verification without counterparty params

This change adds a safety check in a Bitcoin Lightning Network library (LDK). Previously, if the software tried to verify a peer's commitment signature before it had learned the peer's channel parameters, it could crash with a panic. Now i…

Defensive check added on peer-driven code path to prevent panicMissing counterparty_parameters could previously cause panic during commitment transaction constructionChannel closure returned instead of panic
de7ecc2fby auto-pr-bot+24−01 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Clarify the commitment validation failure message

This commit only changes the wording of an error message sent to peers when a commitment transaction fails validation. It replaces the vague phrase 'Failed to validate our commitment' with the clearer 'Received commitment failed validation…

3284a006by auto-pr-bot+11−114 files
No security note in commit
Moderate 61 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Move holder commit sig checks to `InMemorySigner`' (#4885)

This commit moves the checks that validate a counterparty's signatures on the holder's commitment and HTLC transactions out of the general channel code and into the signer module (InMemorySigner). Previously, these signature checks were do…

Moved signature validation from channel state machine into signer moduleAdded new tests that corrupt signatures and verify rejectionChanged error message from 'Invalid commitment tx signature from peer' / 'Invalid funding_created signature from peer' to 'Failed to validate our commitment'
83f5ba55by Matt Corallo+626−31024 files
No security note in commit
Low 42 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Drop stale splice signature on disconnect' (#4954)

This change fixes a Lightning channel splicing bug: when two peers temporarily disconnect during a splice, any half-finished signature the other side already sent is now discarded. Before the fix, that stale signature could be reused after…

State-invalidation bug in multi-step protocol (splice negotiation)Stale cryptographic signature not cleared on disconnectPotential reuse of old commitment state after reconnect
c9a77251by Matt Corallo+22−12 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop stale splice signature on disconnect

This fix prevents a Lightning channel from being accidentally force-closed. During a splice (a way to resize a payment channel), one side's initial signature could be kept in memory after the peers disconnected. If the peers later reconnec…

State inconsistency: in-memory buffered message not cleared on disconnectDuplicate message processing after reconnectionForce-close consequence for active Lightning channel
71405b4bby Wilmer Paulino+22−12 files
Vendor flagged security relevance
Informational 20 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice' (#4942)

This commit is a simple rename of a public function from `matches_invoice_signing_pubkey` to `key_can_sign_invoice`, plus matching updates to its documentation, callers, tests, and changelog. No behavior changed. It is not a security fix.

a476cf92by Matt Corallo+13−133 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice

This commit is a simple rename of a function and its documentation from matches_invoice_signing_pubkey to key_can_sign_invoice. No logic, behavior, or security properties changed. It is a follow-up code-review naming cleanup.

388187caby Vincenzo Palazzo+13−133 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityDo not produce 0FC HTLC txs on `unsafe_get_latest_holder_commitment_txn`by Leo Nash · 1671d758 · Sep 15, 2025 · 1 fileMessage 73 · AdequateLow 45Details
Commit message · Leo Nash

Do not produce 0FC HTLC txs on `unsafe_get_latest_holder_commitment_txn`

As in CSV anchor channels, HTLC transactions in 0FC channels require
external funding before they can be finalized, so we choose to return
the commitment transaction alone here.

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

This change fixes a behavior in the Lightning Dev Kit where, for a newer type of channel (0FC, or zero-fee commitments), the function that retrieves the latest holder commitment transactions was incorrectly returning unfunded HTLC transactions alongside the commitment transaction. These HTLC transactions cannot be used as-is because they need external funding and, in some cases, cannot be broadcast until anchor claims confirm. Returning them could mislead wallet software or automated scripts into trying to broadcast invalid or premature transactions, potentially causing operational errors or failed fund recovery during a channel dispute.

Lower-priorityDelay HTLC txs in 0FC channels until both commit and anchor txs confirmby Leo Nash · cae633d9 · Sep 15, 2025 · 1 fileMessage 73 · AdequateLow 46Details
Commit message · Leo Nash

Delay HTLC txs in 0FC channels until both commit and anchor txs confirm

It is possible to claim HTLCs and the P2A anchor in the same
transaction, but we leave aggregating these claims to a follow-up.

For now, we imitate the behavior of CSV anchor channels, and wait for
the commitment transaction to confirm before broadcasting HTLC
transactions.

Co-authored-by: Matt Corallo <git@bluematt.me>

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

This change adjusts how Lightning Dev Kit handles zero-fee commitment (0FC) channels. Previously, the code only delayed broadcasting HTLC (payment) claim transactions for older CSV anchor channels until the commitment transaction confirmed. Now it does the same for newer 0FC channels. The commit notes that, in theory, HTLC claims could be bundled together with the anchor-spend transaction before the commitment confirms, but that optimization is left for future work. The practical effect is a more conservative on-chain behavior that avoids potential race conditions or invalid transactions.

AI review queuedUpdate handling of `BumpTransactionEvent::ChannelClose` for 0FC channelsby Leo Nash · 953e939b · Sep 15, 2025 · 2 filesMessage 85 · StrongLow 42Details
Commit message · Leo Nash

Update handling of `BumpTransactionEvent::ChannelClose` for 0FC channels

Set an empty witness to spend the P2A anchor, and set the version of the
anchor transaction to 3.

We still check whether the commitment transaction has enough fees to be
broadcast on its own, as these transactions may be non-zero fee due to
trimmed / rounded outputs.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 42/100

This commit updates how Lightning Dev Kit handles fee-bumping anchor transactions for a newer type of channel (zero-fee commitment channels, or 0FC). It makes two key changes: it uses a much smaller empty witness for the new-style P2A anchor output, and it sets the anchor transaction version to 3 instead of 2. These are protocol-specific adjustments needed so the new channel type can close and fee-bump correctly. The commit does not describe itself as a security fix, and the changes appear to be compatibility/correctness updates rather than a patch for an active vulnerability.

Lower-prioritySet 0FC `HolderHTLCOutput`, `HolderFundingOutput` to require addl fundsby Leo Nash · 49ffdcfa · Sep 15, 2025 · 2 filesMessage 73 · AdequateModerate 57Details
Commit message · Leo Nash

Set 0FC `HolderHTLCOutput`, `HolderFundingOutput` to require addl funds

Also set the malleability of 0FC `HolderHLTCOutput` to be the same as in
CSV anchor channels.

And add debug asserts from CSV anchor channels that also apply to P2A
anchor channels.

Co-authored-by: Matt Corallo <git@bluematt.me>

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

This commit fixes how a Bitcoin Lightning node handles a newer channel type (zero-fee commitment transactions, or 0FC). Before the patch, the node did not recognize that 0FC channels need extra on-chain funds to broadcast certain rescue transactions, and it treated some 0FC outputs as easier to manipulate than they should be. The change makes 0FC channels behave more like the older CSV anchor channels for safety checks and fee requirements. This is a defensive correctness fix in fee-bumping logic; the commit message does not describe an active exploit.

AI review queuedSet `AnchorDescriptor` output value to CSV and P2A anchor amountsby Leo Nash · b2b2dfb4 · Sep 15, 2025 · 4 filesMessage 65 · AdequateModerate 57Details
Commit message · Leo Nash

Set `AnchorDescriptor` output value to CSV and P2A anchor amounts

Co-authored-by: Matt Corallo <git@bluematt.me>

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

This commit changes how Lightning anchor output amounts are tracked and set in commitment transactions. Previously, anchor outputs used a fixed value constant. The patch makes the anchor value dynamic, reading it from the actual commitment transaction output. This is part of support for a newer Lightning feature called 'zero-fee commitments' where anchor amounts can vary. The change appears to be a correctness fix to ensure the wallet software constructs follow-up transactions using the real anchor value rather than a hardcoded one, which could otherwise cause transaction creation failures or fee estimation errors.

Lower-priorityAdd a new `ChannelMoniorUpdateStep::ReleasePaymentComplete`by Matt Corallo · c49ce57b · Sep 15, 2025 · 1 fileMessage 85 · StrongLow 43Details
Commit message · Matt Corallo

Add a new `ChannelMoniorUpdateStep::ReleasePaymentComplete`

`MonitorEvent`s aren't delivered to the `ChannelManager` in a
durable fasion - if the `ChannelManager` fetches the pending
`MonitorEvent`s, then the `ChannelMonitor` gets persisted (i.e. due
to a block update) then the node crashes, prior to persisting the
`ChannelManager` again, the `MonitorEvent` and its effects on the
`ChannelManger` will be lost. This isn't likely in a sync persist
environment, but in an async one this could be an issue.

Note that this is only an issue for closed channels -
`MonitorEvent`s only inform the `ChannelManager` that a channel is
closed (which the `ChannelManager` will learn on startup or when it
next tries to advance the channel state), that
`ChannelMonitorUpdate` writes completed (which the `ChannelManager`
will detect on startup), or that HTLCs resolved on-chain post
closure. Of the three, only the last is problematic to lose prior
to a reload.

In previous commits we ensured that HTLC resolutions which came to
`ChannelManager` via a `MonitorEvent` were replayed on startup if
the `MonitorEvent` was lost. However, in cases where the
`ChannelManager` was so stale that it didn't have the payment state
for an HTLC at all, we only re-add it in cases where
`ChannelMonitor::get_pending_or_resolved_outbound_htlcs` includes
it.

Because constantly re-adding a payment state and then failing it
would generate lots of noise for users on startup (not to mention
risk of confusing stale payment events for the latest state of a
payment when the `PaymentId` has been reused to retry a payment).
Thus, `get_pending_or_resolved_outbound_htlcs` does not include
state for HTLCs which were resolved on chain with a preimage or
HTLCs which were resolved on chain with a timeout after
`ANTI_REORG_DELAY` confirmations.

This critera matches the critera for generating a `MonitorEvent`,
and works great under the assumption that `MonitorEvent`s are
reliably delivered. However, if they are not, and our
`ChannelManager` is lost or substantially old (or, in a future
where we do not persist `ChannelManager` at all), we will not end
up seeing payment resolution events for an HTLC.

Instead, we really want to tell our `ChannelMonitor`s when the
resolution of an HTLC is complete. Note that we don't particularly
care about non-payment HTLCs, as there is no re-hydration of state
to do there - `ChannelManager` load ignores forwarded HTLCs coming
back from `get_pending_or_resolved_outbound_htlcs` as there's
nothing to do - we always attempt to replay the success/failure and
figure out if it mattered based on whether there was still an HTLC
to claim/fail.

Here we take the first step towards that notification, adding a new
`ChannelMonitorUpdateStep` for the completion notification, and
tracking HTLCs which make it to the `ChannelMonitor` in such
updates in a new map.

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

This commit adds a new internal bookkeeping step in Lightning Dev Kit's channel monitor so that, after a channel is closed and an HTLC is resolved on-chain, the code can remember that the user has already been told the payment finished. The goal is to avoid repeatedly replaying the same 'your payment completed/failed' message every time the node restarts, especially in setups where monitor events might be lost between a channel monitor persist and a channel manager persist. It is a defensive correctness fix, not a remote exploit.

Lower-priorityPrepare to provide new `ReleasePaymentComplete` monitor updatesby Matt Corallo · 8b637cc3 · Sep 15, 2025 · 2 filesMessage 85 · StrongLow 45Details
Commit message · Matt Corallo

Prepare to provide new `ReleasePaymentComplete` monitor updates

`MonitorEvent`s aren't delivered to the `ChannelManager` in a
durable fasion - if the `ChannelManager` fetches the pending
`MonitorEvent`s, then the `ChannelMonitor` gets persisted (i.e. due
to a block update) then the node crashes, prior to persisting the
`ChannelManager` again, the `MonitorEvent` and its effects on the
`ChannelManger` will be lost. This isn't likely in a sync persist
environment, but in an async one this could be an issue.

Note that this is only an issue for closed channels -
`MonitorEvent`s only inform the `ChannelManager` that a channel is
closed (which the `ChannelManager` will learn on startup or when it
next tries to advance the channel state), that
`ChannelMonitorUpdate` writes completed (which the `ChannelManager`
will detect on startup), or that HTLCs resolved on-chain post
closure. Of the three, only the last is problematic to lose prior
to a reload.

In previous commits we ensured that HTLC resolutions which came to
`ChannelManager` via a `MonitorEvent` were replayed on startup if
the `MonitorEvent` was lost. However, in cases where the
`ChannelManager` was so stale that it didn't have the payment state
for an HTLC at all, we only re-add it in cases where
`ChannelMonitor::get_pending_or_resolved_outbound_htlcs` includes
it.

Because constantly re-adding a payment state and then failing it
would generate lots of noise for users on startup (not to mention
risk of confusing stale payment events for the latest state of a
payment when the `PaymentId` has been reused to retry a payment).
Thus, `get_pending_or_resolved_outbound_htlcs` does not include
state for HTLCs which were resolved on chain with a preimage or
HTLCs which were resolved on chain with a timeout after
`ANTI_REORG_DELAY` confirmations.

This critera matches the critera for generating a `MonitorEvent`,
and works great under the assumption that `MonitorEvent`s are
reliably delivered. However, if they are not, and our
`ChannelManager` is lost or substantially old (or, in a future
where we do not persist `ChannelManager` at all), we will not end
up seeing payment resolution events for an HTLC.

Instead, we really want to tell our `ChannelMonitor`s when the
resolution of an HTLC is complete. Note that we don't particularly
care about non-payment HTLCs, as there is no re-hydration of state
to do there - `ChannelManager` load ignores forwarded HTLCs coming
back from `get_pending_or_resolved_outbound_htlcs` as there's
nothing to do - we always attempt to replay the success/failure and
figure out if it mattered based on whether there was still an HTLC
to claim/fail.

Here we prepare to generate the new
`ChannelMonitorUpdateStep::ReleasePaymentComplete` updates, adding
a new `PaymentCompleteUpdate` struct to track the new update before
we generate the `ChannelMonitorUpdate` and passing through to the
right places in `ChannelManager`.

The only cases where we want to generate the new update is after a
`PaymentSent` or `PaymentFailed` event when the event was the
result of a `MonitorEvent` or the equivalent read during startup.

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

This commit is a preparatory patch in the Lightning Dev Kit (LDK) to fix a durability issue where payment completion events from channel monitors could be lost if the node crashes at the wrong moment. It introduces a new internal tracking struct (`PaymentCompleteUpdate`) and wires it through payment-failure and payment-claim paths so that, in a future commit, channel monitors can be explicitly told when an HTLC resolution is fully processed. The change itself does not yet generate the final monitor update, so it is not a complete fix on its own. It is defensive hardening against a crash-recovery edge case, not an exploitable vulnerability in the normal sense.

Lower-priorityDerive `Copy` for `HumanReadableName`sby Matt Corallo · 882a0cb3 · Sep 15, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Matt Corallo

Derive `Copy` for `HumanReadableName`s

Now that these do not allocate, we should allow them to be
`Copy`ed.

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

This commit adds the Copy trait to a small, fixed-size data type used for human-readable payment names. Because the type no longer contains any heap-allocated data, making it Copy is a normal Rust API convenience. There is no security issue here.

Lower-priorityClean up FundedChannel::pending_splice docsby Jeffrey Czyz · 53509320 · Sep 12, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Clean up FundedChannel::pending_splice docs

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

This commit only changes a documentation comment for an internal field. It rewords the description of what the pending_splice field tracks. No code behavior is modified, so there is no security impact.

Security candidatePersist FundedChannel::pending_spliceby Jeffrey Czyz · 4f0abe97 · Sep 12, 2025 · 1 fileMessage 70 · AdequateLow 38Details
Commit message · Jeffrey Czyz

Persist FundedChannel::pending_splice

Once a splice funding transaction has been constructed, the
corresponding state must be persisted so that the process can be
continued across restarts. This includes exchanging signatures, waiting
for enough confirmations, and RBF'ing.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundary
AI analysis · Low 38/100

This commit fixes a data-loss bug in the Lightning Dev Kit's new channel-splicing feature. Previously, if a user constructed a splice funding transaction and then restarted their node, the in-progress splice state was not saved to disk, so the splice could not continue or recover correctly. The patch adds serialization (write/read) for the pending splice state so it survives restarts. There is no direct evidence this is exploitable by a remote attacker; the main risk is operational data loss and possible funds stuck in a half-completed splice.

Lower-priorityForward invoice requests to async recipientby elnosh · f46a3ffd · Sep 11, 2025 · 5 filesMessage 68 · AdequateLow 32Details
Commit message · elnosh

Forward invoice requests to async recipient

As a static invoice server, if we receive an invoice request on
behalf of an often-offline recipient we will reply to the sender
with the static invoice previously provided by the async recipient.

Here, in addition to doing that we'll forward the invoice request
received to the async recipient to give it a chance to reply with
a fresh invoice in case it is online.

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

This commit adds a feature to the Lightning Dev Kit that lets an always-online invoice server forward a payer's invoice request to an often-offline recipient, giving the recipient a chance to respond with a fresh invoice if it is online. The server still sends the stored static invoice to the payer as a fallback. The change is a functional enhancement to the async payments flow, not a security fix. It renames a public API method and adds new event fields, requiring downstream users to update their code.

Lower-priorityAccount for pending splice in claimable balancesby Wilmer Paulino · 5adf8735 · Sep 11, 2025 · 2 filesMessage 80 · StrongLow 32Details
Commit message · Wilmer Paulino

Account for pending splice in claimable balances

There are two states in which a pending splice balance should be
considered:

1. The channel has closed with a confirmed holder commitment transaction
from a splice that did not become locked. The balance from this
transaction is reported.
2. The channel is open and has multiple holder commitment transaction
candidates that are valid based on the funding transaction that
confirms. We want to report the pending splice balance to users while
it has yet to become locked, such that they are able to see their
funds have moved from their onchain wallet to the channel. We default
to reporting the latest splice/RBF balance via
`Balance::claimable_amount_satoshis` to mimic how an onchain wallet
would behave when reporting unconfirmed balance, otherwise we report
the balance for the confirmed splice transaction.

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

This commit changes how LDK reports a user's spendable balance when a channel splice is in progress. Previously, the accounting only looked at the original funding transaction. Now it also considers alternative 'candidate' commitment transactions tied to pending splices or RBF fee bumps, and reports the balance that matches whichever splice transaction has actually confirmed on-chain. This is primarily a correctness and user-visibility fix; it does not by itself introduce a remote exploit, but wrong balance reporting during a splice could mislead wallets or downstream software about how much money is available.

Lower-priorityUse struct syntax for FundingNegotiation variantsby Jeffrey Czyz · 5fecde5d · Sep 11, 2025 · 1 fileMessage 80 · StrongInformational 14Details
Commit message · Jeffrey Czyz

Use struct syntax for FundingNegotiation variants

To use impl_writeable_tlv_based_enum_upgradable with unread_variants,
currently tuple syntax can't be used enum variants. Update
FundingNegotiation to use this syntax so that it can be used with that
macro.

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

This commit is a straightforward internal code refactor. It changes how a Rust enum named FundingNegotiation is written so its variants use named fields (struct syntax) instead of unnamed fields (tuple syntax). This is done to make the enum compatible with a serialization macro that will be used in a future change. No security bug is fixed here, and no behavior changes are visible to users or network peers.

Lower-priorityUpdate OnionMessage with link to BOLTsby elnosh · d1d51b3a · Sep 10, 2025 · 2 filesMessage 45 · ThinInformational 15Details
Commit message · elnosh

Update OnionMessage with link to BOLTs

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

This commit only updates documentation comments and a hyperlink. It replaces a temporary pull-request link for onion messages with the final BOLT-4 specification link and removes two TODO markers. No code behavior changes.

AI review queuedUse correct nonce in InvoiceRequest contextby elnosh · d810708e · Sep 10, 2025 · 1 fileMessage 78 · AdequateLow 41Details
Commit message · elnosh

Use correct nonce in InvoiceRequest context

Previously it would generate a new nonce for this context
instead of using the offer nonce. This would make it so
that verification would fail later when receiving a
invoice request.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validationsecond-pass: broader security terminology
AI analysis · Low 41/100

This commit fixes a bug in how Lightning invoice requests are created. Previously, the code generated a fresh random nonce for the invoice request context instead of reusing the nonce from the original offer. Because the two nonces no longer matched, later verification of the invoice request would fail. The fix simply uses the offer's nonce directly. This is a correctness bug in the BOLT 12 offers protocol flow rather than a traditional security vulnerability like theft or denial of service, but it could cause payment flows to break or messages to be rejected.

AI review queuedInline promote_splice_funding macroby Jeffrey Czyz · 4ba6452d · Sep 10, 2025 · 1 fileMessage 35 · OpaqueInformational 12Details
Commit message · Jeffrey Czyz

Inline promote_splice_funding macro

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

This commit simply moves the contents of a small helper macro directly into the one place it was used. There is no change to program logic, no bug fix, and no security improvement or regression visible in the diff.

Lower-priorityRelease held htlcs on release_held_htlcby Valentine Wallace · f569398d · Sep 10, 2025 · 1 fileMessage 68 · AdequateLow 41Details
Commit message · Valentine Wallace

Release held htlcs on release_held_htlc

As part of supporting sending payments as an often-offline sender, the sender's
always-online channel counterparty needs to hold onto the sender's HTLC until
they receive a release_held_htlc onion message from the often-offline
recipient.

Here we implement forwarding these held HTLCs upon receipt of the release
message from the recipient.

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

This commit adds logic to actually forward HTLCs (payment promises) that were being held when a 'release_held_htlc' onion message arrives. Previously the handler only supported one kind of release (outbound static-invoice payments); now it also releases intercepted/forwards held by an always-online counterparty on behalf of an often-offline sender. It is a feature completion/fix for the async/offline-sender payment flow, not a clearly advertised security bug fix.

Lower-priorityAdd pending_changelog for async sendby Valentine Wallace · 6aa52e9f · Sep 10, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Valentine Wallace

Add pending_changelog for async send

See prior commits.

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

This commit only adds a pending changelog note warning that downgrading LDK after enabling a new experimental feature (`UserConfig::enable_htlc_hold`) can cause deserialization failures or HTLC timeouts. There is no code change, no vulnerability fix, and no security defect introduced in this commit.

Lower-prioritySupport creating reply_path for HeldHtlcAvailableby Valentine Wallace · 5eed8d90 · Sep 10, 2025 · 3 filesMessage 68 · AdequateInformational 22Details
Commit message · Valentine Wallace

Support creating reply_path for HeldHtlcAvailable

As part of supporting sending payments as an often-offline sender, the sender
needs to send held_htlc_available onion messages such that the reply path to
the message terminates at their always-online channel counterparty that is
holding the HTLC. That way when the recipient responds with release_held_htlc,
the sender's counterparty will receive that message.

Here we add a method for creating said reply path, which will be used in the
next commit.

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

This commit adds a helper to build a private return-address (a 'reply path') for a new type of Lightning message used when an often-offline sender asks a recipient to release a held payment. The change itself is plumbing for an upcoming feature; it does not appear to fix a known vulnerability or introduce an obvious one, but it touches sensitive payment-handling code and is part of a larger async-payments design whose security depends on details not shown here.

Lower-priorityInclude release_held_htlc blinded paths in RAAby Valentine Wallace · 6f4b0993 · Sep 10, 2025 · 2 filesMessage 80 · StrongLow 28Details
Commit message · Valentine Wallace

Include release_held_htlc blinded paths in RAA

As part of supporting sending payments as an often-offline sender, the sender
needs to send held_htlc_available onion messages such that the reply path to
the message terminates at their always-online channel counterparty that is
holding the HTLC. That way when the recipient responds with release_held_htlc,
the sender's counterparty will receive that message.

Here the counterparty starts including said reply paths in the revoke_and_ack
message destined for the sender, so the sender can use these paths in
subsequent held_htlc_available messages.

We put the paths in the RAA to ensure the sender receives the blinded paths,
because failure to deliver the paths means the HTLC will timeout/fail.

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

This commit adds support for a new Lightning protocol feature for 'often-offline' senders. It makes a channel counterparty include special reply paths inside revoke_and_ack (RAA) messages so the sender can later ask for held payments to be released. The change itself is a feature addition, not a direct security fix, but it touches sensitive message handling and could affect payment reliability or privacy if the blinded paths are misused or leaked.

Lower-priorityStore held htlcs in pending_intercepted_htlcsby Valentine Wallace · 3fb63786 · Sep 10, 2025 · 2 filesMessage 68 · AdequateLow 27Details
Commit message · Valentine Wallace

Store held htlcs in pending_intercepted_htlcs

As part of supporting sending payments as an often-offline sender, the sender's
always-online channel counterparty needs to hold onto the sender's HTLC until
they receive a release_held_htlc onion message from the often-offline
recipient.

Here we implement storing these held HTLCs in the existing
ChannelManager::pending_intercepted_htlcs map.

We want to move in the direction of obviating the need to persistence the
ChannelManager entirely, so it doesn't really make sense to add a whole new map
for these HTLCs.

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

This commit adds a new way for the Lightning Dev Kit node to temporarily hold forwarded payments when the final recipient is offline. It reuses an existing internal storage map (pending_intercepted_htlcs) for these newly held HTLCs. The change is a feature implementation, not a fix for a known vulnerability, and the commit message does not describe any security issue.

Lower-priorityExtract helper + logger for failing HTLC interceptsby Valentine Wallace · 266871a4 · Sep 10, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Valentine Wallace

Extract helper + logger for failing HTLC intercepts

Makes the next commit cleaner.

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

This commit is a pure code cleanup: it moves an existing block of code that fails an intercepted HTLC into a small helper function and creates a logger earlier so the next commit in the series is easier to read. No behavior changes, no security fixes, and no new logic is introduced.

AI review queuedRemove forward_htlcs<>intercepted_htlcs lock depby Valentine Wallace · 8513341b · Sep 10, 2025 · 1 fileMessage 68 · AdequateLow 26Details
Commit message · Valentine Wallace

Remove forward_htlcs<>intercepted_htlcs lock dep

We previously had a lock order dependency where the forward_htlcs lock had to
be taken before the intercepted_htlcs lock. Here we remove this dependency,
which also prepares for a cleaner commit once we start also intercepting HTLCs
for often-offline recipients.

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

This commit restructures how Lightning Dev Kit handles routing of intercepted payments. Previously, the code required holding one internal lock (forward_htlcs) before acquiring another (pending_intercepted_htlcs). The patch removes that lock-order dependency by checking whether an HTLC should be intercepted before, not after, adding it to the forwarding queue. The stated goal is cleaner future code, not a security fix, but removing unnecessary lock nesting can reduce the risk of deadlocks in multi-threaded code.

Lower-priorityAdd RevokeAndACK::release_htlc_message_pathsby Valentine Wallace · a3e1badd · Sep 10, 2025 · 5 filesMessage 70 · AdequateInformational 18Details
Commit message · Valentine Wallace

Add RevokeAndACK::release_htlc_message_paths

As part of supporting sending payments as an often-offline sender, the sender
needs to send held_htlc_available onion messages where the reply path
terminates at their always-online channel counterparty that is holding the HTLC
until the recipient comes online. That way when the recipient sends
release_held_htlc, the sender's counterparty will receive that message.

To accomplish this, the sender's always-online counterparty includes said reply
path in the revoke_and_ack message corresponding to the held HTLC. Here we add
support for this field, though we don't set it yet.

We also had to tweak the ser macros for this because impl_writeable_msg had
never had to write a Vec in a message TLV field before.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 18/100

This commit adds a new optional data field called release_htlc_message_paths to the RevokeAndACK message used in the Lightning protocol. The field is intended to support a future feature where an offline payment sender can receive a reply when a held payment is released. The commit only defines and serializes the field; it always sets it to an empty list and does not yet implement the actual feature. There is no immediate security vulnerability visible in the change itself.

Lower-priorityRename PendingSplice to PendingFundingby Jeffrey Czyz · 4268120c · Sep 10, 2025 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Rename PendingSplice to PendingFunding

While PendingSplice is only used for splicing a FundedChannel, it will
be useful when supporting RBF for V2 channel establishment.

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

This is a simple internal code rename from PendingSplice to PendingFunding, plus an updated comment explaining the structure will also be used for future RBF (fee-bumping) support in V2 channel establishment. No behavior changes, no bug fixes, and no security implications are present in the diff.