LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

252security candidates228second-pass queue1525AI analyses
82commits · 30 days
182commits · 60 days
554commits · 180 days
1254commits · 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.

70/100 average clarity
474Strong · 80–100
836Adequate · 60–79
295Thin · 40–59
62Opaque · 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 Corallo43553371574
Jeffrey Czyz19545182169
Wilmer Paulino15945155169
Leo Nash11613116162
Valentine Wallace14511138169
Vincenzo Palazzo11311183
Joost Jager16224162069
elnosh391333058
auto-pr-bot2478087
shaavan22622069
Carla Kirk-Cohen78366068
Analysis record

Published AI watches

Last scanned 6 minutes ago

Moderate 55 AI analysisMessage 76 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Persistent `MonitorEvent`s' (#4491)

This commit makes on-chain 'MonitorEvent' notifications durable and replay-safe. Previously, if a node crashed after a ChannelMonitor persisted a block update but before the ChannelManager processed the resulting event, the event could be …

Durability/atomicity fix for async persistence: prevents lost MonitorEvents across crashesNew ack-based event lifecycle with random event IDsArchival gating on unacknowledged events to avoid losing preimage/timeout information
9a324e72by wpaulino+467−45912 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix payment attribution edge cases and simplify claiming' (#5021)

This commit refactors how LDK nodes claim incoming Lightning payments. It replaces a separate 'claim with known custom TLVs' method with an options struct passed to the normal claim call, and fixes two edge cases in payment attribution dat…

API change: claim_funds now takes ClaimFundsOptions, consolidating TLV-known behavior into one pathFailure-packet length bound added to prevent oversized onion error messagesIncoming failure packet truncated at 32 KiB before processing
ee7c61c2by Matt Corallo+256−17322 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'release utxos from failed splices' (#4973)

This change fixes a wallet bookkeeping problem in rust-lightning's built-in coin-selection wrappers. Previously, when a splice attempt failed or coin selection errored after picking UTXOs, those UTXOs stayed marked as 'reserved' in memory …

Resource exhaustion / denial-of-service via permanent in-memory UTXO reservationIncorrect state tracking in coin-selection wrapperNew API method required for correct lifecycle management (release_utxos)
7220a6fdby jkczyz+295−383 files
No security note in commit
Low 49 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Restore `Wallet` UTXO locks when coin selection fails afterwards

This commit fixes a bug in the wallet's coin-selection code. When the wallet picked UTXOs to spend, it locked them immediately so they couldn't be reused. But if a later step—fetching the change address or the previous transaction—failed, …

Resource lock leak on error pathUTXO lock state inconsistency between selection and confirmationDenial-of-service/funds-unavailability risk from persistent UTXO locks
81afd9caby elnosh+146−331 file
No security note in commit
Informational 19 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'tx-sync: Parallelize esplora status queries' (#4913)

This commit rewrites how a Lightning wallet talks to Esplora block-explorer servers so that many status checks happen in parallel instead of one at a time. It is a performance/refactoring change. There is no direct evidence in the commit t…

Concurrency/timing change in transaction confirmation logicNew inconsistency check preserved when a previously-confirmed tx is reported unconfirmedAdded defensive error path for missing pre-fetched block status
c303f515by Matt Corallo+140−371 file
No security note in commit
Low 30 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Skip Electrum creator transaction downloads' (#4992)

This change stops the Electrum-based transaction sync client from downloading the very transaction that created an output it is watching. Previously, the client could request that transaction from Electrum, even though a transaction can ne…

Avoids unnecessary Electrum transaction.get requests for watched outputsReduces information disclosure to Electrum server about watched outpointsAdds regression test verifying request suppression
c36e50cbby Matt Corallo+142−02 files
No security note in commit
Low 44 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Use preferred sPK of watched txn in electrum, not rand ones' (#4867)

This change improves how the Lightning Dev Kit's Electrum and Esplora transaction-sync clients track watched Bitcoin transactions. Previously, the code ignored the script pubkey (the 'address' associated with a transaction) supplied when r…

Previously ignored `script_pubkey` argument in `register_tx` for transaction watchersElectrum script-history queries previously used an arbitrary transaction output, which could be OP_RETURN and therefore unindexed by some Electrum serversNew logic prefers caller-supplied script pubkey and falls back to non-OP_RETURN outputs
bfe5ca89by tnull+52−243 files
No security note in commit
Low 33 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Serialize transient Event variants; move persist decision into ChannelManager' (#4791)

This commit changes how LDK stores pending event notifications. It adds serialization support for several event types that previously were not fully saved to disk, and introduces a helper method so the code can decide which events are wort…

Data-loss prevention: previously non-round-trippable event variants are now fully serialized, avoiding accidental event loss when users serialize Event queues themselvesState-consistency hardening: ChannelManager now explicitly skips events that describe non-surviving restart state, preventing replay of stale eventsDefensive assertion: debug builds assert that every persisted event round-trips to Some(event), catching serialization mismatches
a0d4632eby Matt Corallo+694−818 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Document that funding signing events can go stale' (#4960)

This commit only adds documentation comments to two source files. It explains that certain funding-signing events can become stale if the underlying negotiation fails, and that callers may see specific harmless errors as a result. No code …

26eecf2dby Matt Corallo+15−02 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add `Wallet::release_utxos` to free UTXOs from abandoned transactions

This commit fixes a design flaw in LDK's built-in wallet helper where coins selected for a splice-in (or other unclaimed funding) were permanently reserved in memory if the transaction was abandoned. Over repeated failed splices, all spend…

Denial-of-service via UTXO exhaustion from repeated failed splice negotiationsRisk of inability to broadcast fee-bumping/claim transactions due to lack of available UTXOsNew API surface (release_utxos) introduced to mitigate resource leak
52ab13fdby elnosh+148−43 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop the honggfuzz version pin from the CI fuzz job

This commit removes a fixed-version pin for the honggfuzz fuzzing tool in a continuous-integration script. The project now uses the current release of honggfuzz instead of an older pinned version. There is no change to the actual Lightning…

4a1635efby auto-pr-bot+1−51 file
No security note in commit
Informational 15 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Run the CI fuzz job on the stable toolchain

This commit changes the Rust toolchain used in the continuous integration (CI) fuzzing job from a fixed older version (1.75) to the latest stable release. It is purely a build/test infrastructure change to fix a dependency compatibility is…

21c4ed2bby auto-pr-bot+3−32 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Expose the dummy-hop tail constructor publicly

This commit makes a previously internal helper function public so that outside developers can build dummy-hop tails for blinded payment paths without recreating the logic themselves. It is an API usability change, not a fix for a known sec…

No security-relevant behavior change in the diffAPI visibility broadened from crate-public to publicCLTV expiry overflow check already present and unchanged
c5443353by auto-pr-bot+14−71 file
No security note in commit
Moderate 54 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Fail commitment sig verification without counterparty params

This change adds a safety check in a Bitcoin Lightning Network library (LDK). Previously, if the software tried to verify a peer's commitment signature before it had learned the peer's channel parameters, it could crash with a panic. Now i…

Defensive check added on peer-driven code path to prevent panicMissing counterparty_parameters could previously cause panic during commitment transaction constructionChannel closure returned instead of panic
de7ecc2fby auto-pr-bot+24−01 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Clarify the commitment validation failure message

This commit only changes the wording of an error message sent to peers when a commitment transaction fails validation. It replaces the vague phrase 'Failed to validate our commitment' with the clearer 'Received commitment failed validation…

3284a006by auto-pr-bot+11−114 files
No security note in commit
Moderate 61 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Move holder commit sig checks to `InMemorySigner`' (#4885)

This commit moves the checks that validate a counterparty's signatures on the holder's commitment and HTLC transactions out of the general channel code and into the signer module (InMemorySigner). Previously, these signature checks were do…

Moved signature validation from channel state machine into signer moduleAdded new tests that corrupt signatures and verify rejectionChanged error message from 'Invalid commitment tx signature from peer' / 'Invalid funding_created signature from peer' to 'Failed to validate our commitment'
83f5ba55by Matt Corallo+626−31024 files
No security note in commit
Low 42 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Drop stale splice signature on disconnect' (#4954)

This change fixes a Lightning channel splicing bug: when two peers temporarily disconnect during a splice, any half-finished signature the other side already sent is now discarded. Before the fix, that stale signature could be reused after…

State-invalidation bug in multi-step protocol (splice negotiation)Stale cryptographic signature not cleared on disconnectPotential reuse of old commitment state after reconnect
c9a77251by Matt Corallo+22−12 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop stale splice signature on disconnect

This fix prevents a Lightning channel from being accidentally force-closed. During a splice (a way to resize a payment channel), one side's initial signature could be kept in memory after the peers disconnected. If the peers later reconnec…

State inconsistency: in-memory buffered message not cleared on disconnectDuplicate message processing after reconnectionForce-close consequence for active Lightning channel
71405b4bby Wilmer Paulino+22−12 files
Vendor flagged security relevance
Informational 20 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice' (#4942)

This commit is a simple rename of a public function from `matches_invoice_signing_pubkey` to `key_can_sign_invoice`, plus matching updates to its documentation, callers, tests, and changelog. No behavior changed. It is not a security fix.

a476cf92by Matt Corallo+13−133 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice

This commit is a simple rename of a function and its documentation from matches_invoice_signing_pubkey to key_can_sign_invoice. No logic, behavior, or security properties changed. It is a follow-up code-review naming cleanup.

388187caby Vincenzo Palazzo+13−133 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.

Security candidateDrop `RevokedOutput::is_counterparty_balance_on_anchors`by Matt Corallo · ffa60c82 · Sep 17, 2025 · 2 filesMessage 63 · AdequateLow 32Details
Commit message · Matt Corallo

Drop `RevokedOutput::is_counterparty_balance_on_anchors`

When we added anchors support we declined to aggregate claims
across different types of outputs for anchor channels, requiring
that we track whether a `RevokedOutput` claim came from an anchor
channel or not. This was only ever used to decide whether the claim
was aggregable or not.

In 0fe90c6f7c3325935b18dbc809be14afd8fe067f we started aggregating
by determining whether a claim is pinnable or not, rather than the
much-too-coarse aggregable flag, leaving
`is_counterparty_balance_on_anchors` unused.

Here we remove it entirely (as it would become ambiguous with
zero-commitment-fee anchor channels).

We always write `Some(())`, marking the claim as an anchor claim
and resulting in LDK prior to 0.1 refusing to aggregate the claim
(which is the more conservative stance). This breaks downgrade to
LDK 0.0.115 and earlier.

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
Why it was queued
update trust
AI analysis · Low 32/100

This commit removes an internal flag used when claiming funds from a revoked Lightning channel. The flag had become unused after a prior change, and removing it simplifies the code. The change intentionally breaks backward compatibility with older versions (before 0.1) to avoid ambiguous behavior with newer anchor channel types. It is a cleanup/refactoring change with a deliberate compatibility trade-off, not a fix for an active exploit.

Lower-prioritySomewhat DRY `pay_for_offer_intern` callback methodby Matt Corallo · dbf40d3f · Sep 16, 2025 · 1 fileMessage 50 · ThinInformational 14Details
Commit message · Matt Corallo

Somewhat DRY `pay_for_offer_intern` callback method

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

This commit is a small internal cleanup in the code that handles BOLT 12 offer payments. It removes repeated boilerplate by moving the construction of a RetryableInvoiceRequest object into one shared helper, instead of building it separately in each caller. The actual values being passed (invoice request, nonce, retry flag, and expiration timer) remain the same, so there is no functional or security change.

Lower-priorityMention the `bitcoin-payment-instructions` crate in docsby Matt Corallo · 0c13a663 · Sep 16, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Mention the `bitcoin-payment-instructions` crate in docs

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

This commit only updates documentation comments in a single source file. It adds a reference to an external Rust crate called `bitcoin-payment-instructions` and slightly reorders existing documentation links. No code behavior changes, no security fixes, and no functional modifications are present.

Lower-priorityDrop spurious limitations section on `pay_for_offer`by Matt Corallo · dd122519 · Sep 16, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Drop spurious limitations section on `pay_for_offer`

For some time we've automatically opened a connection to the
blinded path introduction point when we need to send a message we
generated. However, the "Limitations" section in
`ChannelManager::pay_for_offer` lists having a direct connection
as required for the payment to succeed, which is not true.

Instead, we simply remove the section from both `pay_for_offer` and
`pay_for_offer_from_human_readable_name`.

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

This commit only removes outdated documentation comments from two functions. The deleted text incorrectly stated that users needed a direct network connection to specific nodes for certain Lightning payments to work. The code already automatically opens those connections, so the documentation was wrong and misleading, but no actual behavior changed. There is no security issue in the code change itself.

Lower-priorityMove reasonable-default arguments out of `pay_for_offer`.by Matt Corallo · f65e78da · Sep 16, 2025 · 5 filesMessage 73 · AdequateInformational 18Details
Commit message · Matt Corallo

Move reasonable-default arguments out of `pay_for_offer`.

`ChannelManager::pay_for_offer` and
`ChannelManager::pay_for_offer_from_human_readable_name` have
accumulated a handful of arguments, most of which we expect users
to never actually set.

Instead, here, we move `quantity` and `payer_note` (which we expect
users to never set) as well as `route_params_config` and
`retry_strategy` (which we expect users to generally stick with the
defaults on) into a new struct, which implements `Default`.

This cleans up a good bit of cruft on payment calls.

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 API cleanup, not a security fix. It groups several rarely-used arguments of the `pay_for_offer` and `pay_for_offer_from_human_readable_name` functions into a new `OptionalOfferPaymentParams` struct with sensible defaults. Existing callers are updated to use the new, simpler call pattern. There is no change to payment logic, validation, or security behavior.

Lower-priorityAllow setting an HRN in invoice_requests built by `pay_for_offer`by Matt Corallo · 54219385 · Sep 16, 2025 · 1 fileMessage 85 · StrongInformational 15Details
Commit message · Matt Corallo

Allow setting an HRN in invoice_requests built by `pay_for_offer`

If a user did their own BIP 353 lookup to fetch an offer from a
human readable name, we still want them to be able to use
`ChannelManager::pay_for_offer`.

Because BIP 353 offer payments require that the `invoice_request`
include the human readable name, we need to add an argument to set
the `invoice_request` HRN to `pay_for_offer`, which we do here.

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

This commit adds a new public method, pay_for_offer_from_hrn, to ChannelManager so that users who looked up a Lightning offer via a human-readable name (BIP 353) can still pay it through the existing pay_for_offer machinery. The change is a feature addition: it threads the human-readable name into the invoice_request so the payment follows the BIP 353 protocol. There is no security bug being fixed here.

Lower-priorityAdd a `OfferFromHrn` type to wrap `Offer`s which came from HRNsby Matt Corallo · 6679c4f3 · Sep 16, 2025 · 1 fileMessage 73 · AdequateInformational 11Details
Commit message · Matt Corallo

Add a `OfferFromHrn` type to wrap `Offer`s which came from HRNs

In a coming commit we'll provide users a different `ChannelManager`
method for sending to `Offer`s which were fetched by resolving an
HRN. Here, we first ad a wrapper type which can be used by HRN
resolution methods to nudge users towards calling the correct
payment method on `ChannelManager`.

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

This commit is a small, preparatory refactor in the Lightning Dev Kit library. It introduces a new wrapper type called OfferFromHrn to mark payment offers that came from a human-readable name (like a BIP 353 DNS-style address). The wrapper helps ensure that future code calls the correct method when building an invoice request. There is no security fix or vulnerability patch here; it is purely a code-organization change setting up a later feature.

AI review queuedMiscellanous CI fixesby Leo Nash · 2ce8e647 · Sep 16, 2025 · 6 filesMessage 28 · OpaqueInformational 15Details
Commit message · Leo Nash

Miscellanous CI fixes

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

This commit is a collection of minor cleanups to fix automated documentation and code-quality checks. It removes unnecessary parentheses, fixes broken doc links, corrects a URL in a comment, and adds missing doc links. None of the changes alter program behavior or fix any security issue.

Lower-priorityAdd basic end-to-end splice testsby Wilmer Paulino · 307fa561 · Sep 16, 2025 · 3 filesMessage 78 · AdequateInformational 15Details
Commit message · Wilmer Paulino

Add basic end-to-end splice tests

This adds a new test for both splice-in and splice-out in favor of
maintaining the existing test. Helpers have been added to DRY up a lot
of the logic necessary for driving the splice state machine forward.

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

This commit is a routine development patch that adds and improves automated tests for a new Bitcoin Lightning channel feature called 'splicing'—a way to add or remove funds from an existing channel. It removes a temporary placeholder that deliberately aborted splicing during testing, because the tests now need the feature to run further. There is no indication this fixes a security bug or introduces a vulnerability.

Lower-prioritySet current block locktime for coinbase in provide_anchor_reservesby Wilmer Paulino · 8ab08840 · Sep 16, 2025 · 1 fileMessage 73 · AdequateInformational 16Details
Commit message · Wilmer Paulino

Set current block locktime for coinbase in provide_anchor_reserves

This guarantees we get a unique txid when calling
`provide_anchor_reserves` successively as we're immediately mining (and
therefore advancing the chain) the transaction after creating it.

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

This is a one-line change inside a test helper function. It sets the transaction locktime to the current block height instead of zero when creating a dummy coinbase transaction used only in tests. The goal is to avoid duplicate transaction IDs when the test framework rapidly mines blocks. It does not affect production Lightning node code or real funds.

Lower-prioritySwitch TestWalletSource to use P2WPKH scriptby Wilmer Paulino · 749ebb8e · Sep 16, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Wilmer Paulino

Switch TestWalletSource to use P2WPKH script

We plan to reuse it for dual-funding/splicing, and those require
standard SegWit inputs only.

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

This commit changes a test-only helper in the Lightning Dev Kit codebase so that its fake wallet produces a more modern type of Bitcoin address (SegWit/P2WPKH) instead of the older P2PKH format. The change only affects internal test utilities and does not alter production code, network behavior, or cryptographic security. There is no indication this fixes or introduces a vulnerability.

Lower-priorityMove `TestStore` logic to `_internal` methodsby Elias Rohrer · 828e10d7 · Sep 16, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Elias Rohrer

Move `TestStore` logic to `_internal` methods

.. to be easier reusable by different trait implementations.

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 simple internal code cleanup in the project's test utilities. It takes the existing logic of a test-only key-value store and splits it into private helper methods, then has the public trait methods call those helpers. There is no change to behavior, no fix for a bug, and no security relevance.

Lower-priorityImplement `KVStore` for `TestStore`by Elias Rohrer · 012bb7a0 · Sep 16, 2025 · 2 filesMessage 68 · AdequateInformational 15Details
Commit message · Elias Rohrer

Implement `KVStore` for `TestStore`

We implement the async `KVStore` trait for `TestStore`. This is mostly
useful in LDK Node tests, where we use `TestStore` and we now require
all stores to implement both variants.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit adds an asynchronous version of a key-value store interface to a test-only helper called TestStore. It does not change production code, user-facing behavior, or any security-sensitive logic. It is purely a testing infrastructure change to satisfy a new trait requirement.

Lower-priorityStop re-hydrating pending payments once they are fully resolvedby Matt Corallo · 226520b2 · Sep 16, 2025 · 4 filesMessage 85 · StrongModerate 57Details
Commit message · Matt Corallo

Stop re-hydrating pending payments once they are fully resolved

`MonitorEvent`s aren't delivered to the `ChannelManager` in a
durable fasion - if the `ChannelManager` fetches the pending
`MonitorEvent`s, then the `ChannelMonitor` gets persisted (i.e. due
to a block update) then the node crashes, prior to persisting the
`ChannelManager` again, the `MonitorEvent` and its effects on the
`ChannelManger` will be lost. This isn't likely in a sync persist
environment, but in an async one this could be an issue.

Note that this is only an issue for closed channels -
`MonitorEvent`s only inform the `ChannelManager` that a channel is
closed (which the `ChannelManager` will learn on startup or when it
next tries to advance the channel state), that
`ChannelMonitorUpdate` writes completed (which the `ChannelManager`
will detect on startup), or that HTLCs resolved on-chain post
closure. Of the three, only the last is problematic to lose prior
to a reload.

In previous commits we ensured that HTLC resolutions which came to
`ChannelManager` via a `MonitorEvent` were replayed on startup if
the `MonitorEvent` was lost. However, in cases where the
`ChannelManager` was so stale that it didn't have the payment state
for an HTLC at all, we only re-add it in cases where
`ChannelMonitor::get_pending_or_resolved_outbound_htlcs` includes
it.

Because constantly re-adding a payment state and then failing it
would generate lots of noise for users on startup (not to mention
risk of confusing stale payment events for the latest state of a
payment when the `PaymentId` has been reused to retry a payment).
Thus, `get_pending_or_resolved_outbound_htlcs` does not include
state for HTLCs which were resolved on chain with a preimage or
HTLCs which were resolved on chain with a timeout after
`ANTI_REORG_DELAY` confirmations.

This critera matches the critera for generating a `MonitorEvent`,
and works great under the assumption that `MonitorEvent`s are
reliably delivered. However, if they are not, and our
`ChannelManager` is lost or substantially old (or, in a future
where we do not persist `ChannelManager` at all), we will not end
up seeing payment resolution events for an HTLC.

Instead, we really want to tell our `ChannelMonitor`s when the
resolution of an HTLC is complete. Note that we don't particularly
care about non-payment HTLCs, as there is no re-hydration of state
to do there - `ChannelManager` load ignores forwarded HTLCs coming
back from `get_pending_or_resolved_outbound_htlcs` as there's
nothing to do - we always attempt to replay the success/failure and
figure out if it mattered based on whether there was still an HTLC
to claim/fail.

Here we, finally, begin actually using the new
`ChannelMonitorUpdateStep::ReleasePaymentComplete` updates,
skipping re-hydration of pending payments once they have been fully
resolved through to a user `Event`.

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

This commit fixes a reliability issue in the Lightning Dev Kit's handling of payment events after a channel closes. In rare crash scenarios, the wallet could lose track of whether an on-chain payment had already been reported to the user, causing it to either replay old payment notifications or fail to report a resolution. The fix marks HTLCs as fully resolved in the ChannelMonitor so they are not re-processed on restart, reducing duplicate or missing payment events.

Lower-priorityRemove redundant `startup_replay` arg to `claim_funds_internal`by Matt Corallo · 77026c9d · Sep 16, 2025 · 1 fileMessage 73 · AdequateInformational 12Details
Commit message · Matt Corallo

Remove redundant `startup_replay` arg to `claim_funds_internal`

`startup_replay` should always exactly mirror
`background_events_processed_since_startup`, so we should just use
that rather than having a dedicated argument for it.

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

This is a small internal code cleanup in the Lightning Dev Kit's channel manager. It removes a redundant function argument and replaces it with a direct read of an existing flag. The change does not alter behavior and is not a security fix.

Lower-priorityProperly provide `PaymentPathSuccessful` event for replay claimsby Matt Corallo · ba6528f0 · Sep 16, 2025 · 3 filesMessage 73 · AdequateInformational 21Details
Commit message · Matt Corallo

Properly provide `PaymentPathSuccessful` event for replay claims

When a payment was sent and ultimately completed through an
on-chain HTLC claim which we discover during startup, we
deliberately break the payment tracking logic to keep it around
forever, declining to send a `PaymentPathSuccessful` event but
ensuring that we don't constantly replay the claim on every
startup.

However, now that we now have logic to complete a claim by marking
it as completed in a `ChannelMonitor` and not replaying information
about the claim on every startup. Thus, we no longer need to take
the conservative stance and can correctly replay claims now,
generating `PaymentPathSuccessful` events and allowing the state to
be removed.

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

This change fixes a bookkeeping quirk in the Lightning Dev Kit. Previously, when a payment was completed via an on-chain claim discovered during startup, the software deliberately kept the payment record around forever and skipped sending a 'this payment path succeeded' event, to avoid repeatedly replaying the claim every time the node restarted. Now that the software can mark such claims as completed inside the channel monitor, it can safely send the missing success event and clean up the old payment state. This is a correctness and cleanup improvement, not a vulnerability that an attacker can exploit.

Security candidateGenerate new `ReleasePaymentComplete` monitor updatesby Matt Corallo · 71a364c1 · Sep 16, 2025 · 9 filesMessage 95 · StrongModerate 53Details
Commit message · Matt Corallo

Generate new `ReleasePaymentComplete` monitor updates

`MonitorEvent`s aren't delivered to the `ChannelManager` in a
durable fasion - if the `ChannelManager` fetches the pending
`MonitorEvent`s, then the `ChannelMonitor` gets persisted (i.e. due
to a block update) then the node crashes, prior to persisting the
`ChannelManager` again, the `MonitorEvent` and its effects on the
`ChannelManger` will be lost. This isn't likely in a sync persist
environment, but in an async one this could be an issue.

Note that this is only an issue for closed channels -
`MonitorEvent`s only inform the `ChannelManager` that a channel is
closed (which the `ChannelManager` will learn on startup or when it
next tries to advance the channel state), that
`ChannelMonitorUpdate` writes completed (which the `ChannelManager`
will detect on startup), or that HTLCs resolved on-chain post
closure. Of the three, only the last is problematic to lose prior
to a reload.

In previous commits we ensured that HTLC resolutions which came to
`ChannelManager` via a `MonitorEvent` were replayed on startup if
the `MonitorEvent` was lost. However, in cases where the
`ChannelManager` was so stale that it didn't have the payment state
for an HTLC at all, we only re-add it in cases where
`ChannelMonitor::get_pending_or_resolved_outbound_htlcs` includes
it.

Because constantly re-adding a payment state and then failing it
would generate lots of noise for users on startup (not to mention
risk of confusing stale payment events for the latest state of a
payment when the `PaymentId` has been reused to retry a payment).
Thus, `get_pending_or_resolved_outbound_htlcs` does not include
state for HTLCs which were resolved on chain with a preimage or
HTLCs which were resolved on chain with a timeout after
`ANTI_REORG_DELAY` confirmations.

This critera matches the critera for generating a `MonitorEvent`,
and works great under the assumption that `MonitorEvent`s are
reliably delivered. However, if they are not, and our
`ChannelManager` is lost or substantially old (or, in a future
where we do not persist `ChannelManager` at all), we will not end
up seeing payment resolution events for an HTLC.

Instead, we really want to tell our `ChannelMonitor`s when the
resolution of an HTLC is complete. Note that we don't particularly
care about non-payment HTLCs, as there is no re-hydration of state
to do there - `ChannelManager` load ignores forwarded HTLCs coming
back from `get_pending_or_resolved_outbound_htlcs` as there's
nothing to do - we always attempt to replay the success/failure and
figure out if it mattered based on whether there was still an HTLC
to claim/fail.

Here we begin generating the new
`ChannelMonitorUpdateStep::ReleasePaymentComplete` updates,
updating functional tests for the new `ChannelMonitorUpdate`s where
required.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
boot or update path
AI analysis · Moderate 53/100

This commit fixes a reliability bug in the Lightning Dev Kit (LDK) where payment success or failure events could be lost if the node crashes at the wrong moment. The fix adds a new 'ReleasePaymentComplete' monitor update so that once a payment is fully resolved, the ChannelMonitor records it durably. This prevents users from seeing stale or repeated payment events after a restart, especially in setups where persistence happens asynchronously. It is a defensive correctness fix, not an externally exploitable vulnerability.

Lower-priorityAddress ChannelState inconsistency throughout splicingby Wilmer Paulino · 7597140c · Sep 15, 2025 · 1 fileMessage 73 · AdequateLow 42Details
Commit message · Wilmer Paulino

Address ChannelState inconsistency throughout splicing

Once a channel open has become locked (i.e., we've entered
`ChannelState::ChannelReady`), the channel is intended to remain within
this state for the rest of its lifetime until shutdown. Previously, we
had assumed a channel being spliced would go through the `ChannelState`
lifecycle again starting from `NegotiatingFunding` but skipping
`AwaitingChannelReady`. This inconsistency departs from what we strive
to achieve with `ChannelState` and also makes the state of a channel
harder to reason about.

This commit ensures a channel undergoing a splice remains in
`ChannelReady`, clearing the quiescent flag once the negotiation is
complete. Dual funding is unaffected by this change as the channel is
being opened and we want to maintain the same `ChannelState` lifecycle.

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

This commit fixes a state-machine inconsistency in how the Lightning node tracks the lifecycle of a channel when it is being spliced. Previously, a splice incorrectly moved the channel back through the same states used when a channel is first being opened. The change keeps the channel in its normal operating state during a splice and only clears a temporary 'quiet' flag once negotiation is done. This makes the code easier to reason about and prevents potential bugs where the channel could be treated as not-yet-open when it is actually already active.

Security candidateRemove tx_signatures flags for interactive signing ChannelStateby Wilmer Paulino · 67aef544 · Sep 15, 2025 · 2 filesMessage 73 · AdequateLow 27Details
Commit message · Wilmer Paulino

Remove tx_signatures flags for interactive signing ChannelState

This commit addresses an overlap of state between
`InteractiveTxSigningSession` and `ChannelState::FundingNegotiated`. The
signing session already tracks whether both holder and counterparty
`tx_signatures` have been produced, so tracking the state duplicatively
at the `ChannelState` level is unnecessary.

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

This commit is a code cleanup in a Bitcoin Lightning network library. It removes duplicate state-tracking flags from the channel state and instead relies on an existing 'interactive signing session' object to track the same information. The change simplifies the code and reduces the chance of inconsistent state, but it does not appear to fix an active security bug on its own. Some behavior changes in error handling are visible, but they look like incidental adjustments rather than a disclosed vulnerability fix.

Security candidateMove interactive signing session into ChannelContextby Wilmer Paulino · 470dd2c0 · Sep 15, 2025 · 2 filesMessage 73 · AdequateInformational 12Details
Commit message · Wilmer Paulino

Move interactive signing session into ChannelContext

Since the `InteractiveTxSigningSession` already tracks everything we
need, we can remove the duplicate interactive signing state tracking
within `ChannelState`.

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

This commit is a straightforward internal code cleanup in the Lightning Dev Kit. It moves the interactive transaction signing session from several channel-specific structs into a single shared ChannelContext struct, removing duplicate state tracking. There is no indication this fixes a security bug or changes security-relevant behavior.

Lower-priorityRemove incomplete dual funding testsby Wilmer Paulino · 1644a782 · Sep 15, 2025 · 2 filesMessage 78 · AdequateInformational 15Details
Commit message · Wilmer Paulino

Remove incomplete dual funding tests

The tests have become a bit painful to maintain, and they don't even
fully test the production code paths, so we opt to just remove them for
now. In the future, we plan to unify the dual funding code paths with
splicing.

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

This commit simply deletes a set of incomplete automated tests for an experimental dual-funded Lightning channel feature, plus one small test-only helper function that only those tests used. No production code is changed, so it cannot introduce or fix a security vulnerability in running software.

Lower-priorityDrop `Readable`/`Writeable` for `InFlightHtlcs`by Matt Corallo · a5d07675 · Sep 15, 2025 · 1 fileMessage 80 · StrongLow 32Details
Commit message · Matt Corallo

Drop `Readable`/`Writeable` for `InFlightHtlcs`

Its not clear why this needs to be serialized at all (it should
generally always be generated live when needed), but its
serialization isn't forward-compatible, so really needs to be
dropped so that we can add additional field(s) to `InFlightHtlcs`.

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

This commit removes the ability to save and load a small routing helper object called InFlightHtlcs to disk. The developer says this object should normally be built fresh while the program is running, and its old save/load format is not forward-compatible, meaning future additions could break old stored data. Removing it prevents that compatibility problem. There is no direct evidence in the commit of an active security vulnerability, but non-forward-compatible serialization in a Lightning payment router can, in principle, lead to crashes or inconsistent routing state if old data is loaded after an upgrade.

Lower-priorityMake `InFlightHtlcs` a named-field struct instead of a tuple structby Matt Corallo · 66e59f95 · Sep 15, 2025 · 1 fileMessage 85 · StrongInformational 15Details
Commit message · Matt Corallo

Make `InFlightHtlcs` a named-field struct instead of a tuple struct

In the next commit we'll track blinded path in-flights in
`InFlightHtlcs` as well as unblinded hops, so here we convert
`InFlightHtlcs` to a named-field struct so that we can add more
fields to it with less confusion.

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

This commit is a straightforward internal code cleanup. It renames an anonymous tuple-style struct to a named-field struct so that future fields can be added more easily. There is no change to behavior, no bug fix, and no security-relevant change.

Security candidatetest(invoice): add new BOLT11 test vector to test public-key recovery high-S signatureby Erick Cestari · c678a9a2 · Sep 15, 2025 · 1 fileMessage 77 · AdequateInformational 12Details
Commit message · Erick Cestari

test(invoice): add new BOLT11 test vector to test public-key recovery high-S signature

77/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Mentions testing or verification✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
signing boundaryfuzzing or regression evidence
AI analysis · Informational 12/100

This commit only adds a new test case to the rust-lightning invoice test suite. It exercises how the library handles a BOLT11 invoice containing a high-S signature during public-key recovery. There is no code change to the actual invoice parsing or signature logic, so by itself this commit does not fix or introduce a security issue. It is a test-only addition.

Security candidaterefactor(invoice): align signature checks with BOLT11 semanticsby Erick Cestari · f63aebb2 · Sep 15, 2025 · 2 filesMessage 100 · StrongLow 35Details
Commit message · Erick Cestari

refactor(invoice): align signature checks with BOLT11 semantics

Simplify `check_signature` logic to follow the BOLT11 rules discussed:

- If an `n` field is present, verify the signature against the included
pubkey using `secp256k1_ecdsa_verify`, which enforces normalized
low-S form.

- If no `n` field is present, rely on `secp256k1_ecdsa_recover` to
extract the pubkey. Recovery accepts both high-S and low-S signatures,
matching existing implementations (lnd, c-lightning).

This avoids redundant recovery+verify checks while preserving
interoperability.

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 35/100

This commit changes how Bitcoin Lightning invoices (BOLT11) are validated. Previously, the code always tried to recover the signer's public key from the signature and also verified it, which could reject some signatures that other Lightning implementations accept. Now, if the invoice explicitly includes a public key, it only verifies the signature against that key (and requires a strict low-S signature). If no public key is included, it recovers the public key from the signature, accepting both high-S and low-S signatures like lnd and c-lightning. This is described as an interoperability fix, not a security vulnerability, but it slightly weakens signature strictness in the no-pubkey case.