LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

305security candidates264second-pass queue1614AI analyses
175commits · 30 days
273commits · 60 days
653commits · 180 days
1332commits · 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.

71/100 average clarity
726Strong · 80–100
857Adequate · 60–79
302Thin · 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.
Matt Corallo60181423876
Elias Rohrer15415153667
auto-pr-bot622025487
Jeffrey Czyz19645182169
Wilmer Paulino15945155169
Valentine Wallace15715145169
Leo Nash11613116162
Vincenzo Palazzo11311183
Joost Jager16324162069
elnosh401434059
shaavan22622069
wpaulino2059082
Analysis record

Published AI watches

Last scanned 47 minutes ago

Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix 32-bit spin in Vec<u8> deserialization on huge lengths' (#5102)

This commit fixes a bug in how rust-lightning reads variable-length byte blobs on 32-bit systems. A malicious message could claim a huge byte count; on 32-bit builds the old code would try to allocate an oversized buffer in tiny increments…

Integer truncation / cast-down bug in deserializationPotential memory exhaustion / denial-of-service on 32-bit targetsFix caps read chunk size before usize conversion
227b5256by Matt Corallo+1−11 file
No security note in commit
Moderate 62 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to sign messages that alias channel_announcement serializations' (#5727)

This change tightens a security guardrail in LDK's message-signing helper. Previously, the code refused to sign arbitrary text if the prefixed text happened to look like a 'node_announcement' gossip message, because an attacker could repla…

signature-replay hardeninggossip-message aliasing preventiondefensive signing policy expansion
6bc00947by Matt Corallo+69−143 files
Vendor flagged security relevance
High 76 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Refuse to sign messages that alias channel_announcement serializations

This commit fixes a security gap in how the Lightning Dev Kit signs arbitrary messages. Previously, the code refused to sign messages that could be mistaken for a 'node_announcement' gossip message, because such a signature could be replay…

Signature replay / cross-protocol forgery preventionExpansion of existing anti-aliasing guard to additional gossip message typesCommit message explicitly describes forged gossip signature risk
66c2acecby auto-pr-bot+69−143 files
Vendor flagged security relevance
Low 29 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Make Path and Route fields private' (#5068)

This commit makes the internal fields of two data structures, Path and Route, private and adds controlled constructors and read-only accessors. It also adds validation so that empty paths or routes are rejected. The change is primarily a d…

Encapsulation of previously public struct fieldsAddition of input validation in constructors (non-empty hops/paths)Deserialization now rejects invalid empty paths/routes
8f8f95a2by Matt Corallo+83−205 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Populate non-witness UTXOs in bump PSBTs' (#5471)

This change fixes how transaction fee-bumping PSBTs (Partially Signed Bitcoin Transactions) are built in LDK. Previously, when a non-witness UTXO (a non-SegWit coin) was used as an input, the PSBT only had a witness UTXO field populated fo…

PSBT input metadata correctness fixNon-witness UTXO now populated for legacy inputs in fee-bump transactionsAffects CPFP anchor and HTLC transaction signing paths
f1688ce6by Matt Corallo+4−21 file
No security note in commit
Moderate 66 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Track refused monitor updates as pending until persisted' (#5663)

This commit fixes a bug in the Lightning Dev Kit's handling of channel monitor updates that are refused because the channel's funding transaction was already spent on-chain. Previously, such refused updates were persisted as a full monitor…

Durability ordering bug: later MonitorEvent::Completed could imply earlier refused update was persistedRefused monitor update may carry forwarded HTLC preimage, creating risk of inconsistent state across restartAsynchronous persistence tracking gap for refused updates
ea277539by Matt Corallo+56−354 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Expand coverage of splices confirmed before tx_signatures complete' (#5691)

This commit only adds and modifies test code in rust-lightning. It expands test coverage for a specific edge case in Lightning channel splicing: when a splice transaction gets confirmed before both peers have finished exchanging signatures…

11a8e901by Val Wallace+102−411 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct FeeEstimator docs on the 253 sat/kW lower bound

This is a documentation-only edit. It corrects a misleading comment in the code that wrongly claimed all fee estimates returned to LDK are forced to be at least 253 satoshis per 1000 weight units. The new comment clarifies that this minimu…

ea2051feby auto-pr-bot+9−31 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Track splice confirmation while awaiting tx_signatures' (#5570)

This change fixes a bug in Lightning Dev Kit's splicing logic. During a splice, one side can broadcast the new funding transaction as soon as it has the other side's signatures. Previously, if that transaction confirmed on-chain before the…

State-machine inconsistency in channel funding lifecycleMissing chain-source watch for in-flight splice funding transactionPotential failure to send splice_locked after splice confirms during signature exchange
ca778e61by Matt Corallo+245−32 files
No security note in commit
Moderate 63 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Account for current HTLC fees in dust exposure' (#5690)

This change fixes how Lightning nodes calculate the financial risk from tiny ('dust') HTLCs when the current on-chain fee rate is higher than the node's own local fee estimate. Previously, the code only considered a buffered fee rate when …

Incorrect fee exposure accounting for dust HTLCsPotential to accept HTLCs whose commitment/HTLC-success fees exceed their value under current feerateEconomic griefing / forced-channel-closure cost manipulation
cc798f60by Matt Corallo+108−382 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Replace cloned array literal with slice::from_ref in reload test' (#5689)

This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.

03ca832fby Matt Corallo+1−11 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Replace cloned array literal with slice::from_ref in reload test

This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and …

93e0129cby auto-pr-bot+1−11 file
No security note in commit
Informational 12 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix CI: rebuild test coin-selection impl and rework reused-ID balance test' (#5684)

This commit is a test-only fix for a broken continuous integration (CI) build. It updates a test mock to match a new function signature and rewrites an existing test to use three nodes instead of two so the test scenario remains valid unde…

17bac68aby Matt Corallo+26−202 files
No security note in commit
Moderate 68 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Guard pending closing signatures before channel_ready' (#5681)

This change fixes a Lightning channel bug where a malicious peer could renegotiate the closing transaction fee while the local node was still waiting for its own signer to produce the final signature. If allowed, the local node might combi…

State-machine guard expansion to prevent fee renegotiation while a closing signature is pendingRisk of combining mismatched signatures across different closing feesRegression test demonstrates malicious peer renegotiation attempt and expected warning rejection
a01273a2by Matt Corallo+169−21 file
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Release wallet UTXOs when FundingBuilder rejects a coin selection' (#5634)

This change fixes a wallet bug in rust-lightning where a UTXO could be selected for a Lightning funding transaction, then rejected because its previous transaction was too large to fit in a Lightning peer message. Previously, that rejectio…

API change to CoinSelectionSource::select_confirmed_utxos adding max_input_prevtx_serialized_lenWalletSync filters UTXOs by prevtx serialized length before selectionFundingBuilder enforces Lightning tx_add_input message-size limit at selection time
56054190by Matt Corallo+148−155 files
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Refuse to pay BOLT 12 invoices with records above experimental range

This commit hardens LDK's BOLT 12 payment logic so it refuses to pay invoices containing very large unknown record types (4 billion and up). These records are legal under the Lightning spec, but LDK doesn't understand them, so the change t…

Defensive refusal to pay invoices with unknown high-numbered TLV recordsReuses existing UnknownRequiredFeatures failure path instead of adding a new oneAdds explicit checks before payment state insertion and route construction
2970372fby auto-pr-bot+106−177 files
No security note in commit
Moderate 64 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Read invoice TLV records above the experimental range

This commit fixes a backward-compatibility bug in LDK's BOLT 12 invoice parser. A previous change had capped the range of 'experimental' TLV record types at 4 billion, but the Lightning spec imposes no upper bound. As a result, invoices cr…

Backward-compatibility regression in deserialization of persisted channel monitorsDenial-of-service via unreadable monitor blocking all channel monitoringSpec compliance fix: TLV record types have no upper bound
9e28db58by auto-pr-bot+133−84 files
No security note in commit
High 74 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to sign messages that collide with gossip serializations' (#5677)

This change fixes a security issue where a signed text message could be crafted so that its prefixed form looks exactly like a Lightning 'node_announcement' gossip message. Because both use the same double-SHA256 hash and the same signing …

Signature replay / message confusion between signed messages and gossip announcementsForged `node_announcement` signatures via chosen-prefix message constructionNew validation rejects prefixed messages that deserialize as `UnsignedNodeAnnouncement`
ec40e097by Matt Corallo+74−148 files
Vendor flagged security relevance
Low 37 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Retry a single HTLC before abandoning an unfundable batch' (#5406)

This change fixes a corner case in how the Lightning node tries to claim multiple pending HTLCs (small Bitcoin payments locked in a channel) when the wallet cannot fund a single large batch transaction. Previously, if the multi-HTLC batch …

Funds-recovery robustness improvement: prevents premature abandonment of a single unbatched HTLCChange in error-handling arithmetic from checked_sub/saturating_sub with max(1)New unit tests covering both failed and successful singleton HTLC funding paths
643e8684by wpaulino+119−21 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to persist fresh monitors that alias archived monitors' (#5645)

This change prevents a Lightning node from accidentally overwriting an archived copy of a channel's security monitor with a brand-new one that happens to use the same identifier. In the old code, if a new channel reused the same identifier…

Data-loss prevention: stops archived ChannelMonitor from being overwritten by a later channel with the same keySafety guard added to both sync and async persistence pathsPersistence refusal surfaces as InProgress/UnrecoverableError rather than silent overwrite
3c606c11by Matt Corallo+298−332 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-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-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-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-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-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-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.

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

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