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 15 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-priorityRemove spurious debug assertion added in 0.2by Matt Corallo · b524b9bb · Jan 14, 2026 · 3 filesMessage 78 · AdequateInformational 22Details
Commit message · Matt Corallo

Remove spurious debug assertion added in 0.2

In 20877b3e229ffedee9483e2b021fdcb98c7a378a we added a
`debug_assert`ion to validate that if we call
`maybe_free_holding_cell_htlcs` and it doesn't manage to generate
a new commitment (implying `!can_generate_new_commitment()`) that
we don't have any HTLCs to fail, but there was no reason for that,
and its reachable.

Here we simply remove the spurious debug assertion and add a test
that exercises it.

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

This commit removes a harmless debug-only assertion in the Lightning Dev Kit's channel handling code. The assertion could be triggered during normal operation when an HTLC (a conditional Bitcoin payment) in a 'holding cell' couldn't be added to a channel due to a dust-exposure limit. Debug assertions only fire in test builds, so production nodes were never affected. The commit also adds a regression test to exercise this edge case.

Lower-priorityRemove handle_new_monitor_update_locked_actions_handled_by_caller macroby Joost Jager · a9656dd4 · Jan 13, 2026 · 1 fileMessage 63 · AdequateInformational 15Details
Commit message · Joost Jager

Remove handle_new_monitor_update_locked_actions_handled_by_caller macro

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit is a straightforward code cleanup: it removes an internal Rust macro and replaces its two uses with direct calls to the underlying function. There is no indication of a bug fix, behavior change, or security issue.

Lower-priorityRemove handle_post_close_monitor_update macroby Joost Jager · d0dc4f0a · Jan 13, 2026 · 1 fileMessage 66 · AdequateInformational 24Details
Commit message · Joost Jager

Remove handle_post_close_monitor_update macro

Convert the handle_post_close_monitor_update! macro to a method that
returns optional completion actions, allowing callers to release locks
before processing the completion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

66/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 24/100

This commit refactors a Rust macro into a regular method in the Lightning Dev Kit's channel manager. The stated goal is to let callers release internal locks before running follow-up completion actions. The change itself is a code-quality/locking refactor; there is no direct evidence in the commit message or diff that it fixes a known security vulnerability or that any exploit exists.

Lower-priorityRemove handle_new_monitor_update macroby Joost Jager · a160bbfd · Jan 13, 2026 · 1 fileMessage 66 · AdequateInformational 15Details
Commit message · Joost Jager

Remove handle_new_monitor_update macro

Convert the handle_new_monitor_update macro to methods and update all
call sites. Adds handle_new_monitor_update and
handle_new_monitor_update_with_status methods that return completion
data for processing after locks are released.

Also removes handle_monitor_update_completion macro as it's no longer
needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

66/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit is a straightforward internal code cleanup in the Lightning Dev Kit's channel manager. It replaces a Rust macro used to handle channel monitor updates with two regular methods, and updates all places that called the macro. There is no change to user-facing behavior, protocol logic, or security-sensitive operations; it is purely a refactoring to make the code easier to maintain and to satisfy Rust's borrow checker.

Lower-priorityInline handle_monitor_update_completion! macroby Joost Jager · d89a1af5 · Jan 13, 2026 · 1 fileMessage 66 · AdequateInformational 15Details
Commit message · Joost Jager

Inline handle_monitor_update_completion! macro

Expand the macro at its three call sites and remove the macro
definition, as it no longer provides significant abstraction benefit
after refactoring the core logic into helper methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

66/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit is a simple code cleanup: it takes a small helper macro used in three places and replaces each use with the macro's actual contents. The behavior of the program is unchanged; only the internal structure is simplified. There is no security issue here.

Lower-priorityRemove handle_initial_monitor macroby Joost Jager · d0cc60f8 · Jan 13, 2026 · 1 fileMessage 66 · AdequateInformational 12Details
Commit message · Joost Jager

Remove handle_initial_monitor macro

Convert the handle_initial_monitor! macro to a method that returns
optional completion data, allowing callers to release locks before
processing the completion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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

66/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 12/100

This commit is a code cleanup: it replaces a Rust macro with a regular method. The behavior is unchanged, but the new method lets callers explicitly drop locks before running follow-up work. There is no indication of a security bug being fixed.

Lower-priorityRefactor monitor update completion into helper methodsby Joost Jager · b540cd6a · Jan 13, 2026 · 1 fileMessage 73 · AdequateInformational 12Details
Commit message · Joost Jager

Refactor monitor update completion into helper methods

Extract the monitor update completion logic from the
handle_monitor_update_completion macro into two new helper methods:

- try_resume_channel_post_monitor_update: Attempts to resume a channel
after a monitor update completes while locks are still held

- handle_post_monitor_update_chan_resume: Completes channel resumption
after locks have been released

This refactoring improves code organization by separating the locked
phase (which may resume the channel) from the unlocked phase (which
processes remaining work). The macro is now a thin wrapper that calls
these two methods with proper lock management.

The new PostMonitorUpdateChanResume enum captures the result of the
resume attempt, containing any remaining work to process after locks
are released.

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

This commit is a code cleanup: it takes a large block of logic embedded in a macro and moves it into two ordinary helper methods, with a new enum carrying the intermediate result between them. There is no change to what the code actually does—only how it is organized. The commit message and diff both describe this as a pure refactor.

Lower-priorityConvert internal update handling fns to methodsby Joost Jager · b6b622f0 · Jan 13, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Joost Jager

Convert internal update handling fns to methods

Pure code move except for the context logger which is now instantiated
when needed in update_channel_monitor.

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

This commit is a straightforward internal code reorganization in the Lightning Dev Kit's channel manager. It converts two standalone helper functions into methods on the ChannelManager struct and moves them to a different location in the same file. The only functional change is that a logging context object is now created inside the method when needed, rather than being passed in by callers. There is no user-visible behavior change and no security fix or vulnerability introduced.

Lower-priorityUpdate outdated comment due to var renamesby Valentine Wallace · 5a4912c1 · Jan 12, 2026 · 1 fileMessage 57 · ThinInformational 15Details
Commit message · Valentine Wallace

Update outdated comment due to var renames

57/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Explains rationale or failure mode! No meaningful explanatory body
AI analysis · Informational 15/100

This is a documentation-only change that updates an internal code comment to match renamed variable names. No code behavior was altered, and there is no security impact.

Lower-priorityPrefer legacy forward maps on manager readby Valentine Wallace · e76159ac · Jan 12, 2026 · 2 filesMessage 90 · StrongLow 30Details
Commit message · Valentine Wallace

Prefer legacy forward maps on manager read

We are working on removing the requirement of regularly persisting the
ChannelManager, and as a result began reconstructing the manager's forwards
maps from Channel data on startup in a recent PR, see
cb398f6b761edde6b45fcda93a01c564cb49a13c and parent commits.

At the time, we implemented ChannelManager::read to prefer to use the newly
reconstructed maps, partly to ensure we have test coverage of the new maps'
usage. This resulted in a lot of code that would deduplicate HTLCs that were
present in the old maps to avoid redundant HTLC handling/duplicate forwards,
adding extra complexity.

Instead, always use the old maps in prod, but randomly use the newly
reconstructed maps in testing, to exercise the new codepaths (see
reconstruct_manager_from_monitors in ChannelManager::read).

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 · Low 30/100

This commit changes how the Lightning Dev Kit (LDK) node restores its record of in-flight payment forwards after a restart. Previously, the code preferred newly reconstructed forward maps built from channel monitor data, which required complex de-duplication logic to avoid processing the same HTLC twice. The commit switches production code to always use the older, persisted forward maps instead, while keeping the new reconstruction path active only in tests (randomly or via an environment variable). It also adds a small guard to avoid pushing duplicate intercept events if a restart re-processes an already-handled intercept forward.

Lower-priorityOptimize dedup_decode_update_add_htlcsby Valentine Wallace · 03882bda · Jan 12, 2026 · 1 fileMessage 40 · ThinInformational 12Details
Commit message · Valentine Wallace

Optimize dedup_decode_update_add_htlcs

No need to iterate through all entries in the map, we can instead pull out the
specific entry that we want.

40/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body! Too few words to establish purpose
AI analysis · Informational 12/100

This commit is a straightforward performance optimization in the Lightning Dev Kit's channel manager. It changes how pending payment packets (HTLCs) are looked up and removed from a tracking map, replacing a full scan of all entries with a direct lookup by channel identifier. There is no security-relevant change visible in the diff.

Lower-priorityDon't double-forward HTLCs in rebuilt update_adds mapby Valentine Wallace · 55f89112 · Jan 12, 2026 · 2 filesMessage 85 · StrongModerate 68Details
Commit message · Valentine Wallace

Don't double-forward HTLCs in rebuilt update_adds map

We recently began 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 to the outbound
edge (we pruned correctly if the outbound edge was a closed channel, but not
otherwise). Here we fix this bug that would have caused us to double-forward
inbound HTLC forwards.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Moderate 68/100

This commit fixes a bug in the Lightning Dev Kit where, after restarting a forwarding node, an already-forwarded payment could be forwarded a second time. The bug only affected the node that restarts, and could lead to duplicate HTLCs being sent downstream, potentially causing funds to be locked or payment failures. The fix prunes already-forwarded HTLCs from a rebuilt in-memory map during startup.

Lower-priorityMove is_chan_closed check into loopby Valentine Wallace · 2a1273be · Jan 12, 2026 · 1 fileMessage 60 · AdequateInformational 11Details
Commit message · Valentine Wallace

Move is_chan_closed check into loop

Necessary for the next commit and makes it easier to read.

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

This commit is a pure code restructure: it moves an existing `if is_channel_closed` check inside the loops that process HTLCs, rather than wrapping the loops from the outside. The commit message explicitly says it is 'necessary for the next commit and makes it easier to read.' No behavior changes are visible in the diff, and there is no security fix here.

Lower-priorityClarify splicing feature flag requirementsby Leo Nash · 6578b88d · Jan 10, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Leo Nash

Clarify splicing feature flag requirements

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only adds documentation comments to a Rust function. It clarifies which feature flags and conditions are needed to use the splicing feature. No code behavior was changed, so there is no security issue.

Lower-priorityln/test: add test coverage for accountable signal propagationby Carla Kirk-Cohen · 351bd3ce · Jan 9, 2026 · 2 filesMessage 60 · AdequateInformational 12Details
Commit message · Carla Kirk-Cohen

ln/test: add test coverage for accountable signal propagation

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

This commit only adds new test code to verify how an existing 'accountable' flag is forwarded between Lightning nodes. It does not change production logic, so it cannot introduce a new security vulnerability by itself. The tests check that the flag is correctly propagated (or not propagated) across a three-node payment path.

Lower-priorityRemove unnecessary update_add clone on Channel serby Valentine Wallace · 7c97f3c0 · Jan 8, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Valentine Wallace

Remove unnecessary update_add clone on Channel ser

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

This is a small code cleanup that removes an unnecessary clone (duplicate copy) of update_add data when serializing a Lightning channel to bytes. It changes the vector to hold references instead of owned copies, with no functional change to behavior or security.

Lower-priorityln: add accountable signal to OutboundHTLCOutputby Carla Kirk-Cohen · d3b58e3b · Jan 8, 2026 · 1 fileMessage 45 · ThinLow 27Details
Commit message · Carla Kirk-Cohen

ln: add accountable signal to OutboundHTLCOutput

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Low 27/100

This commit adds a new boolean flag called 'accountable' to outbound payment records (HTLCs) in a Lightning Network implementation. It ensures the flag is saved to disk and restored correctly when the node restarts. The change appears to be a data-model fix to support tracking which payments should be held financially accountable, likely as part of a larger feature. There is no direct evidence in the commit that this fixes an active security vulnerability, but incomplete state serialization can lead to incorrect behavior after a restart.

Lower-priorityln: add accountable signal to HTLCUpdateAwaitingACK::AddHTLCby Carla Kirk-Cohen · d084a9da · Jan 8, 2026 · 2 filesMessage 50 · ThinLow 45Details
Commit message · Carla Kirk-Cohen

ln: add accountable signal to HTLCUpdateAwaitingACK::AddHTLC

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

This commit adds a new 'accountable' flag to forwarded Lightning payments that is preserved when an HTLC is queued in a channel's holding cell. The flag appears intended to track whether a downstream node can be held financially responsible if a forwarded payment fails after the upstream side has already been settled. The change itself is a data plumbing patch; it does not contain an obvious active vulnerability, but it is part of a larger accountability mechanism whose security implications depend on how the flag is consumed elsewhere.

Lower-priorityln: add incoming_accountable to PendingHTLCInfoby Carla Kirk-Cohen · 413aa95c · Jan 8, 2026 · 2 filesMessage 80 · StrongLow 26Details
Commit message · Carla Kirk-Cohen

ln: add incoming_accountable to PendingHTLCInfo

Persist as a bool so that we don't need to use Option<bool> when we
will just inevitably unwrap_or(false) the field. This means that we
won't be able to distinguish between an incoming htlc that has no TLV
set, and one that has the TLV set with a false value in it. We accept
this loss of information for the sake of simplicity in the codebase.

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

This commit adds a new boolean flag called incoming_accountable to an internal data structure (PendingHTLCInfo) used when routing Lightning payments. The flag records whether the node is expected to be 'accountable' for resolving an incoming payment on time. It is read from an optional TLV field in the incoming message and defaults to false when not present. The change is a straightforward plumbing/data-model update; it does not by itself fix or introduce a security flaw, but it is part of work that could affect how reputation and payment-timeout penalties are tracked in the future.

Lower-priorityln: add experimental accountable signal to update_add_htlcby Carla Kirk-Cohen · 46aa1cf8 · Jan 8, 2026 · 7 filesMessage 50 · ThinInformational 18Details
Commit message · Carla Kirk-Cohen

ln: add experimental accountable signal to update_add_htlc

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

This commit adds a new experimental flag called 'accountable' to the Lightning update_add_htlc message. The flag is purely informational right now: it is sent and received, but the code does not use it to make any forwarding or security decisions. It is marked experimental and is not treated as authoritative. There is no obvious security vulnerability in the change itself.

Lower-priorityutil: add support for option with custom encodingby Carla Kirk-Cohen · b858b444 · Jan 8, 2026 · 1 fileMessage 45 · ThinInformational 17Details
Commit message · Carla Kirk-Cohen

util: add support for option with custom encoding

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 17/100

This commit adds a missing macro rule in a Rust serialization helper so that optional fields can use a custom byte encoding. It is a feature addition with a regression test; there is no indication it fixes a security vulnerability.

Lower-priorityParallelize `ChannelMonitorUpdate` loadingby Matt Corallo · 6ef22bab · Jan 8, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Matt Corallo

Parallelize `ChannelMonitorUpdate` loading

When reading `ChannelMonitor`s from a `MonitorUpdatingPersister` on
startup, we have to make sure to load any `ChannelMonitorUpdate`s
and re-apply them as well. Now that we know which
`ChannelMonitorUpdate`s to load from `list`ing the entries from the
`KVStore` we can parallelize the reads themselves, which we do
here.

Now, loading all `ChannelMonitor`s from an async `KVStore` requires
only three full RTTs - one to list the set of `ChannelMonitor`s,
one to both fetch the `ChanelMonitor` and list the set of
`ChannelMonitorUpdate`s, and one to fetch all the
`ChannelMonitorUpdate`s (with the last one skipped when there are
no `ChannelMonitorUpdate`s to read).

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

This commit is a performance optimization, not a security fix. It changes how Lightning node data is loaded from storage when the program starts up. Previously, certain update records were read one at a time; now they are read in parallel. The commit message and code changes only describe speed improvements and reducing network round trips. There is no indication of a vulnerability being fixed.

AI review queuedAdd an option to deserialize monitors in parallel in async loadby Matt Corallo · 18f7a8f5 · Jan 8, 2026 · 1 fileMessage 85 · StrongInformational 15Details
Commit message · Matt Corallo

Add an option to deserialize monitors in parallel in async load

`MonitorUpdatingPersister::read_all_channel_monitors_with_updates`
was made to do the IO operations in parallel in a previous commit,
however in practice this doesn't provide material parallelism for
large routing nodes. Because deserializing `ChannelMonitor`s is the
bulk of the work (when IO operations are sufficiently fast), we end
up blocked in single-threaded work nearly the entire time.

Here, we add an alternative option - a new
`read_all_channel_monitors_with_updates_parallel` method which uses
the `FutureSpawner` to cause the deserialization operations to
proceed in parallel.

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 · Informational 15/100

This commit adds a new optional method that lets a Lightning node read its saved channel monitors in parallel, including the CPU-heavy step of turning stored data back into usable objects. It is a performance improvement, not a security fix. The existing single-threaded method remains available and unchanged in behavior.

Lower-priorityAvoid a storage RTT when loading `ChannelMonitor`s without updatesby Matt Corallo · 7471d05d · Jan 8, 2026 · 2 filesMessage 85 · StrongInformational 23Details
Commit message · Matt Corallo

Avoid a storage RTT when loading `ChannelMonitor`s without updates

When reading `ChannelMonitor`s from a `MonitorUpdatingPersister` on
startup, we have to make sure to load any `ChannelMonitorUpdate`s
and re-apply them as well. For users of async persistence who don't
have any `ChannelMonitorUpdate`s (e.g. because they set
`maximum_pending_updates` to 0 or, in the future, we avoid
persisting updates for small `ChannelMonitor`s), this means two
round-trips to the storage backend, one to load the
`ChannelMonitor` and one to try to read the next
`ChannelMonitorUpdate` only to have it fail.

Instead, here, we use `KVStore::list` to fetch the list of stored
`ChannelMonitorUpdate`s, which for async `KVStore` users allows us
to parallelize the list of update fetching and the
`ChannelMonitor` loading itself. Then we know exactly when to stop
reading `ChannelMonitorUpdate`s, including reading none if there
are none to read. This also avoids relying on `KVStore::read`
correctly returning `NotFound` in order to correctly discover when
to stop reading `ChannelMonitorUpdate`s.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 23/100

This commit is a performance and robustness improvement, not a fix for an active security bug. It changes how Lightning channel monitor data is loaded on startup so that the code lists available update files first, rather than repeatedly trying to read update files until it gets a 'not found' error. This removes one round-trip to storage for users with no pending updates and makes the loader no longer depend on storage backends correctly returning a specific 'not found' error. The old behavior could, in theory, cause a node to fail to start or misload state if a storage backend returned the wrong error kind, but the commit itself does not describe any such failure being exploited.

Lower-priorityAllow `FutureSpawner` to return the result of the spawned futureby Matt Corallo · b4eab2c7 · Jan 8, 2026 · 3 filesMessage 73 · AdequateInformational 18Details
Commit message · Matt Corallo

Allow `FutureSpawner` to return the result of the spawned future

`tokio::spawn` can be use both to spawn a forever-running
background task or to spawn a task which gets `poll`ed
independently and eventually returns a result which the callsite
wants.

In LDK, we have only ever needed the first, and thus didn't bother
defining a return type for `FutureSpawner::spawn`. However, in the
next commit we'll start using `FutureSpawner` in a context where we
actually do want the spawned future's result. Thus, here, we add a
result output to `FutureSpawner::spawn`, mirroring the
`tokio::spawn` API.

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

This commit is a routine internal API change. It updates the FutureSpawner trait so that spawning a background future can return the future's result, similar to tokio::spawn. It does not fix a security bug and does not introduce obvious security flaws; it is preparation for a later feature.