LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1497 commits in the local evidence base

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

225security candidates209second-pass queue1479AI analyses
64commits · 30 days
198commits · 60 days
656commits · 180 days
1472commits · 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 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 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-priorityMove `test_peer_storage` to `reload_tests`by Matt Corallo · c6103e6e · Aug 19, 2025 · 2 filesMessage 60 · AdequateInformational 15Details
Commit message · Matt Corallo

Move `test_peer_storage` to `reload_tests`

In general we shouldn't be adding new tests in `channelmanager.rs`

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit simply moves an existing test function from one file to another within the project's test suite. No production code, behavior, or security properties changed. It is a code-organization cleanup with no security relevance.

Lower-priorityAdd debug assertions on revoked counterparty tx number fetchingby Matt Corallo · 9d9cfe65 · Aug 19, 2025 · 1 fileMessage 73 · AdequateInformational 16Details
Commit message · Matt Corallo

Add debug assertions on revoked counterparty tx number fetching

We actually store the latest counterparty revoked commitment
transaction number in two places in `Channel` - as
`context.cur_counterparty_commitment_transaction_number + 2` and
in `commitment_secrets`.

Here we add a debug assertion that both values are equal.

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

This commit adds an internal consistency check (a debug-only assertion) to make sure two different places storing the same counterparty commitment transaction number agree. It does not change release behavior, fix a known bug, or alter how funds are secured. It is a defensive code-quality improvement.

Lower-priorityRevert fuzz changes in 61bc1e06e75113238501e7ce29e793aa3ba43778by Matt Corallo · 8d86558e · Aug 19, 2025 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Revert fuzz changes in 61bc1e06e75113238501e7ce29e793aa3ba43778

This reverts the changes to `fuzz/src/full_stack.rs` in commit
61bc1e06e75113238501e7ce29e793aa3ba43778 which were spuriously
included after a rebase and ultimately broke the fuzzing test.

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 reverts two accidental changes in a fuzzing test file. The changes were mistakenly included during a previous rebase and caused the fuzzing test to break. The fix restores the original expected test values so the fuzz test passes again. There is no indication this affects real Lightning node behavior or introduces a security vulnerability.

Lower-priorityAllow building Invoice from Bolt11InvoiceDescriptionRefby benthecarman · 9066f628 · Aug 18, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · benthecarman

Allow building Invoice from Bolt11InvoiceDescriptionRef

Small annoyance I found when updating in one of my downstream projects.
Now that there are 2 types of Bolt11InvoiceDescription you can't just
copy one from one invoice to a new one. This makes it so we can again
build an invoice from the ref version.

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

This commit adds a small convenience method to make it easier to copy invoice descriptions from one Lightning invoice to another. It is a routine developer-experience improvement with no apparent security relevance.

Lower-priorityCheck correct commitment number/point in initial commitment_signedby Jeffrey Czyz · c8af714f · Aug 18, 2025 · 1 fileMessage 73 · AdequateModerate 57Details
Commit message · Jeffrey Czyz

Check correct commitment number/point in initial commitment_signed

When splicing a channel, the initial commitment_signed received should
use the same commitment number and point previously received prior to
splicing the channel. Account for this by checking the commitment_signed
against that one instead, which is now stored separately in
FundedChannel.

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

This patch fixes a logic bug in how a Lightning node validates the first commitment signature after a channel splice. Previously, the code checked the new commitment against the wrong commitment number and public key, which could cause the node to reject a valid splice or, in some edge cases, accept an inconsistent state. The fix stores and compares against the commitment number and point that were actually in use before the splice.

Lower-priorityUse correct commitment number/point in initial commitment_signedby Jeffrey Czyz · 87db06ab · Aug 18, 2025 · 1 fileMessage 73 · AdequateModerate 54Details
Commit message · Jeffrey Czyz

Use correct commitment number/point in initial commitment_signed

When splicing a channel, the initial commitment_signed should use the
same commitment number and point previously sent. Account for this by
adjusting these to use the previous commitment number and point, since
the next expected one is stored.

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

This patch fixes a bug in the Lightning Dev Kit's channel-splicing code. When a channel is being spliced, the first new commitment transaction was being built with the wrong commitment number and the wrong counterparty public key (the 'commitment point'). The fix makes the code use the previous commitment number and the previous commitment point instead, matching what the counterparty already expects. Using the wrong values could cause the commitment transaction to be rejected or, in the worst case, lead to an invalid or unenforceable on-chain transaction if a dispute arises.

Security candidateDrop outdated async signing commentby Jeffrey Czyz · 13c81a15 · Aug 18, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Drop outdated async signing comment

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

This commit removes an outdated code comment and adjusts how a future commitment public key is serialized to disk. It is a cleanup/refactoring change with no apparent security relevance.

Lower-priorityStore current_point in HolderCommitmentPointby Jeffrey Czyz · a7ba4dd3 · Aug 18, 2025 · 1 fileMessage 58 · ThinLow 41Details
Commit message · Jeffrey Czyz

Store current_point in HolderCommitmentPoint

When splicing a channel, sending and receiving the initial
commitment_signed message should use the current commitment point
rather then the next one. Store this in HolderCommitmentPoint whenever
it is advanced.

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

This commit fixes a state-tracking bug in the experimental splicing feature of a Lightning Network implementation. Previously, during a splice, the code used the wrong commitment point (the 'next' one instead of the 'current' one) when sending or receiving the first commitment_signed message. The fix stores the current commitment point explicitly and adds guards that prevent splicing until the commitment point has been advanced at least once. It also persists the new field across restarts. The change is defensive and corrects protocol behavior, but it is not a clear-cut critical security patch on its own.

Lower-priorityRename HolderCommitmentPoint::pointby Jeffrey Czyz · 27138ebe · Aug 18, 2025 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Rename HolderCommitmentPoint::point

HolderCommitmentPoint::point represents the next point we expect to
receive. Rename it to next_point to reflect that and similarly rename
transaction_number. The next commit will add the current point, which is
needed in splicing.

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

This commit is a straightforward internal rename of variables and struct fields in the Lightning Dev Kit's channel management code. It changes names like `point` to `next_point` and `transaction_number` to `next_transaction_number` to make the code clearer for an upcoming feature (splicing). No behavior changes, bug fixes, or security fixes are present.

Lower-priorityRename HolderCommitmentPoint::next_pointby Jeffrey Czyz · 8c482939 · Aug 18, 2025 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · Jeffrey Czyz

Rename HolderCommitmentPoint::next_point

HolderCommitmentPoint::next_point represents the point to use after
advancing the point. However, HolderCommitmentPoint::point actually
represents the next point we'd expect to receive. This will be renamed
in the next commit, so to avoid clashing the existing next_point field
needs to be renamed.

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 15/100

This commit is a simple internal rename of a struct field and its related variables from `next_point` to `pending_next_point`, plus updated comments and log messages. It does not change program behavior, fix a bug, or alter any security-relevant logic. It is preparation for a future rename of another field.

Lower-priorityDetermine if we have lost databy Aditya Sharma · 33d466a1 · Aug 18, 2025 · 1 fileMessage 60 · AdequateModerate 52Details
Commit message · Aditya Sharma

Determine if we have lost data

Deserialise the ChannelMonitors and compare the data to determine if we have
lost some states.

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

This commit adds a safety check in LDK that compares a backup of channel data received from a peer against the local state. If the peer's backup shows a newer state than what the local node has, the code now deliberately crashes with a panic and tells the user to use a recovery tool to force-close the channel and reclaim funds. The goal is to detect when the local node has lost critical channel data and prevent it from accidentally losing money.

Lower-prioritytest: Modify test_peer_storage to check latest changesby Aditya Sharma · 51c475e1 · Aug 18, 2025 · 1 fileMessage 87 · StrongInformational 12Details
Commit message · Aditya Sharma

test: Modify test_peer_storage to check latest changes

Node should now determine lost states using retrieved peer storage.

87/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 12/100

This commit only changes a test file. It updates an existing unit test to exercise a new behavior: after a node reloads from an older backup, it should detect that it is behind by comparing against peer storage data. The test is gated behind a compile-time feature flag and does not alter production code. There is no indication this fixes or introduces a security vulnerability in live code.

AI review queuedRemove #[rustfmt] from test_peer_storageby Aditya Sharma · e51028c5 · Aug 18, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Aditya Sharma

Remove #[rustfmt] from test_peer_storage

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-style cleanup. It removes a `#[rustfmt::skip]` annotation from a single test function and reformats the code so that the project's automated formatter can handle it. No behavior of the program or test logic was changed.

Lower-prioritySerialise ChannelMonitors and send them over inside Peer Storageby Aditya Sharma · 61bc1e06 · Aug 18, 2025 · 5 filesMessage 85 · StrongLow 31Details
Commit message · Aditya Sharma

Serialise ChannelMonitors and send them over inside Peer Storage

Create a utililty function to prevent code duplication while writing ChannelMonitors.
Serialise them inside ChainMonitor::send_peer_storage and send them over.

Cfg-tag the sending logic because we are unsure of what to omit from ChannelMonitors stored inside
peer-storage.

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

This commit adds an experimental feature (gated behind a special compile-time flag) that serializes sensitive Lightning channel backup data and sends it to peers for storage. The code itself is a work-in-progress: the authors explicitly note they are unsure which sensitive fields should be omitted from the backup, and the feature is disabled by default. There is no direct vulnerability in the diff, but it introduces a new attack surface where a bug or misconfiguration could leak channel secrets to counterparty peers.

Lower-priorityRemove #[rustfmt::skip] from fn writeby Aditya Sharma · d7901a13 · Aug 18, 2025 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Aditya Sharma

Remove #[rustfmt::skip] from fn write

Fixed formatting for write() in ChannelMonitorImpl. This would make the next
commit cleaner by ensuring it only contains direct code shifts, without
unrelated formatting changes.

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

This commit is purely a formatting cleanup. It removes a directive that told the Rust formatter to ignore a specific function, then applies standard formatting (line breaks, indentation) to that function. No behavior of the code changes.

Lower-priorityWrite structs to serialise-deserialise Channels inside Peer-storageby Aditya Sharma · 82ce98a2 · Aug 18, 2025 · 2 filesMessage 85 · StrongInformational 11Details
Commit message · Aditya Sharma

Write structs to serialise-deserialise Channels inside Peer-storage

'PeerStorageMonitorHolder' is used to wrap a single ChannelMonitor, here we are
adding some fields separetly so that we do not need to read the whole ChannelMonitor
to identify if we have lost some states.

`PeerStorageMonitorHolderList` is used to keep the list of all the channels which would
be sent over the wire inside Peer Storage.

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

This commit adds new data structures for serializing and deserializing Lightning channel backup information stored with peers. It is purely foundational code that defines how channel data should be formatted for storage and transmission. There is no indication this commit introduces a security vulnerability or fixes one—it appears to be a building block for a future peer-storage backup feature.

Security candidateAllow funding errors in `full_stack_target` fuzzerby Matt Corallo · c1fefcfe · Aug 18, 2025 · 1 fileMessage 85 · StrongInformational 18Details
Commit message · Matt Corallo

Allow funding errors in `full_stack_target` fuzzer

When a channel gets replaced before we can fund it, its possible
now (due to RNG output repetition) to hit the "trying to fund
channel before its ready to be funded" error in the
`full_stack_target` fuzzer.

Thus, we now simply ignore errors when funding.

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
entropy or randomnessfuzzing or regression evidence
AI analysis · Informational 18/100

This commit changes a fuzz test (a randomized testing harness) so it no longer crashes when it tries to fund a channel that isn't ready to be funded. The change only affects test code, not the real Lightning node software that users run. It is a test-hardening fix, not a security patch for a vulnerability in production code.

AI review queuedFix panic when calling `batch_funding_transaction_generated` earlyby Matt Corallo · e2988543 · Aug 18, 2025 · 3 filesMessage 73 · AdequateLow 33Details
Commit message · Matt Corallo

Fix panic when calling `batch_funding_transaction_generated` early

If a user calls `batch_funding_transaction_generated` before a
channel is ready to fund its possible to hit an `unwrap` when the
transaction-scanning logic attempts to fetch the channel's expected
output `scriptPubKey`.

While users shouldn't be doing this, we should also avoid the
panic, so here check the channel state first.

Found by the `full_stack_target` fuzzer.

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

This commit fixes a crash (panic) in the Lightning Dev Kit's rust-lightning library. The crash could happen if a user called a specific function, `batch_funding_transaction_generated`, too early in the channel-opening process—before the channel was actually ready to be funded. The fix adds a state check so the function returns a normal error instead of crashing. It was discovered by an internal fuzzer, not reported by an outside researcher.

Lower-priorityMove additional channel opening tests to `channel_open_tests.rs`by Matt Corallo · 399e6e7c · Aug 18, 2025 · 2 filesMessage 75 · AdequateInformational 15Details
Commit message · Matt Corallo

Move additional channel opening tests to `channel_open_tests.rs`

`functional_tests.rs` is a rather large beast, but with this move
we take it down to under 10k LoC.

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit is purely a code cleanup: it moves a large number of channel-opening test functions from one test file (functional_tests.rs) into another, more focused test file (channel_open_tests.rs). No production code, protocol logic, or security behavior is changed. The goal is simply to reduce the size of the large functional_tests.rs file.

Lower-priorityMove `channel_acceptance_tests.rs` to `channel_open_tests.rs`by Matt Corallo · 4b3ad40f · Aug 18, 2025 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Move `channel_acceptance_tests.rs` to `channel_open_tests.rs`

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

This commit simply renames a test file from channel_acceptance_tests.rs to channel_open_tests.rs and updates the module reference in mod.rs. The actual test code is unchanged except for adding a standard license/copyright header and a module doc comment. There is no change to production code, no security fix, and no vulnerability introduced.

Security candidateoffer: fix path validation to only require non-empty paths when issuer_id is missingby Erick Cestari · 5314ebb3 · Aug 18, 2025 · 1 fileMessage 73 · AdequateModerate 51Details
Commit message · Erick Cestari

offer: fix path validation to only require non-empty paths when issuer_id is missing

When an offer has an issuer_id, empty paths should be allowed since the
issuer_id can be used for signing. Only when issuer_id is None should
we require non-empty paths to extract the blinded node ID for signing.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Moderate 51/100

This commit fixes a validation bug in how Lightning offers (BOLT12) are checked. Previously, an offer that included an issuer ID but had an empty list of payment paths was incorrectly rejected. The fix allows empty paths when an issuer ID is present, because the issuer ID itself can be used for signing. The bug was a logic error, not a clear-cut security vulnerability, but it could cause valid offers to be rejected or force users to add unnecessary paths, which may have privacy or usability implications.

Lower-priorityAdd missing license headersby Elias Rohrer · f95ba694 · Aug 18, 2025 · 7 filesMessage 50 · ThinInformational 15Details
Commit message · Elias Rohrer

Add missing license headers

We add the license header to all files in `lightning-liquidity` where it
was absent.

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

This commit only adds or fixes standard open-source license header comments at the top of several source files. It makes no changes to actual program logic, data handling, or security behavior. There is no security vulnerability here.

Lower-priorityAlso reset notification cooldown on peer disconnectionby Elias Rohrer · b3e9bc6f · Aug 18, 2025 · 2 filesMessage 73 · AdequateLow 35Details
Commit message · Elias Rohrer

Also reset notification cooldown on peer disconnection

If we happened to send a notification while the client is connected to
us, we would previously only reset the cooldown once the client connects
again.

While theoretically it would be preferable to never set the
`last_notification_sent` field to begin with if the client is connected
to us, allowing the service handler to query the peer connection state
would be unnecessarily complex. Here, we therefore simply opt to also
reset the `last_notification_sent` state once the peer disconnects from
us.

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

This patch fixes a logic bug in how webhook notifications are paced. Previously, if a notification was sent while a client was connected, the system would wait for the client to reconnect before resetting the cooldown timer. If the client disconnected right after the notification, the cooldown could block future notifications from being sent promptly. The fix now resets the cooldown when the peer disconnects, so notifications can resume on schedule.

Lower-priorityRefactor `LSPS5ServiceHandler` to hold a `PeerState`by Elias Rohrer · ce89e6b3 · Aug 18, 2025 · 2 filesMessage 73 · AdequateInformational 20Details
Commit message · Elias Rohrer

Refactor `LSPS5ServiceHandler` to hold a `PeerState`

Going forward, we'll add serialization logic for LSPS5 types. To contain
the persisted state a bit better (and to align the model with LSPS1/2),
we refactor the `LSPS5ServiceHandler` to hold a `PeerState` object.

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

This commit is a code cleanup in the LSPS5 (webhook) service module. It replaces a flat hash map of webhooks with a per-peer state object, moving webhook storage from a Mutex to an RwLock and adding helper methods. The stated goal is to prepare for future serialization/persistence work and to match the design used in LSPS1/LSPS2. There is no direct security fix here, but any refactor that changes locking and data structures can introduce subtle concurrency or correctness bugs.

Lower-priorityOnly prune on `peer_{dis}connected`by Elias Rohrer · 9065f311 · Aug 18, 2025 · 2 filesMessage 68 · AdequateInformational 18Details
Commit message · Elias Rohrer

Only prune on `peer_{dis}connected`

Previously, we'd constantly check whether or not we can prune stale
webhooks. While not wrong, it lead to a bunch of ~unnecessary
operations, especially given that we only prune once a day currently.
Here we move pruning to `peer_connected`/`peer_disconnected`, which is
similar to what we do for LSPS2, and should still be more than enough.

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

This commit is a routine performance cleanup, not a security fix. It moves a once-a-day cleanup task (pruning old webhook records) so it only runs when peers connect or disconnect, instead of running during every message-handling operation. The change reduces unnecessary work and avoids briefly holding a write lock during common read-only operations. There is no indication this fixes a vulnerability.