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
71commits · 30 days
205commits · 60 days
663commits · 180 days
1488commits · 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 13 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-prioritySupport deleting legacy forward map persistence in 0.5by Valentine Wallace · 0ca79af5 · Feb 6, 2026 · 1 fileMessage 73 · AdequateLow 32Details
Commit message · Valentine Wallace

Support deleting legacy forward map persistence in 0.5

In 0.3+, we are taking steps to remove the requirement of regularly persisting
the ChannelManager and instead rebuild the set of HTLC forwards (and the
manager generally) from Channel{Monitor} data.

We previously merged support for reconstructing the
ChannelManager::decode_update_add_htlcs map from channel data, using a new
HTLC onion field that will be present for inbound HTLCs received on 0.3+ only.
The plan is that in upcoming LDK versions, the manager will reconstruct this
map and the other forward/claimable/pending HTLC maps will automatically
repopulate themselves on the next call to process_pending_htlc_forwards.

As such, once we're in a future version that reconstructs the pending HTLC set,
we can stop persisting the legacy ChannelManager maps such as forward_htlcs,
pending_intercepted_htlcs since they will never be used.

For 0.3 to be compatible with this future version, in this commit we detect
that the manager was last written on a version of LDK that doesn't persist the
legacy maps. In that case, we don't try to read the old forwards map and run
the new reconstruction logic only.

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

This commit prepares LDK 0.3/0.4 to read ChannelManager data written by a future LDK 0.5. In 0.5, legacy HTLC forwarding maps will no longer be persisted; instead pending forwards are rebuilt from channel monitor data. The change detects the newer serialization version and skips reading the old maps, while in non-test builds it now enables reconstruction from monitors when the stored version is 0.5+. It is a forward-compatibility and data-format change, not a direct fix for an active exploit.

Lower-priorityCheck pruned HTLCs were resolved on startupby Valentine Wallace · 979d5648 · Feb 6, 2026 · 4 filesMessage 68 · AdequateModerate 68Details
Commit message · Valentine Wallace

Check pruned HTLCs were resolved on startup

In a recent commit, we added support for pruning an inbound HTLC's persisted
onion once the HTLC has been irrevocably forwarded to the outbound edge.

Here, we add a check on startup that those inbound HTLCs were actually handled.
Specifically, we check that the inbound HTLC is either (a) currently present in
the outbound edge or (b) was removed via claim. If neither of those are true,
we infer that the HTLC was removed from the outbound edge via fail and fail the
inbound HTLC backwards.

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

This commit fixes a crash-recovery bug in the Lightning Dev Kit (LDK) routing node software. When a forwarding node restarts after a crash, it may have an inbound payment that it already forwarded to the next hop but has not yet resolved backward. Previously, if the outbound HTLC was removed by a failure but the failure signal was lost in the crash, the node could leave the inbound payment stuck or mishandled. The patch adds a startup check: for every inbound HTLC marked 'already forwarded,' it verifies the HTLC is either still present on the outbound channel or was claimed with a known payment preimage. If neither is true, the node now correctly fails the payment backward to the previous hop. This prevents funds from being locked up and ensures honest nodes do not lose money or break protocol consistency after an unclean shutdown.

Lower-priorityTrivially refactor reload_node macroby Valentine Wallace · 30dbf40e · Feb 6, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Valentine Wallace

Trivially refactor reload_node macro

Cleans it up a bit in preparation for adding a new variant in the next commit.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Informational 15/100

This is a purely internal cleanup of a test helper macro in the Lightning Dev Kit Rust codebase. It renames and splits a macro used only in tests so that future variants can be added more easily. There is no change to production code, no change to user-facing behavior, and no security relevance.

Lower-priorityDeterministic reconstruct_manager option in testsby Valentine Wallace · d435e5bb · Feb 6, 2026 · 3 filesMessage 90 · StrongInformational 15Details
Commit message · Valentine Wallace

Deterministic reconstruct_manager option in tests

We recently merged (test-only, for now) support for the ChannelManager
reconstructing its set of pending HTLCs from Channel{Monitor} data, rather than
using its own persisted maps. But because we want test coverage of both the new
reconstruction codepaths as well as the old persisted map codepaths,
in tests we would decide between those two sets of codepaths randomly.

We now want to add some tests that require using the new codepaths, so here we
add an option to explicitly set whether to reconstruct or not rather than
choosing randomly.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit is a test-only change. It adds a new option that lets tests explicitly choose whether Lightning Dev Kit's ChannelManager rebuilds its pending payment state from ChannelMonitor data, instead of leaving it up to random chance. There is no change to production code behavior and no security issue.

Lower-priorityPrune inbound HTLC onions once forwardedby Valentine Wallace · 3cc64f04 · Feb 6, 2026 · 3 filesMessage 68 · AdequateLow 25Details
Commit message · Valentine Wallace

Prune inbound HTLC onions once forwarded

We store inbound committed HTLCs' onions in Channels for use in reconstructing
the pending HTLC set on ChannelManager read. If an HTLC has been forwarded to
the outbound edge, we no longer need to persist the inbound edge's onion and
can prune it here.

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

This commit is a memory/storage cleanup change in a Lightning Network node implementation. Once a payment (HTLC) has been securely forwarded to the next channel, the node now discards the detailed routing onion it received from the previous channel, because that onion is no longer needed after forwarding. It keeps only the small pieces of information required to handle failures or claims after a restart. The change includes tests confirming the onion is kept before forwarding and removed after forwarding.

Lower-priorityMark legacy pre-0.3 inbound htlcs on persistby Valentine Wallace · a5c8bcee · Feb 6, 2026 · 2 filesMessage 80 · StrongInformational 24Details
Commit message · Valentine Wallace

Mark legacy pre-0.3 inbound htlcs on persist

In 0.3+, we are taking steps to remove the requirement of regularly persisting
the ChannelManager and instead rebuild the set of HTLC forwards (and the
manager generally) from Channel{Monitor} data.

We previously merged support for reconstructing the
ChannelManager::decode_update_add_htlcs map from channel data, using a new
HTLC onion field that will be present for inbound HTLCs received on 0.3+ only.

However, we now want to add support for pruning this field once it's no longer
needed so it doesn't get persisted every time the manager gets persisted. At
the same time, in a future LDK version we need to detect whether the field was
ever present to begin with to prevent upgrading with legacy HTLCs present.

We accomplish both by converting the plain update_add option that was
previously serialized to an enum that can indicate whether the HTLC is from
0.2- versus 0.3+-with-onion-pruned (a variant for the latter is added in the
next commit).

Actual pruning of the new update_add field is added in the next commit.

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

This commit is a data-format change inside the Lightning Dev Kit (LDK). It replaces a simple 'yes/no' storage field for incoming HTLCs with a three-way label: 'has full onion data', 'legacy pre-0.3 HTLC', or (in a later commit) 'onion was pruned'. The goal is to let future LDK versions know whether old HTLCs are still present so the node does not upgrade while carrying incompatible legacy state. There is no direct bug fix or exploit here; it is preparatory groundwork for safer upgrades and smaller persistence.

Lower-priorityTrivial: document some fields on MonitorRestoreUpdatesby Valentine Wallace · a36c85a9 · Feb 6, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Valentine Wallace

Trivial: document some fields on MonitorRestoreUpdates

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

This commit only adds plain-text documentation comments to two fields inside an internal data structure. No code behavior was changed, and there is no security effect.

Lower-prioritySimplify channel_closed check on manager readby Valentine Wallace · 7304cc9b · Feb 6, 2026 · 1 fileMessage 60 · AdequateInformational 12Details
Commit message · Valentine Wallace

Simplify channel_closed check on manager read

This cleanup falls out of the changes made in the previous commit. Separated
out here for reviewability.

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

This is a code cleanup change that moves an existing `if !is_channel_closed { continue; }` check to the outside of a loop, wrapping the whole loop in `if is_channel_closed { ... }`. It does not change behavior; it only simplifies the structure for readability. There is no indication of a security fix.

Lower-priorityDe-dup decode_htlcs from monitor only if channel is closedby Valentine Wallace · 56b9f417 · Feb 6, 2026 · 4 filesMessage 73 · AdequateModerate 66Details
Commit message · Valentine Wallace

De-dup decode_htlcs from monitor only if channel is closed

We recently added support for reconstructing
ChannelManager::decode_update_add_htlcs on startup, using data present in the
Channels. However, we failed to prune HTLCs from this rebuilt map if a given
inbound HTLC was already forwarded to the outbound edge and in the outbound
holding cell (this bug could've caused us to double-forward HTLCs, fortunately
it never shipped).

As part of fixing this bug, we clean up the overall pruning approach by:
1. If the Channel is open, then it is the source of truth for what HTLCs are
outbound+pending (including pending in the holding cell)
2. If the Channel is closed, then the corresponding ChannelMonitor is the
source of truth for what HTLCs are outbound+pending

Previously, we would only consider the monitor's pending HTLCs, which ignored
holding cell HTLCs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

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

This commit fixes a bug in LDK's Lightning node restart logic. When a node restarts and rebuilds its list of HTLCs (payments) that need forwarding, it could have re-forwarded a payment that was already sitting in an outbound 'holding cell' waiting to be sent. The fix makes the open channel the source of truth for pending outbound forwards, and only falls back to the on-chain ChannelMonitor data when the channel is closed. The commit message explicitly says this bug 'never shipped' (i.e., was caught before release).

Lower-priorityDon't double-forward inbounds resolved in holding cellby Valentine Wallace · 37375ca3 · Feb 6, 2026 · 3 filesMessage 73 · AdequateModerate 56Details
Commit message · Valentine Wallace

Don't double-forward inbounds resolved in holding cell

We recently added support for reconstructing
ChannelManager::decode_update_add_htlcs on startup, using data present in the
Channels. However, we failed to prune HTLCs from this rebuilt map if a given
HTLC was already forwarded+removed from the outbound edge and resolved in the
inbound edge's holding cell.

Here we fix this bug that would have caused us to
double-forward inbound HTLC forwards, which fortunately was not shipped.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

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

This commit fixes a bug in the Lightning Dev Kit's rust-lightning implementation where, after restarting a forwarding node, an already-resolved inbound payment could be forwarded a second time. The bug occurred because the code rebuilt a list of pending payments from channel data on startup but did not exclude payments whose resolution was waiting in a temporary 'holding cell.' The fix filters out such payments so they are not double-forwarded. The commit message says the buggy code was never shipped in a release.

Lower-priorityfix: test_payment_path_scoring failingby okekefrancis112 · 1d90fce7 · Feb 6, 2026 · 1 fileMessage 47 · ThinInformational 15Details
Commit message · okekefrancis112

fix: test_payment_path_scoring failing

47/100 · ThinMessage clarity
✓ Descriptive subject✓ Uses a recognizable type or scope! No meaningful explanatory body
AI analysis · Informational 15/100

This is a one-line test-only fix that adds a missing notification call when an event is pushed in a test helper. It makes a unit test reliable and has no apparent security relevance.

AI review queuedAdd `counterparty_node_id` to `TransactionType` variantsby Elias Rohrer · 56f12c8b · Feb 6, 2026 · 9 filesMessage 73 · AdequateInformational 20Details
Commit message · Elias Rohrer

Add `counterparty_node_id` to `TransactionType` variants

This adds `counterparty_node_id` tracking to all `TransactionType`
variants, enabling downstream users to identify the channel counterparty
associated with each broadcast transaction.

For single-channel variants (`CooperativeClose`, `UnilateralClose`,
`AnchorBump`, `Claim`, `Splice`), the counterparty is stored directly.

For multi-channel variants (`Funding`, `Sweep`), the type now uses
`Vec<(PublicKey, ChannelId)>` to pair each channel with its counterparty.

The `OnchainTxHandler` now stores `counterparty_node_id` and provides a
`set_counterparty_node_id` method for initialization during
deserialization of older data.

Co-Authored-By: HAL 9000
Signed-off-by: Elias Rohrer <dev@tnull.de>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Informational 20/100

This commit is a straightforward observability and metadata improvement: it adds the channel counterparty's node ID to every variant of the TransactionType enum used when LDK broadcasts on-chain transactions. It does not change transaction logic, signatures, fee calculations, or who can broadcast what. Downstream users (such as custom transaction broadcasters or monitoring tools) now get extra context about which peer is involved in each transaction. The change includes a backward-compatibility shim that fills in a dummy counterparty ID when loading older serialized data and then overwrites it once the real value is read.

Security candidateAdd `counterparty_node_id` to `TrackedSpendableOutput`by Elias Rohrer · da9ddd2f · Feb 6, 2026 · 2 filesMessage 63 · AdequateInformational 18Details
Commit message · Elias Rohrer

Add `counterparty_node_id` to `TrackedSpendableOutput`

This adds an optional `counterparty_node_id` field to
`TrackedSpendableOutput` and updates the `track_spendable_outputs`
method signatures on both `OutputSweeper` and `OutputSweeperSync` to
accept this new parameter.

The field uses TLV type 3 (odd) for backwards compatibility. When
reading outputs tracked with LDK 0.2 and prior, this field will be
`None`.

Co-Authored-By: HAL 9000
Signed-off-by: Elias Rohrer <dev@tnull.de>

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Informational 18/100

This commit is a routine API and data-model enhancement. It adds an optional 'counterparty_node_id' field to the internal record that tracks spendable Lightning outputs, and threads that value through the sweeper methods. The field is optional and backward-compatible, so older stored records still load. There is no indication this fixes a security bug or introduces a vulnerability.

AI review queuedAdd `counterparty_node_id` to `Event::SpendableOutputs`by Elias Rohrer · 830e1b35 · Feb 6, 2026 · 7 filesMessage 73 · AdequateInformational 15Details
Commit message · Elias Rohrer

Add `counterparty_node_id` to `Event::SpendableOutputs`

This adds an optional `counterparty_node_id` field to the
`SpendableOutputs` event, providing users with information about which
channel counterparty the spendable outputs belong to.

The field uses TLV type 3 (odd) for backwards compatibility, meaning
older versions will safely ignore it during deserialization. When
reading events serialized by older LDK versions, this field will be
`None`.

Co-Authored-By: HAL 9000
Signed-off-by: Elias Rohrer <dev@tnull.de>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100

This commit adds an optional extra piece of information—the counterparty's node ID—to an existing event that tells users when they have spendable on-chain outputs. It is a backward-compatible API enhancement using an odd TLV type, so older versions ignore the new field. There is no security fix or vulnerability here.

Lower-priorityfuzz: assert no stuck payments in chanmon_consistencyby Joost Jager · 0a6b6d4c · Feb 6, 2026 · 1 fileMessage 83 · StrongInformational 12Details
Commit message · Joost Jager

fuzz: assert no stuck payments in chanmon_consistency

After settling all state at 0xff, verify that pending_payments is empty
for all nodes. If payments remain stuck indefinitely, that indicates a
bug in payment resolution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 12/100

This commit adds a new safety check inside a fuzz test, not a fix to production code. After simulating many random payment scenarios, the test now verifies that no simulated payments remain unresolved. It does not change how real Lightning payments are handled, nor does it patch any known bug. It is a test-hardening change that makes the fuzzer more likely to catch future bugs.

Lower-priorityfuzz: add MPP payment support to chanmon_consistencyby Joost Jager · 61caa03a · Feb 6, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Joost Jager

fuzz: add MPP payment support to chanmon_consistency

Add multi-path payment (MPP) fuzzing commands that split payments across
multiple channels:

- send_mpp_payment: direct MPP from source to dest using multiple channels
- send_mpp_hop_payment: MPP via intermediate node with multiple channels
on either or both hops

New fuzz commands:
- 0x70: direct MPP 0->1 (uses all 3 A-B channels)
- 0x71: MPP 0->1->2, multi channels on first hop (A-B)
- 0x72: MPP 0->1->2, multi channels on both hops (A-B and B-C)
- 0x73: MPP 0->1->2, multi channels on second hop (B-C)
- 0x74: single-channel MPP 0->1 (all parts over one channel)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

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

This commit only adds new fuzz-testing commands for multi-path Lightning payments. It does not change production code, network behavior, or fix any bug. There is no security issue in the change itself.

Lower-priorityfuzz: expand chanmon_consistency to 6 channels (3 per peer pair)by Joost Jager · 24c492dd · Feb 6, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · Joost Jager

fuzz: expand chanmon_consistency to 6 channels (3 per peer pair)

This expands the channel monitor consistency fuzz test from 2 channels
to 6 channels (3 between A-B and 3 between B-C), enabling future MPP
payment testing.

Changes:
- Extract `connect_peers!` macro from `make_channel!` to avoid duplicate
peer connections
- Create channel arrays `chan_ab_ids[3]` and `chan_bc_ids[3]`
- Store SCIDs in `chan_ab_scids[3]` and `chan_bc_scids[3]`
- Use funding transaction versions 1-6 to avoid txid collisions under
fuzz hashing (which XORs all bytes to a single byte, causing versions
0-5 to collide between A-B and B-C channel pairs)
- Update `test_return!` assertions to expect 3/6/3 channels

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

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
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit only expands an internal fuzz test (a randomized testing harness) from 2 channels to 6 channels. It does not change production code, network behavior, or fix any security issue. The changes are purely about test infrastructure: reusing a peer-connection macro, creating arrays of channel IDs, and using different Bitcoin transaction version numbers so the fuzzer's simplified hash function does not produce accidental collisions. There is no vulnerability here.

Lower-priorityLet Claude run per-crate/feature testsby Elias Rohrer · 924f77f3 · Feb 6, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Elias Rohrer

Let Claude run per-crate/feature tests

Previously, we instructed Claude to always run `./ci/ci-tests.sh` which
doesn't seem to work well in practice, as he seems to also employ some
kind of timeout, potentially leading to him getting stuck.

Here we update `CLAUDE.md` accordingly, having him only run `cargo test`

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
documentation-only discount
AI analysis · Informational 15/100

This commit only updates internal documentation (CLAUDE.md) that tells an AI coding assistant how to run tests. It changes the recommended test command from a long CI script to a shorter cargo test command. There is no code change, no security fix, and no security relevance.

Lower-priorityHold in-flight monitor updates until background event processingby Wilmer Paulino · 7e842685 · Feb 6, 2026 · 2 filesMessage 83 · StrongModerate 57Details
Commit message · Wilmer Paulino

Hold in-flight monitor updates until background event processing

We previously assumed background events would eventually be processed
prior to another `ChannelManager` write, so we would immediately remove
all in-flight monitor updates that completed since the last
`ChannelManager` serialization. This isn't always the case, so we now
keep them all around until we're ready to handle them, i.e., when
`process_background_events` is called.

This was discovered while fuzzing `chanmon_consistency_target` on the
main branch with some changes that allow it to connect blocks. It was
triggered by reloading the `ChannelManager` after a monitor update
completion for an outgoing HTLC, calling
`ChannelManager::best_block_updated`, and reloading the `ChannelManager`
once again. A test is included that provides a minimal reproduction of
this case.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Moderate 57/100

This patch fixes a bug in the Lightning Dev Kit's channel manager where completed channel monitor updates could be dropped during reloads before their follow-up actions were processed. If a ChannelManager was saved, a monitor update finished, and then the ChannelManager was reloaded and saved again without background events being processed, the channel could get stuck and never resume normal operation. The fix holds onto completed updates until the background event processor can handle them, and includes a regression test.

AI review queuedRustfmt ChannelManager::process_background_eventsby Wilmer Paulino · f128b850 · Feb 6, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Wilmer Paulino

Rustfmt ChannelManager::process_background_events

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

This commit is purely a code-formatting cleanup. It removes a `#[rustfmt::skip]` directive and lets Rustfmt reformat a single function in the Lightning channel manager. No behavior, logic, or security properties of the code change.

Security candidateMake get_latest_mon_update_id a helper on TestChainMonitorby Wilmer Paulino · 60b5d66e · Feb 6, 2026 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · Wilmer Paulino

Make get_latest_mon_update_id a helper on TestChainMonitor

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
boot or update path
AI analysis · Informational 15/100

This commit is a simple code cleanup in the project's test utilities. It moves a small helper function that reads the latest monitor update ID from one test file into a shared test helper struct, so other tests can call it more cleanly. There is no change to production code, no security fix, and no behavior change.

Security candidateRename test default channel configby elnosh · 306eea72 · Feb 5, 2026 · 18 filesMessage 78 · AdequateInformational 15Details
Commit message · elnosh

Rename test default channel config

Now that anchor channels are the default,
rename `test_default_anchors_channel_config` to
`test_default_channel_config` and the
previous default to legacy.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
boot or update path
AI analysis · Informational 15/100

This commit is a pure test-code refactoring. It renames the default test channel configuration because anchor channels became the production default, and updates many tests to explicitly use a new 'legacy' configuration where they previously relied on the old default. There is no change to production code, no bug fix, and no security-relevant behavior change.

Lower-priorityDefault to anchor channelsby elnosh · aebcd1f7 · Feb 5, 2026 · 9 filesMessage 50 · ThinLow 42Details
Commit message · elnosh

Default to anchor channels

Set `negotiate_anchors_zero_fee_htlc_tx` default
to true.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Low 42/100

This commit changes the default setting so that new Lightning channels will use 'anchor outputs' whenever possible. Anchor outputs are a safer, more modern channel type, but they require the user to keep some on-chain bitcoin available to pay fees during an emergency force-close. To make sure users notice this new responsibility, the library now also forces every inbound channel request to be manually accepted. The change is a deliberate policy update, not a hidden bug, but it could surprise users who are not prepared to maintain the extra on-chain reserve.

Security candidateRemove automatic channel acceptanceby elnosh · cad035db · Feb 5, 2026 · 26 filesMessage 58 · ThinLow 36Details
Commit message · elnosh

Remove automatic channel acceptance

Removes the `manually_accept_inbound_channels` config
option. In upcoming commit we will default to anchor
channels which requires users checking if they have
enough onchain funds to cover fees in case of a force
close. Hence, we move to always require users to
manually accept inbound channels.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathboot or update path
AI analysis · Low 36/100

This commit removes the automatic acceptance of incoming Lightning channels in the LDK library. Previously, users could set a flag to automatically accept inbound channel requests. Now, every inbound channel request must be explicitly approved by the user through an OpenChannelRequest event. This is a deliberate design change to ensure users verify they have enough on-chain funds to cover fees, especially with upcoming anchor channel defaults. It is not a fix for an active vulnerability, but it prevents accidental or unsafe channel acceptance.

Lower-priorityFix off-by-one for unfunded channel peersby elnosh · b6bd3866 · Feb 5, 2026 · 2 filesMessage 68 · AdequateModerate 52Details
Commit message · elnosh

Fix off-by-one for unfunded channel peers

When accepting channels manually, it would
fail if the # of peers without funded channels
was == `MAX_UNFUNDED_CHANNEL_PEERS`, however,
it should fail if the # of peers > `MAX_UNFUNDED_CHANNEL_PEERS`.

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

This commit fixes a small boundary error in how Lightning Dev Kit counts peers that have unfunded channels. Previously, the software rejected new channel requests one peer too early, meaning legitimate users could be blocked from opening a channel when they were exactly at the configured limit. The fix changes the comparison from 'greater than or equal to' to 'greater than' the limit, restoring the intended behavior.