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 31 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-prioritySupport held_htlc_available counterparty reply pathby Valentine Wallace · 85117bea · Sep 18, 2025 · 2 filesMessage 73 · AdequateInformational 15Details
Commit message · Valentine Wallace

Support held_htlc_available counterparty reply path

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 lay some groundwork for using a counterparty-created reply path when
sending held_htlc_available as an async sender in the next commit.

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 routine code refactor in the Lightning Dev Kit library. It restructures how reply paths are specified for a new type of onion message (held_htlc_available) used in an experimental async-payments feature. The change adds a new enum so that future code can choose whether the reply path should end at the sender's own node or at an always-online channel counterparty. There is no security fix, vulnerability, or exploit here.

Lower-priorityTests: take netgraph locks after peer_stateby Valentine Wallace · 577d43d0 · Sep 18, 2025 · 3 filesMessage 78 · AdequateInformational 17Details
Commit message · Valentine Wallace

Tests: take netgraph locks after peer_state

Previously we were taking the NetworkGraph::{channels,nodes} locks before
ChannelManager::per_peer_state's peer_state locks in some tests, which violated
a lock order requirement we have in ChannelManager to take netgraph locks
*after* peer_state locks. See OffersMessageFlow::path_for_release_htlc which is
called while a peer_state lock is held and takes netgraph locks while creating
blinded paths.

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

This commit fixes the order in which internal locks are acquired inside test code only. It prevents a potential deadlock during tests, but does not change any production code that an attacker could exploit. The change makes tests follow the same lock-ordering rule already required by the main ChannelManager code.

Lower-prioritySend held_htlc_available with counterparty reply pathby Valentine Wallace · 8a38c883 · Sep 18, 2025 · 2 filesMessage 73 · AdequateLow 26Details
Commit message · Valentine Wallace

Send held_htlc_available with counterparty reply path

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.

After laying groundwork over some past commits, here we as an async sender send
held_htlc_available messages using reply paths created by our always-online
channel counterparty.

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

This commit adds a feature for asynchronous Lightning payments where an often-offline sender can ask their always-online channel counterparty to hold a payment. The change ensures that when the counterparty confirms a channel state update (via revoke_and_ack), the sender extracts reply paths provided by the counterparty and uses them to send 'held_htlc_available' onion messages. The reply paths ensure the recipient's release response returns to the sender's online counterparty. The commit also includes a defensive check to ignore reply paths for HTLCs that were not actually configured as async payments, which limits a potential privacy leak where a counterparty could otherwise learn which payments are async.

Lower-prioritySet UpdateAddHTLC::hold_htlc for offline payeesby Valentine Wallace · 99b7dba4 · Sep 18, 2025 · 3 filesMessage 68 · AdequateLow 27Details
Commit message · Valentine Wallace

Set UpdateAddHTLC::hold_htlc for offline payees

As part of supporting sending payments as an often-offline sender, the sender
needs to be able to set a flag in their update_add_htlc message indicating that
the HTLC should be held until receipt of a release_held_htlc onion message from
the often-offline payment recipient.

The prior commits laid groundwork to finally set the flag here in this commit.

See-also BOLTs PR 989

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

This commit finishes a feature that lets an often-offline Lightning payer ask the next node in the payment path to hold the payment (HTLC) until the offline recipient comes online and releases it. The change wires a previously unused flag through the payment-sending code so the 'hold_htlc' bit is actually set on outgoing HTLCs. It is a protocol feature implementation, not a fix for an active bug or exploit, but it touches payment logic and changes retry behavior for held HTLCs.

Lower-priorityTest async sendby Valentine Wallace · 9e305912 · Sep 18, 2025 · 2 filesMessage 53 · ThinInformational 15Details
Commit message · Valentine Wallace

Test async send

Add testing for sending payments from an often-offline sender to an
often-offline recipient.

53/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit adds new automated tests for a feature that lets Lightning payments complete even when the sender and recipient are often offline. It does not change production code behavior; it only adds test code and small test helper improvements. There is no indication of a security vulnerability being fixed or introduced.

Lower-priorityConditionally advertise htlc_hold featureby Valentine Wallace · 0fe202d3 · Sep 18, 2025 · 3 filesMessage 58 · ThinLow 27Details
Commit message · Valentine Wallace

Conditionally advertise htlc_hold feature

Now that we support the feature of sending payments as an often-offline sender
to an often-offline recipient, including the sender's LSP-side, we can start
conditionally advertising the feature bit to other nodes on the network.

Also remove an outdated comment, in a previous version of the code we had more
logic to check if we're an always-online node before advertising the feature
bit but it's since been removed.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Low 27/100

This commit removes test-only restrictions on a feature called htlc_hold, allowing regular users to enable it. The feature lets an often-offline payer hold outbound payments temporarily at the next hop. It is a normal feature rollout, not a fix for an active attack or bug. There is no direct evidence in the commit that this change addresses a security vulnerability.

Lower-priorityAdd util to gather channels that support htlc_holdby Valentine Wallace · feeab19f · Sep 18, 2025 · 1 fileMessage 73 · AdequateInformational 18Details
Commit message · Valentine Wallace

Add util to gather channels that support htlc_hold

Returns a list of channels where our counterparty supports
InitFeatures::supports_htlc_hold, or an error if there are none. Useful for
sending async payments to StaticInvoices.

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

This commit adds a small internal helper in a Lightning payment library. It collects payment channels whose peer supports a new 'hold HTLC' feature, used for a specific type of invoice (StaticInvoice/async payments). The change also tweaks an existing internal filter helper to accept mutable closures. There is no obvious security bug in the diff itself; it is a feature addition.

Lower-priorityAdd config flag for held outbound HTLCsby Valentine Wallace · 38685db0 · Sep 18, 2025 · 2 filesMessage 68 · AdequateInformational 18Details
Commit message · Valentine Wallace

Add config flag for held outbound HTLCs

If the flag is set to true, then if we as an often-offline payer receive a
static invoice to pay, we will attempt to hold the corresponding outbound HTLCs
with our next-hop channel counterparty(s) that support the feature. This
allows our node to go offline once the HTLCs are locked in even though the
recipient may not yet be online to receive them.

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

This commit adds a new optional configuration flag to the Lightning Dev Kit (LDK) library. When enabled, a paying node can ask its next-hop peers to hold outgoing payment contracts (HTLCs) for a while, which is useful for nodes that are often offline. The feature is off by default and is described by the project as intended only for private, often-offline nodes. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a new feature.

Lower-priorityImmediately archive `ChannelMonitor`s for inbound unfuned channelsby Matt Corallo · 744664e8 · Sep 18, 2025 · 2 filesMessage 81 · StrongLow 35Details
Commit message · Matt Corallo

Immediately archive `ChannelMonitor`s for inbound unfuned channels

If a peer opens a channel to us, but never actually broadcasts the
funding transaction, we'll still keep a `ChannelMonitor` around for
the channel. While we maybe shouldn't do this either, when the
channel ultimately times out 2016 blocks later, we should at least
immediately archive the `ChannelMonitor`, which we do here.

Fixes #3384

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Low 35/100

This change fixes a cleanup issue in the Lightning Dev Kit: when someone tries to open a channel with you but never actually puts the funding transaction on the blockchain, the software used to keep an unnecessary 'ChannelMonitor' record around for up to about two weeks. After this patch, that leftover record is archived immediately once the channel times out, reducing clutter and avoiding misleading 'claimable balance' reports. It is a reliability/resource issue rather than a direct theft-of-funds bug.

Lower-priorityExtract send_to_static_invoice utilby Valentine Wallace · 08c4be6b · Sep 18, 2025 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Valentine Wallace

Extract send_to_static_invoice util

Makes an upcoming commit cleaner.

In the util we allow manually passing in the first_hops that should be used
when paying a static invoice, which is useful for only passing in next-hop
channels that support the hold_htlcs feature.

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

This commit simply moves existing payment-sending code into a new helper function without changing behavior. It is a code cleanup to make a future change easier. There is no security issue visible in this patch.

Lower-priorityAdd hold_htlcs param to pay_route_internalby Valentine Wallace · f988dca8 · Sep 18, 2025 · 1 fileMessage 76 · AdequateInformational 13Details
Commit message · Valentine Wallace

Add hold_htlcs param to pay_route_internal

As part of supporting sending payments as an often-offline sender, the sender
needs to be able to set a flag in their update_add_htlc message indicating that
the HTLC should be held until receipt of a release_held_htlc onion message from
the often-offline payment recipient.

We don't yet ever set this flag, but lay the groundwork by including the
parameter in the pay_route method.

See-also <https://github.com/lightning/bolts/pull/989>

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 13/100

This commit is a small internal code cleanup that adds a new parameter called hold_htlcs to a private payment-sending helper function. The parameter is always set to false everywhere it is used, so it does not change any actual behavior. It simply prepares the code for a future Lightning protocol feature that lets senders ask intermediate nodes to hold payments until the recipient comes back online. There is no security issue in this change itself.

Lower-priorityAdd hold_htlc param to internal Channel APIsby Valentine Wallace · 4d9c2ed5 · Sep 18, 2025 · 2 filesMessage 68 · AdequateInformational 18Details
Commit message · Valentine Wallace

Add hold_htlc param to internal Channel APIs

As part of supporting sending payments as an often-offline sender, the sender
needs to be able to set a flag in their update_add_htlc message indicating that
the HTLC should be held until receipt of a release_held_htlc onion message from
the often-offline payment recipient.

We don't yet ever set this flag, but lay the groundwork by including a
parameter for it in internal channel send_htlc APIs, including serializing the
field when the parameter is set.

See-also BOLTs PR 989

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

This commit is a small, preparatory code change inside the Lightning Dev Kit's internal channel machinery. It adds a new 'hold_htlc' parameter to internal functions that send HTLCs (payment forwarding instructions), but the commit explicitly states that no code actually sets this flag to true yet. It is groundwork for a future feature described in BOLTs PR 989, which lets an often-offline sender ask a hop to hold an HTLC until a release message arrives. There is no immediate security issue visible in the diff itself.

Lower-priorityPersist hold_htlc flags in Channelby Valentine Wallace · 94d3167d · Sep 18, 2025 · 1 fileMessage 68 · AdequateInformational 19Details
Commit message · Valentine Wallace

Persist hold_htlc flags in Channel

As part of supporting sending payments as an often-offline sender, the sender
needs to be able to set a flag in their update_add_htlc message indicating that
the HTLC should be held until receipt of a release_held_htlc onion message from
the often-offline payment recipient.

We don't yet ever set this flag, but lay the groundwork by including the field
in Channel serialization.

See-also BOLTs PR 989

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

This commit adds a new 'hold_htlc' flag to Lightning channel data structures and makes sure it gets saved to and loaded from disk. The flag is not yet used to actually change any network behavior; it is only groundwork for a future feature that lets an often-offline sender ask the next node to hold an HTLC until a release message arrives. Because the flag is always set to None and never read for protocol decisions, it does not introduce a currently exploitable vulnerability.

Lower-priorityAdd init_features to list_channels filter callbackby Valentine Wallace · 1c776a9e · Sep 18, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Valentine Wallace

Add init_features to list_channels filter callback

Useful to filter for channel peers that support a specific feature, in this
case the hold_htlc feature, in upcoming commits.

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

This is a small, internal code change that adds extra information (a peer's feature flags) to a channel-listing filter callback. It does not fix a bug or change any security behavior on its own; it simply prepares the code for future filtering capabilities.

AI review queuedActually remove forward<>intercepted htlcs lock depby Valentine Wallace · b9f5fd6c · Sep 18, 2025 · 1 fileMessage 85 · StrongLow 40Details
Commit message · Valentine Wallace

Actually remove forward<>intercepted htlcs lock dep

8513341b1f7c39da3e6ad4521d4161362b0f4562 purported to remove a lock dependency
between ChannelManager::pending_intercepted_htlcs and ::forward_htlcs. However,
in practice the dependency remained because the locks of the two maps were
still held at the same time in some cases. Here we fix this.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Low 40/100

This commit fixes an incomplete earlier change that was meant to prevent two internal data structures in LDK's channel manager from being locked at the same time. Holding both locks together can create a lock-order dependency, which in the worst case can lead to deadlock (the program freezing up). The fix narrows the use of one lock so the two locks are no longer held together in the affected code path. There is no direct evidence in the commit of an exploitable security vulnerability such as theft of funds.

Lower-prioritySend `update_add_htlc` messages after HTLC removal messagesby Matt Corallo · ccb04439 · Sep 18, 2025 · 1 fileMessage 73 · AdequateLow 35Details
Commit message · Matt Corallo

Send `update_add_htlc` messages after HTLC removal messages

While nodes are generally supposed to validate commitment
transactions after the `commitent_signed` and not while HTLCs are
being added/removed, we don't. This can make a commitment update
where we use HTLC balance claimed with a fulfill to send new HTLCs,
which is perfectly valid, being rejected. While we shouldn't
currently generate any such commitments, we might want to in the
future, and on the off-chance that we do, or where such a
commitment would result in a dust threshold overrun, its always
safter to add new HTLCs to a commitment only after we've removed
any HTLCs we're going to remove, which we do here.

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

This commit changes the order in which Lightning network messages are sent to peers. Previously, new HTLCs (payment forwards) were announced before old HTLCs were removed with fulfill/fail messages. Now, removal messages are sent first. The commit message explains that this prevents a peer from rejecting a commitment update in cases where a newly claimed balance is used to fund a new HTLC in the same update. The change is defensive and does not fix an active exploit, but closes a protocol-handling edge case that could cause channel updates to be rejected.

Lower-priorityDeprecate `pay_for_offer_from_human_readable_name`by Matt Corallo · cface293 · Sep 18, 2025 · 2 filesMessage 65 · AdequateInformational 15Details
Commit message · Matt Corallo

Deprecate `pay_for_offer_from_human_readable_name`

While its cool to have a super trivial API to initiate payment to
a `HumanReadableName`, most wallets ultimately support multiple
payment instruction formats (eg on-chain) or multiple HRN
resolution schemes (eg LN-Address). Thus, we generally don't expect
this API to get a lot of use.

Meanwhile, we've now ended up with both a
`ChannelManager::pay_for_offer_from_hrn` and
`ChannelManager::pay_for_ofer_from_human_readable_name`, which is
incredibly confusing.

Here, we deprecate `pay_for_offer_from_human_readable_name`,
pushing folks to the `bitcoin-payment-instructions` crate instead.
Because it has outbound payment states associated with it it may be
some time before we can fully remove all the pieces of it, sadly.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode! Too few words to establish purpose
AI analysis · Informational 15/100

This commit simply marks a convenience payment method as deprecated. It does not fix a bug, change behavior, or address any security issue. The function still works; developers are just being steered toward a different, more flexible crate for handling human-readable payment names.

Security candidateAdd struct-level logging to OutboundPaymentsby Joost Jager · 5fc6282c · Sep 18, 2025 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Joost Jager

Add struct-level logging to OutboundPayments

Previously, OutboundPayments methods required borrowed logger
arguments since Logger lacked a Clone bound. This prevented
logging in all desired places, limiting trace statements for
debugging. This change initializes OutboundPayments with a
cloned Logger, simplifying method signatures and improving
logging flexibility.

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

This commit is a straightforward internal refactoring: it stores a copy of the logging object inside the OutboundPayments helper so individual methods no longer need to be passed a logger every time they are called. There is no change to payment logic, cryptographic handling, network behavior, or user-facing APIs. It only affects how diagnostic messages are produced.

Lower-prioritySpeed up `remove_stale_channels_and_tracking` nontriviallyby Matt Corallo · 28b526ac · Sep 18, 2025 · 2 filesMessage 73 · AdequateInformational 21Details
Commit message · Matt Corallo

Speed up `remove_stale_channels_and_tracking` nontrivially

During startup, the lightning protocol forces us to fetch a ton of
gossip for channels where there is a `channel_update` in only one
direction. We then have to wait around a while until we can prune
the crap cause we don't know when the gossip sync has completed.

Sadly, doing a large prune via `remove_stale_channels_and_tracking`
is somewhat slow. Removing a large portion of our graph currently
takes a bit more than 7.5 seconds on an i9-14900K, which can
ultimately ~hang a node with a few less GHz ~forever.

The bulk of this time is in our `IndexedMap` removals, where we
walk the entire `keys` `Vec` to remove the entry, then shift it
down after removing.

In the previous commit we shifted to a bulk removal model for
channels, here we do the same for nodes. This reduces the same test
to around 340 milliseconds on the same hardware.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 21/100

This commit is a performance optimization, not a security fix. It speeds up a cleanup routine in the Lightning network graph code that removes old, stale channels and nodes during startup. The change switches from removing nodes one-by-one to removing them in bulk, cutting the time from over 7.5 seconds to about 340 milliseconds on a fast desktop. There is no indication this fixes a vulnerability or changes security behavior.

Lower-prioritySpeed up `remove_stale_channels_and_tracking` nontriviallyby Matt Corallo · cc028f4c · Sep 18, 2025 · 2 filesMessage 73 · AdequateInformational 20Details
Commit message · Matt Corallo

Speed up `remove_stale_channels_and_tracking` nontrivially

During startup, the lightning protocol forces us to fetch a ton of
gossip for channels where there is a `channel_update` in only one
direction. We then have to wait around a while until we can prune
the crap cause we don't know when the gossip sync has completed.

Sadly, doing a large prune via `remove_stale_channels_and_tracking`
is somewhat slow. Removing a large portion of our graph currently
takes a bit more than 7.5 seconds on an i9-14900K, which can
ultimately ~hang a node with a few less GHz ~forever.

The bulk of this time is in our `IndexedMap` removals, where we
walk the entire `keys` `Vec` to remove the entry, then shift it
down after removing.

Here we shift to a bulk removal model when removing channels, doing
a single `Vec` iterate + shift. This reduces the same test to
around 1.38 seconds on the same hardware.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 20/100

This commit is a performance optimization, not a security fix. It speeds up a startup cleanup routine in the Lightning routing code by removing many stale channels in one pass instead of one at a time. The change reduces a reported 7.5-second freeze to about 1.4 seconds on a high-end CPU. There is no indication it fixes a vulnerability or changes security behavior.

Lower-priorityDon't auto-fail offers payments pre-HTLC lock inby Valentine Wallace · ebb8e79f · Sep 17, 2025 · 2 filesMessage 68 · AdequateModerate 57Details
Commit message · Valentine Wallace

Don't auto-fail offers payments pre-HTLC lock in

Previously, we had a bug that particularly affected async payments where if an
outbound payment was in the state {Static}InvoiceReceived and there was a call
to process_pending_htlc_forwards, the payment would be automatically abandoned.
We would behave correctly and avoid abandoning if the payment was awaiting an
invoice, but not if the payment had an invoice but the HTLCs weren't yet locked
in.

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

This commit fixes a bug in the Lightning Dev Kit where certain asynchronous payments could be wrongly marked as failed before the actual payment HTLCs were locked in. The fix expands the definition of 'not yet ready to fail' to include payments that have received an invoice but have not yet locked in HTLCs, preventing premature abandonment.

Security candidateDrop `RevokedOutput::is_counterparty_balance_on_anchors`by Matt Corallo · ffa60c82 · Sep 17, 2025 · 2 filesMessage 63 · AdequateLow 32Details
Commit message · Matt Corallo

Drop `RevokedOutput::is_counterparty_balance_on_anchors`

When we added anchors support we declined to aggregate claims
across different types of outputs for anchor channels, requiring
that we track whether a `RevokedOutput` claim came from an anchor
channel or not. This was only ever used to decide whether the claim
was aggregable or not.

In 0fe90c6f7c3325935b18dbc809be14afd8fe067f we started aggregating
by determining whether a claim is pinnable or not, rather than the
much-too-coarse aggregable flag, leaving
`is_counterparty_balance_on_anchors` unused.

Here we remove it entirely (as it would become ambiguous with
zero-commitment-fee anchor channels).

We always write `Some(())`, marking the claim as an anchor claim
and resulting in LDK prior to 0.1 refusing to aggregate the claim
(which is the more conservative stance). This breaks downgrade to
LDK 0.0.115 and earlier.

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
Why it was queued
update trust
AI analysis · Low 32/100

This commit removes an internal flag used when claiming funds from a revoked Lightning channel. The flag had become unused after a prior change, and removing it simplifies the code. The change intentionally breaks backward compatibility with older versions (before 0.1) to avoid ambiguous behavior with newer anchor channel types. It is a cleanup/refactoring change with a deliberate compatibility trade-off, not a fix for an active exploit.

Lower-priorityln: remove test flag from `negotiate_anchor_zero_fee_commitments`by Carla Kirk-Cohen · b0c384e2 · Sep 17, 2025 · 4 filesMessage 60 · AdequateLow 32Details
Commit message · Carla Kirk-Cohen

ln: remove test flag from `negotiate_anchor_zero_fee_commitments`

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Low 32/100

This commit removes a test-only restriction on a Lightning channel feature called 'anchor zero-fee commitments.' Previously, the feature could only be negotiated during tests; now it can be used in production code. The change itself is a feature enablement, not a direct bug fix, but it exposes a new protocol path that could carry security risks if the feature has flaws. There is no disclosed security incident or vulnerability tied to this commit in the provided materials.

Lower-priorityAdd a `OfferFromHrn` type to wrap `Offer`s which came from HRNsby Matt Corallo · 6679c4f3 · Sep 16, 2025 · 1 fileMessage 73 · AdequateInformational 11Details
Commit message · Matt Corallo

Add a `OfferFromHrn` type to wrap `Offer`s which came from HRNs

In a coming commit we'll provide users a different `ChannelManager`
method for sending to `Offer`s which were fetched by resolving an
HRN. Here, we first ad a wrapper type which can be used by HRN
resolution methods to nudge users towards calling the correct
payment method on `ChannelManager`.

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

This commit is a small, preparatory refactor in the Lightning Dev Kit library. It introduces a new wrapper type called OfferFromHrn to mark payment offers that came from a human-readable name (like a BIP 353 DNS-style address). The wrapper helps ensure that future code calls the correct method when building an invoice request. There is no security fix or vulnerability patch here; it is purely a code-organization change setting up a later feature.

Lower-priorityMove reasonable-default arguments out of `pay_for_offer`.by Matt Corallo · f65e78da · Sep 16, 2025 · 5 filesMessage 73 · AdequateInformational 18Details
Commit message · Matt Corallo

Move reasonable-default arguments out of `pay_for_offer`.

`ChannelManager::pay_for_offer` and
`ChannelManager::pay_for_offer_from_human_readable_name` have
accumulated a handful of arguments, most of which we expect users
to never actually set.

Instead, here, we move `quantity` and `payer_note` (which we expect
users to never set) as well as `route_params_config` and
`retry_strategy` (which we expect users to generally stick with the
defaults on) into a new struct, which implements `Default`.

This cleans up a good bit of cruft on payment calls.

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

This commit is a routine API cleanup, not a security fix. It groups several rarely-used arguments of the `pay_for_offer` and `pay_for_offer_from_human_readable_name` functions into a new `OptionalOfferPaymentParams` struct with sensible defaults. Existing callers are updated to use the new, simpler call pattern. There is no change to payment logic, validation, or security behavior.