LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1497 commits in the local evidence base

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

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

Does the history explain itself?

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

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

Who is changing the project?

Public Git author strings; identities are not independently verified.

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

Published AI watches

Last scanned 10 minutes ago

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

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

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

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

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

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

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

Add test framework coverage of `Listen` block connection replays

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

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

Update functional test block connection to detect block replays

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

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

Correct HTLC confusion on unrevoked counterparty commitment txs

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

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

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

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

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

Avoid panicking when attempting to send an oversized message

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

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

Avoid oversized relayed failure messages

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

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

Reject attempts to advance one-hop blinded forward paths

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

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

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

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

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

Apply the unfunded channel peer limit to all unaccepted channels

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

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

Allow filtered block rescans at the current tip

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

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

Avoid panic when reorged claims cannot merge

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

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

Update crate repository links to forgejo

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

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

Account for message type prefix len in prevtx length enforcement

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

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

Retransmit splice_locked for 0-conf channels missing tx_signatures

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

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

bolt12: add pay_for_bolt12_invoice for externally-sourced invoices

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

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

Include to_self_delay size in DelayedPaymentOutput weight calculation

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

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

Correct docs on `ChannelSigner::get_per_commitment_point`

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

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

ln/refactor: remove BlindedTrampolineEntrypoint

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

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

Explore captured commits

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

Lower-priorityCompute trampoline session_priv from outer session_privby Valentine Wallace · 445ca831 · Sep 19, 2025 · 2 filesMessage 95 · StrongLow 29Details
Commit message · Valentine Wallace

Compute trampoline session_priv from outer session_priv

This simplifies the code and makes it more straightforward to test unblinded
trampoline receives where we need to compute the trampoline session_priv when
manually creating the inner onion. (The trampoline onion needs to be manually
created because LDK does not natively support sending to unblinded trampolines,
just receiving.)

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Low 29/100

This commit refactors how a secret key used inside trampoline-style Lightning payments is derived. Previously, the inner (trampoline) onion's session key was the original key, and the outer onion's key was a hash of it. The commit flips this: the outer onion uses the original key, and the trampoline onion key is computed as a hash of the outer key. The change is described by the author as a code simplification and test-helper improvement, not as a security fix. There is no direct evidence in the commit or supplied references that this resolves an exploitable vulnerability.

Lower-priorityDebug-Assert that there are no queued messages when a peer connectsby Matt Corallo · 47a3e5c6 · Sep 19, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Debug-Assert that there are no queued messages when a peer connects

In the previous two commits we stopped enqueueing messages for
disconnected peers. Here we add some basic test coverage of these
changes by asserting that there are no queued messages for a peer
when they (re-)connect.

We also add a few assertions that a peer is connected when we push
a message onto the queu, in cases where we expect a peer to be
connected.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit adds internal safety checks (debug-only assertions) to the Lightning Dev Kit code. It ensures that when a peer reconnects, there are no leftover queued messages from before, and that messages are only queued for peers that are currently connected. These assertions help catch programming mistakes during testing but do not change behavior in production builds. There is no indication this fixes an active security vulnerability.

Security candidateStop enqueueing error messages for disconnected peersby Matt Corallo · a06ebee0 · Sep 19, 2025 · 6 filesMessage 73 · AdequateInformational 18Details
Commit message · Matt Corallo

Stop enqueueing error messages for disconnected peers

If a channel is failed while a peer is disconnected, we'll still
have a `PeerState` for that peer. Historically, we haven't bothered
to check if a peer is actually connected before we push the `error`
message onto the `PeerState::pending_msg_events` queue, leaving us
sending messages into the void.

This is generally not an issue as
`ChannelManager::get_and_clear_pending_msg_events` should be called
very regularly, removing these messages and then dropping them as
`PeerManager` won't have anything to do with them. Further, when
the the message is an `error`, if a peer happens to connect between
when we push the message and when `get_and_clear_pending_msg_events`
is called the worst that happens is they get the `error` message
we'd end up sending them when they try to reestablish the channel
anyway.

Still, its awkward to leave the `error`s lying around in a message
queue for a disconnected peer, so we remove them here.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
boot or update path
AI analysis · Informational 18/100

This change stops a Lightning node from queuing 'error' messages for peers that are currently disconnected. Previously, when a channel failed while a peer was offline, the node would still put an error message in that peer's outgoing message queue. The message would normally be discarded harmlessly later, but it was untidy and could briefly sit in the queue. The patch simply checks whether the peer is connected before adding the message. It is described by the authors as a cleanup rather than a security fix, with no practical exploit identified.

Security candidateStop enqueueing messages for disconnected peersby Matt Corallo · 92e79ab1 · Sep 19, 2025 · 3 filesMessage 68 · AdequateModerate 50Details
Commit message · Matt Corallo

Stop enqueueing messages for disconnected peers

If a channel operation occurs while a peer is disconnected, we'll
still have a `PeerState` for that peer. Historically, we haven't
bothered to check if a peer is actually connected before we push
new messages onto the `PeerState::pending_msg_events` field,
leaving us sending messages into the void.

This is generally not an issue as
`ChannelManager::get_and_clear_pending_msg_events` should be called
very regularly, removing these messages and then dropping them as
`PeerManager` won't have anything to do with them.

Still, there is a race condition here - if a peer manages to
connect between the generation of one such message and when
`get_and_clear_pending_msg_events` is called, we may enqueue a
message to the peer which makes no sense and could lead to a
spurious channel closure (especially in the case of an async
`ChannelMonitorUpdate` completion or async signing operation, which
often lead to normal channel message generation).

Further, if a peer is slow to send their `channel_reestablish`
message after connection this race could be substantially more
likely, as such normal channel messages may be nonsense until we've
completed the reestablish dance (i.e. the later reestablish dance
may lead us to re-send the same messages again immediately).

Here we remove most of the cases where we enqueue messages for
disconnected peers.

Note that we differentiate between two different checks for
connected-ness - for cases where we're sending an `error` or gossip
messages, we allow the messages to be enqueued if the peer is
connected at all. For most other cases, we only allow messages to
be enqueued if the peer is connected *and* the channel has
completed its reestablish dance (if required, i.e. the channel is
"connected").

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

This commit fixes a race condition in the Lightning Dev Kit where the software could queue up messages for a peer that was temporarily disconnected. If that peer reconnected at just the right moment, it could receive messages that don't make sense for the current channel state, potentially causing a channel to close unexpectedly. The fix adds checks to avoid enqueueing most channel messages unless the peer is connected and the channel re-establishment handshake is complete. Error and gossip messages are still allowed when the peer is simply connected.

Lower-priorityCorrect `msgs_sent_since_pong` tracking for gossip forwardsby Matt Corallo · 686a586c · Sep 19, 2025 · 1 fileMessage 85 · StrongLow 35Details
Commit message · Matt Corallo

Correct `msgs_sent_since_pong` tracking for gossip forwards

When we forward gossip messages, we use the already-encoded copy
we have, pushing it onto the `gossip_broadcast_buffer`. When we
have free socket buffer space, and there are no non-gossip messages
pending, we'll remove it from the `gossip_broadcast_buffer` and
push it onto the normal `pending_outbound_buffer` socket queue.

Separately, we use `msgs_sent_since_pong` to ensure that our peer
is being responsive and our messages are getting through with
minimal latency. After we send 32 messages (if we've already
received the `pong` for the last `ping` wensent), we send an extra
`ping` and will only queue up an additional 32 forwarded gossip
messages before we start dropping forwarded gossip on the floor.

Previously, we (arguably) incorrectly incremented
`msgs_sent_since_pong` when we pushed a message onto the
`gossip_broadcast_buffer`, not when it was actually queued up in
our `pending_outbound_buffer` immediate socket queue. This is
fairly strange - the point of `msgs_sent_since_pong` is to keep
peer latency low, we already independently enforce memory limits to
ensure we drop forwarded gossip messages if a peer's message queues
have grown too large. This means we potentially disconnect a peer
for not draining the backlog forwarded-gossip socket queue fast
enough, rather than simply dropping gossip.

While this shouldn't be a big deal in practice, I do see (mostly
Tor) peers disconnect on my node occasionally, and while its likely
due to Tor circuits hanging and a disconnect is needed, the
incorrect tracking here makes state analysis difficult as there are
nearly always a flow of enough gossip messages to "send to the
peer". Its also possible that this allows incredibly low bandwidth
connections to stay afloat more durably.

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

This change fixes how a Lightning node counts messages it has sent to a peer. Previously, the node counted forwarded gossip messages as 'sent' when they were merely placed in a broadcast buffer, even though they had not yet been written to the actual network socket. This could cause the node to think the peer was slow or unresponsive and disconnect it prematurely, especially for peers on slow networks like Tor. The fix moves the count to the point where the message is actually queued for sending on the socket, so the node only disconnects peers for genuine backpressure, not for buffered gossip waiting to be sent.

Lower-priorityfix: Onion v3 parse/format order and render lowercaseby Erick Cestari · f9fc879f · Sep 19, 2025 · 1 fileMessage 100 · StrongLow 44Details
Commit message · Erick Cestari

fix: Onion v3 parse/format order and render lowercase

Tor v3 addresses are base32 of 35 bytes laid out as:
[32-byte ed25519 pubkey][2-byte checksum big-endian][1-byte version]

see: https://spec.torproject.org/rend-spec/encoding-onion-addresses.html

* Parsing now slices 0..32 = pubkey, 32..34 = checksum (BE), 34 = version.
* Display now appends pubkey + checksum + version and lowercases base32.
* Adds/updates test vector accordingly.

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
fuzzing or regression evidence
AI analysis · Low 44/100

This commit fixes how rust-lightning reads and writes Tor onion v3 network addresses. Previously the code treated the 56-character onion address as if its bytes were arranged in the wrong order: it put the version and checksum at the front and the public key at the back, which is the opposite of the real Tor specification. It also printed onion addresses in uppercase base32 instead of lowercase. The fix reorders parsing and formatting to match the official Tor layout (pubkey first, then checksum, then version) and forces lowercase output. Because of the old bug, a valid real-world onion address would have been parsed into the wrong internal fields, and addresses produced by the library would not have been valid Tor addresses.

AI review queuedFix lint CI jobby Matt Corallo · f013d957 · Sep 18, 2025 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Matt Corallo

Fix lint CI job

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit adds one line to a CI lint script, telling the Clippy linter to ignore a newly introduced style warning (manual_is_multiple_of) until the project can require a newer Rust compiler version. It does not change any application code, runtime behavior, or security-sensitive logic.

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