LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1497 commits in the local evidence base

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

225security candidates209second-pass queue1479AI analyses
74commits · 30 days
208commits · 60 days
663commits · 180 days
1489commits · 365 days
Backfill bands
Aug 5 → Feb 6819 seen18 candidatesComplete
Feb 6 → Jun 6468 seen16 candidatesComplete
Jun 6 → Jul 6128 seen8 candidatesComplete
Jul 6 → Aug 561 seen3 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

69/100 average clarity
359Strong · 80–100
790Adequate · 60–79
288Thin · 40–59
60Opaque · 0–39
3security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Elias Rohrer15315153667
Matt Corallo35847356473
Jeffrey Czyz17741177168
Wilmer Paulino14939149169
Leo Nash11613116162
Valentine Wallace13710135169
Vincenzo Palazzo10210184
Joost Jager16224162069
elnosh301330056
shaavan22622069
Carla Kirk-Cohen78366068
benthecarman18318071
Analysis record

Published AI watches

Last scanned 47 minutes ago

Low 32 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Only fetch TXIDs instead of entire block during gossip verification' (#4846)

This commit changes how the Lightning Dev Kit's block-sync module verifies Lightning network gossip announcements. Instead of downloading entire Bitcoin blocks (which can be large), it now downloads only the list of transaction IDs for a b…

API surface change in UtxoSource traitReduced data exposure: no longer fetches full blocks for gossip verificationNew JSON parsing for txid lists and TxOut values
ebe7a447by Matt Corallo+275−1025 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Allow filtered block rescans at the current tip' (#4847)

This commit changes how the Lightning Dev Kit (LDK) node software handles receiving the same block twice through its filtered-block interface. Previously, calling filtered_block_connected with the current tip again would trigger an asserti…

Assertion relaxation in block connection pathPotential denial-of-service vector removed: previously a malicious or buggy filter provider could crash the node by replaying the current tipNew test coverage for same-block filtered rescan
54ddbd0bby Matt Corallo+177−486 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add test framework coverage of `Listen` block connection replays

This commit only adds a new test mode to the project's internal testing framework. It lets developers simulate a specific way blocks are delivered to the Lightning node (a 'replay' through the Listen interface) so that behavior is covered …

bf6ad23eby Matt Corallo+18−32 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Update functional test block connection to detect block replays

This commit changes only internal test helper code in the Lightning Dev Kit repository. It makes the functional test framework smarter about 'block replays'—situations where the same block is fed to a test node more than once—so the fake b…

No production code modifiedNo cryptographic, consensus, or networking changesCommit message frames change as test-framework correctness, not security
477facb4by Matt Corallo+41−333 files
No security note in commit
Moderate 66 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct HTLC confusion on unrevoked counterparty commitment txs

This patch fixes a bug in the Lightning Dev Kit where the software could confuse HTLCs (payment contracts) on live, unrevoked counterparty commitment transactions with ones from old, revoked transactions. Previously, it relied only on whet…

Incorrect revocation state detection for counterparty commitment transactionsHTLC direction not previously checked when matching against pending HTLCsPromotion of debug assertions to full assertions for HTLC claim path consistency
f06a08a6by Matt Corallo+26−192 files
Vendor flagged security relevance
Low 47 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Return `Err`s` instead of panicking on oversized messages

This commit changes how the Lightning networking code handles oversized encrypted messages. Previously, certain conditions would cause the program to crash with a panic. Now the code returns errors instead, which is a defensive improvement…

panic-to-error conversion for oversized message encryption/decryptiondenial-of-service hardening against oversized peer messagesdebug_assert retained to preserve test coverage of invariant violations
08f12bc7by Matt Corallo+68−313 files
Vendor flagged security relevance
Moderate 62 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid panicking when attempting to send an oversized message

This commit fixes a crash bug in the Lightning Dev Kit's peer message handling. Previously, if a message grew too large to be sent over the encrypted peer connection, the code would panic (abruptly terminate the whole program). The patch m…

Replaces a `.expect()` panic path with a fallible `Result` in peer message encryptionAdds graceful peer disconnection when a critical message cannot be sentIncludes a regression test for oversized-message handling
c5fdc3bfby Matt Corallo+148−901 file
Vendor flagged security relevance
High 74 AI analysisMessage 78 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid oversized relayed failure messages

This patch fixes a crash bug in the Lightning Dev Kit's handling of HTLC failure messages. A downstream peer could send a maximally-sized failure message without attribution data. When the node added its own attribution data while relaying…

Denial-of-service via remote-triggered panic in message encryptionOversized message exceeding Noise/Lightning wire framing limitMissing length validation before adding attribution data during relay
6b1dfb1aby Matt Corallo+64−191 file
Vendor flagged security relevance
Moderate 64 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Reject attempts to advance one-hop blinded forward paths

This commit fixes a denial-of-service bug in rust-lightning where a maliciously crafted one-hop blinded reply path could cause the node to panic when it tried to respond. The fix rejects paths with too few hops before advancing them, and a…

Denial-of-service vector via malformed blinded pathPanic in onion construction due to zero-hop pathUntrusted reply path input validation gap
969a40cfby Matt Corallo+49−14 files
Vendor flagged security relevance
High 72 AI analysisMessage 96 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

lightning-types: replace Zl/Zp separators in `PrintableString`

This commit fixes a log-forgery risk in a Rust Lightning library helper called PrintableString. That helper is meant to make untrusted text safe to print by replacing dangerous characters with a placeholder. It already caught most control …

log injection / log forgery via U+2028/U+2029 line separatorsincomplete input sanitisation in PrintableStringpeer-controlled strings (node alias, BOLT 12 description/issuer/payer_note, peer_msg) as attack surface
75defa9cby Vincenzo Palazzo+63−83 files
Vendor flagged security relevance
Moderate 69 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Apply the unfunded channel peer limit to all unaccepted channels

This commit fixes a rate-limiting bug in the Lightning Dev Kit (LDK) that let a single peer bypass the cap on how many different peers can have unfunded (not-yet-funded) channels open. Previously, if a peer sent multiple channel requests q…

Denial-of-service resource exhaustion via rapid inbound channel open requestsLogic error in rate-limiting conditionRegression test added for the bypass scenario
56a4ee43by Matt Corallo+87−62 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 88 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Allow filtered block rescans at the current tip

This commit fixes a bug where replaying the current blockchain block through a normal listener callback could crash two core Lightning components (ChannelManager and OutputSweeper) with a panic. The fix recognizes a same-block replay as a …

panic in chain listener callbacksame-block replay/rescan mishandlingassertion failure on valid chain input
686f9860by Elias Rohrer+118−123 files
Vendor flagged security relevance
Moderate 57 AI analysisMessage 78 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid panic when reorged claims cannot merge

This commit fixes a crash bug in the Lightning Dev Kit's on-chain transaction handler. During a deep blockchain reorganization, a previously settled HTLC claim could be 'resurrected' at a block height where it could no longer be combined w…

Assertion/panic in reorg handling pathDeep blockchain reorg as trigger conditionHTLC claim resurrection after reorg
f1dc8487by Matt Corallo+219−52 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 45 · Thin
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Update crate repository links to forgejo

This commit simply updates the 'repository' web links in 15 package metadata files from GitHub to a self-hosted Forgejo instance. It does not change any program code, build logic, dependencies, or security behavior. There is no security is…

eb77676dby benthecarman+15−1515 files
No security note in commit
Low 45 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Account for message type prefix len in prevtx length enforcement

This commit fixes a small but real accounting bug in how rust-lightning checks whether a previous transaction (prevtx) attached to a funding input will make the resulting Lightning wire message too large. The code previously compared the m…

Off-by-constant length check in protocol message size enforcementPotential acceptance of a prevtx that produces an oversized Lightning wire messageDenial-of-service / protocol-interop risk from peer message rejection
d29e1415by Wilmer Paulino+21−41 file
No security note in commit
Moderate 54 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Retransmit splice_locked for 0-conf channels missing tx_signatures

This commit fixes a bug in the Lightning Dev Kit where, after a disconnection, a node could fail to retransmit a 'splice_locked' message to a peer that was still waiting for transaction signatures. Without this retransmission, the two peer…

Protocol state desynchronization between channel peers after reconnectionMissing retransmission of splice_locked for 0-conf splice channelsPotential channel unusability or stuck splice negotiation
5434015bby Wilmer Paulino+266−12 files
No security note in commit
Low 37 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

bolt12: add pay_for_bolt12_invoice for externally-sourced invoices

This commit adds a new API, pay_for_bolt12_invoice, that lets users pay a BOLT 12 invoice even if LDK did not originally request it. It is intended for advanced use cases like multi-sender payments and replaces an older, more restrictive A…

New API removes internal invoice-origin verification, shifting trust boundary to callerDocumentation explicitly warns caller to verify invoice via Bolt12Invoice::verify_using_metadata and to ensure unique payment_id to avoid duplicate paymentsInput validation added for zero amount, overpay, and partial-amount-without-MPP
5b80fe9cby Alkamal01+550−156 files
No security note in commit
Low 26 AI analysisMessage 90 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Include to_self_delay size in DelayedPaymentOutput weight calculation

This commit fixes a small accounting bug in how the Lightning wallet estimates the size (and therefore transaction fee) of a special Bitcoin transaction that sweeps funds back to the user after a channel closes. The old code always assumed…

debug assertion failure possible in development/testing buildstransaction weight/fee estimate overestimation up to 3 WUconstant replaced with per-descriptor length computation
e6652237by Matt Morehouse+97−83 files
No security note in commit
Informational 18 AI analysisMessage 65 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct docs on `ChannelSigner::get_per_commitment_point`

This commit only updates documentation comments for a Rust function called get_per_commitment_point. It removes an outdated warning that the method was non-asynchronous and that returning an error could cause a crash, and replaces it with …

Documentation-only changeRemoves outdated panic warningAdds retry/unblock guidance for signer errors
5057809bby Matt Corallo+6−31 file
No security note in commit
Informational 16 AI analysisMessage 35 · Opaque
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

ln/refactor: remove BlindedTrampolineEntrypoint

This commit is a small internal code cleanup in the Lightning Dev Kit's Trampoline routing code. It removes a separate 'BlindedTrampolineEntrypoint' payload variant and folds an optional blinding point into the existing 'Forward' variant. …

Refactor-only change with no added bounds checks or validationNo mention of vulnerability, CVE, security fix, or bug in commit messageTLV field changed from required to optional, but only for a newly unified variant used in internal construction
3e0c2697by Carla Kirk-Cohen+8−263 files
No security note in commit
Repository ledger

Explore captured commits

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

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.

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.

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

Lower-priorityRemove unnecessary FundedChannel::pending_splice checksby Jeffrey Czyz · d0780f71 · Sep 10, 2025 · 1 fileMessage 65 · AdequateInformational 12Details
Commit message · Jeffrey Czyz

Remove unnecessary FundedChannel::pending_splice checks

Now that PendingFunding directly contains the negotiated candidates,
some unnecessary checks can be removed.

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

This commit is a routine internal cleanup in the Lightning channel code. It removes redundant checks for splice funding transactions now that the data structure already stores the negotiated candidates directly. There is no indication this fixes a security bug or changes security-critical behavior.

Lower-priorityRename PendingSplice::pending_funding to negotiated_candidatesby Jeffrey Czyz · 2c7e49b0 · Sep 10, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Jeffrey Czyz

Rename PendingSplice::pending_funding to negotiated_candidates

An upcoming commit will rename PendingSplice to PendingFunding. Thus,
rename the similarly named field to something more meaningful. It
includes FundingScopes that have been negotiated but have not reached
enough confirmations by both parties to have exchanged splice_locked.

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 simple internal rename of a struct field from `pending_funding` to `negotiated_candidates` in the Lightning channel code. It does not change any behavior, logic, or security properties. The change is purely cosmetic to make the code easier to understand before a later refactor.

Lower-priorityMove FundedChannel::pending_funding into PendingSpliceby Jeffrey Czyz · 6349685e · Sep 10, 2025 · 1 fileMessage 73 · AdequateLow 26Details
Commit message · Jeffrey Czyz

Move FundedChannel::pending_funding into PendingSplice

FundedChannel::pending_funding and FundedChannel::pending_splice were
developed independently, but the former will only contain values when
the latter is set.

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

This is a code-cleanup refactor in a Bitcoin Lightning Network library. It moves a list of not-yet-confirmed funding transactions (pending_funding) from the general channel object into a splice-specific structure (PendingSplice), because that list is only meaningful during a splice. The change is mostly internal reorganization, but it also slightly reorders cleanup steps when a splice is finalized and adds helper methods to access the moved data. There is no direct evidence in the commit that this fixes a known security bug, but refactors around funding-state management can affect correctness of channel funds handling.