LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1495 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 queue742AI analyses
74commits · 30 days
206commits · 60 days
661commits · 180 days
1489commits · 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
358Strong · 80–100
789Adequate · 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 Rohrer1531569667
Matt Corallo35847160373
Jeffrey Czyz1774190168
Leo Nash1161373162
Valentine Wallace1361029169
Vincenzo Palazzo10210184
Wilmer Paulino1493990069
Joost Jager16224108069
elnosh301321056
shaavan2267069
Carla Kirk-Cohen78331068
benthecarman1839071
Analysis record

Published AI watches

Last scanned 47 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 17 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

fuzz: allow empty-channel force close with in-flight payments

This commit changes a fuzz-testing harness, not the production Lightning node code. It loosens a test rule so the fuzzer can simulate force-closing a channel that has no pending payments of its own, even if other channels in the test still…

Fuzz harness behavior change onlyNo modifications to production consensus, cryptography, or networking codeNo privilege boundary crossed
dbb12502by Joost Jager+32−71 file
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-priorityRestrict CI build matrix to Linux+MSRV for PRsby Joost Jager · 16856613 · Feb 11, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Joost Jager

Restrict CI build matrix to Linux+MSRV for PRs

Only run the full build matrix (Linux/Windows/macOS × stable/beta/MSRV)
on pushes to main. PR and non-main push builds now only run Linux with
the MSRV toolchain (1.75.0), which is the most important gate for
catching issues.

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

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
Lower-prioritySplit method to reconstruct pending HTLCs into twoby Valentine Wallace · 07b3deff · Feb 10, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Valentine Wallace

Split method to reconstruct pending HTLCs into two

In the next commit, we want to dedup fields between the
InboundUpdateAdd::Forwarded's HTLCPreviousHopData and the outer
InboundHTLCOutput/Channel structs, since many fields are duplicated in both
places at the moment. As part of doing this cleanly, we first refactor the
method that retrieves these InboundUpdateAdds for reconstructing the set of
pending HTLCs during ChannelManager deconstruction.

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
Lower-priorityDedup data in InboundUpdateAdd::Forwarded::hop_databy Valentine Wallace · d3e9cd01 · Feb 10, 2026 · 2 filesMessage 85 · StrongTriage 0Details
Commit message · Valentine Wallace

Dedup data in InboundUpdateAdd::Forwarded::hop_data

Previously, the InboundUpdateAdd::Forwarded enum variant contained an
HTLCPreviousHopData, which had a lot of fields that were redundant with the
outer InboundHTLCOutput/Channel structs. Here we dedup those fields, which is
important because the pending InboundUpdateAdds are persisted whenever the
ChannelManager is persisted.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Security candidateTrivial: use full path in test macrosby Valentine Wallace · eb31aeb1 · Feb 10, 2026 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · Valentine Wallace

Trivial: use full path in test macros

Useful when using these macros in lightning-tests/upgrade_downgrade_tests

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
update trust
AI analysis · Informational 15/100

This is a minor code cleanup change inside test helper macros. It replaces short internal names like `_reload_node` with fully qualified paths such as `$crate::ln::functional_test_utils::_reload_node`. This only affects how test macros resolve symbols when reused in other test crates; it does not change runtime behavior, user-facing APIs, or any security-sensitive logic.

Lower-priorityRemove explicit usage of test_default_channel_configby elnosh · 4e32d105 · Feb 10, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · elnosh

Remove explicit usage of test_default_channel_config

test_default_channel_config is the default
now so it does not need to be set explicitly
in some of the tests.

Removes unnecessary extra None config.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI review queuedUse handle_and_accept_open_channel in async_signer testby elnosh · 8edfc915 · Feb 10, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · elnosh

Use handle_and_accept_open_channel in async_signer test

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a minor cleanup of an internal test file. It replaces a small block of test code with an existing helper function when testing the non-zero-conf path. There is no change to production code, no security fix, and no user-facing behavior change.

AI review queuedUpdate changelog and remove manually_accept referencesby elnosh · db2a7eb7 · Feb 10, 2026 · 3 filesMessage 50 · ThinInformational 15Details
Commit message · elnosh

Update changelog and remove manually_accept references

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This is a small documentation and test cleanup commit. It removes leftover references to a 'manually_accept_inbound_channels' configuration option from two test files and a pending changelog entry. There is no code behavior change and no security fix or vulnerability present in the diff.

AI review queuedDrop `proptest`s in `lightning-liquidity`by Matt Corallo · bd358f34 · Feb 10, 2026 · 5 filesMessage 90 · StrongLow 28Details
Commit message · Matt Corallo

Drop `proptest`s in `lightning-liquidity`

`proptest`'s transitive dependency tree has always been somewhat
large, but one of them (`rusty-fork`'s `tempfile` dependency) just
went ahead with a bump of their `rand` dependency, breaking our
MSRV yet again.

Because we don't actually use `proptest` for anything interesting,
the simplest solution is to simply drop it, which we do here. Note
that we'll likely transition the LSPS5 URL type to simply use the
`bitreq` URL type over the next few days anyway, so there's not
much reason to care about its continued test coverage.

Further, in writing this commit it was discovered that our tests in
`lsps2/utils.rs` were actually broken on the vast majority of
inputs, but proptest wasn't testing with any interesting test cases
at all, causing it to be missed entirely!

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
Why it was queued
second-pass: broader security terminology
AI analysis · Low 28/100

This commit removes the proptest testing library from the lightning-liquidity Rust crate because one of proptest's indirect dependencies bumped its own minimum Rust version, breaking the project's MSRV (Minimum Supported Rust Version) policy. While removing the tests, the author also fixed a subtle rounding bug in the fee calculation helper: it now uses Rust's built-in div_ceil instead of the old add-999999-then-divide-by-1000000 trick. The commit also deletes a large block of URL parsing tests. There is no direct evidence this is a security fix, but the fee rounding change is a correctness improvement and the commit message explicitly notes that the previous tests were broken on most inputs.

Lower-priorityBump `lightning-types` crate version to fix semver testsby Matt Corallo · 4deb2f7d · Feb 10, 2026 · 5 filesMessage 83 · StrongTriage 0Details
Commit message · Matt Corallo

Bump `lightning-types` crate version to fix semver tests

5427b0de7e93ce4ccf63c79de756e0da49e33d0b changed the
`lightning-types` API but we forgot to bump the crate version to
make semver tests pass.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-priorityPass the `addr` field of `tor_connect_outbound` to connection setupby Leo Nash · 6f315f23 · Feb 9, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Leo Nash

Pass the `addr` field of `tor_connect_outbound` to connection setup

When `setup_outbound` was used to setup a connection proxied over Tor,
it previously set the remote address of the peer to the address of the
Tor proxy.

This address of the Tor proxy was assigned to the
`PeerDetails::socket_address` for that peer in
`PeerManager::list_peers`, and if it was not a private IPv4 or IPv6
address, it was also reported to the peer in our init message.

This commit refactors `tor_connect_outbound` to pass its own peer
address parameter directly to the connection setup code.

This peer address will now appear in `PeerManager::list_peers` for
outbound Tor connections made using `tor_connect_outbound`, and will be
reported to the peer in our init message if it is not a private IPv4 or
IPv6 address.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedUse `DirEntry::file_type` rather than `metadata...` in `list`by Matt Corallo · 36617833 · Feb 9, 2026 · 1 fileMessage 81 · StrongLow 31Details
Commit message · Matt Corallo

Use `DirEntry::file_type` rather than `metadata...` in `list`

In the discussions at #3799 it was noted that `DirEntry::file_type`
will often use cached information rather than making a fresh
syscall, fixing the `list` race condition where we lose files while
iterating the directory for some filesystems on some Unix
platforms.

For some reason, that fix didn't make it into the merged PR, and we
rather stuck with `DirEntry::metadata()` which *always* does a
fresh syscall and always exhibits the problematic behavior. Here we
simply swap for `DirEntry::file_type` which at least fixes the
issue for "some filesome filesystems (among them: Btrfs, ext2,
ext3, and ext4)" (per `readdir(3)`).

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
AI analysis · Low 31/100

This commit fixes a subtle file-listing bug in the Lightning payment channel data storage code. When listing saved data, the program used to ask the filesystem for fresh details about each file, which on common Linux filesystems can briefly make a file appear missing if it is being changed at the same time. The change uses cached information already returned by the directory scan, avoiding that extra check and the race condition. It is a reliability fix rather than a direct exploit, but in the worst case it could cause the node to fail to load channel data it expected to find.

Security candidateAdd a read closure to the `legacy` TLV variantby Jeffrey Czyz · e71ad81a · Feb 7, 2026 · 5 filesMessage 73 · AdequateInformational 18Details
Commit message · Jeffrey Czyz

Add a read closure to the `legacy` TLV variant

Update the `legacy` TLV read/write variant signature from
`(legacy, $fieldty, $write)` to `(legacy, $fieldty, $read, $write)`,
adding a read closure parameter matching the `custom` variant's
signature.

The read closure is applied in `_check_missing_tlv!` after all TLV
fields are read but before `static_value` fields consume legacy
values. This preserves backwards compatibility with `static_value` and
`default_value` expressions that reference legacy field variables as
`Option<$fieldty>` during TLV reading.

The read closure signature differs from `custom`:
`FnOnce(Option<&$fieldty>) -> Result<(), DecodeError>`. All existing
usage sites return `Ok(())` as their read closure (no-op).

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

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Informational 18/100

This commit is a small, internal refactoring of a Rust serialization macro used in the Lightning Dev Kit. It adds an optional read-time callback to the 'legacy' type-length-value (TLV) field variant so future code can validate or reject decoded legacy values. All existing usage sites pass a no-op callback that always succeeds, so the change does not alter current behavior. It is a defensive/extensibility improvement, not a fix for an active security bug.

Security candidateFix thread starvation in test_single_channel_multiple_mppby Jeffrey Czyz · 1829dc9f · Feb 6, 2026 · 1 fileMessage 83 · StrongInformational 16Details
Commit message · Jeffrey Czyz

Fix thread starvation in test_single_channel_multiple_mpp

The busy-wait loop polling for PaymentClaimed events had no yield,
causing it to continuously acquire ChannelManager locks via
get_and_clear_pending_events(). This could starve the claim_funds
thread of lock access, preventing it from ever queuing the event.
Add a yield_now() call matching the pattern used by the other two
spin loops in this test.

Co-Authored-By: Claude Opus 4.6 <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
boot or update path
AI analysis · Informational 16/100

This is a fix inside a single test function. The test had a tight loop that repeatedly checked for events without ever pausing, which could monopolize a lock and prevent another thread in the same test from making progress. The change adds a brief yield so the other thread can run. It only affects test code, not production code, and has no security impact on real users.

Lower-priorityFix docs on ChannelMonitor::payment_preimagesby Valentine Wallace · 3b75eee9 · Feb 6, 2026 · 1 fileMessage 45 · ThinTriage 0Details
Commit message · Valentine Wallace

Fix docs on ChannelMonitor::payment_preimages

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Lower-prioritySupport deleting legacy forward map persistence in 0.5by Valentine Wallace · 0ca79af5 · Feb 6, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
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
Lower-priorityCheck pruned HTLCs were resolved on startupby Valentine Wallace · 979d5648 · Feb 6, 2026 · 4 filesMessage 68 · AdequateTriage 0Details
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
Lower-priorityTrivially refactor reload_node macroby Valentine Wallace · 30dbf40e · Feb 6, 2026 · 1 fileMessage 50 · ThinTriage 0Details
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
Lower-priorityDeterministic reconstruct_manager option in testsby Valentine Wallace · d435e5bb · Feb 6, 2026 · 3 filesMessage 90 · StrongTriage 0Details
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
Lower-priorityPrune inbound HTLC onions once forwardedby Valentine Wallace · 3cc64f04 · Feb 6, 2026 · 3 filesMessage 68 · AdequateTriage 0Details
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
Lower-priorityMark legacy pre-0.3 inbound htlcs on persistby Valentine Wallace · a5c8bcee · Feb 6, 2026 · 2 filesMessage 80 · StrongTriage 0Details
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
Lower-priorityTrivial: document some fields on MonitorRestoreUpdatesby Valentine Wallace · a36c85a9 · Feb 6, 2026 · 1 fileMessage 50 · ThinTriage 0Details
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
Lower-priorityDon't double-forward inbounds resolved in holding cellby Valentine Wallace · 37375ca3 · Feb 6, 2026 · 3 filesMessage 73 · AdequateTriage 0Details
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
Lower-prioritySimplify channel_closed check on manager readby Valentine Wallace · 7304cc9b · Feb 6, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
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
Lower-priorityDe-dup decode_htlcs from monitor only if channel is closedby Valentine Wallace · 56b9f417 · Feb 6, 2026 · 4 filesMessage 73 · AdequateTriage 0Details
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
Lower-priorityfix: test_payment_path_scoring failingby okekefrancis112 · 1d90fce7 · Feb 6, 2026 · 1 fileMessage 47 · ThinTriage 0Details
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