LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

300security candidates261second-pass queue1606AI analyses
175commits · 30 days
261commits · 60 days
636commits · 180 days
1314commits · 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.

71/100 average clarity
704Strong · 80–100
856Adequate · 60–79
302Thin · 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.
Matt Corallo58679418876
Elias Rohrer15415153667
auto-pr-bot571823287
Jeffrey Czyz19645182169
Wilmer Paulino15945155169
Valentine Wallace15715145169
Leo Nash11613116162
Vincenzo Palazzo11311183
Joost Jager16324162069
elnosh401434059
shaavan22622069
wpaulino2059082
Analysis record

Published AI watches

Last scanned 55 minutes ago

Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct FeeEstimator docs on the 253 sat/kW lower bound

This is a documentation-only edit. It corrects a misleading comment in the code that wrongly claimed all fee estimates returned to LDK are forced to be at least 253 satoshis per 1000 weight units. The new comment clarifies that this minimu…

ea2051feby auto-pr-bot+9−31 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Track splice confirmation while awaiting tx_signatures' (#5570)

This change fixes a bug in Lightning Dev Kit's splicing logic. During a splice, one side can broadcast the new funding transaction as soon as it has the other side's signatures. Previously, if that transaction confirmed on-chain before the…

State-machine inconsistency in channel funding lifecycleMissing chain-source watch for in-flight splice funding transactionPotential failure to send splice_locked after splice confirms during signature exchange
ca778e61by Matt Corallo+245−32 files
No security note in commit
Moderate 63 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Account for current HTLC fees in dust exposure' (#5690)

This change fixes how Lightning nodes calculate the financial risk from tiny ('dust') HTLCs when the current on-chain fee rate is higher than the node's own local fee estimate. Previously, the code only considered a buffered fee rate when …

Incorrect fee exposure accounting for dust HTLCsPotential to accept HTLCs whose commitment/HTLC-success fees exceed their value under current feerateEconomic griefing / forced-channel-closure cost manipulation
cc798f60by Matt Corallo+108−382 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Replace cloned array literal with slice::from_ref in reload test' (#5689)

This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.

03ca832fby Matt Corallo+1−11 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Replace cloned array literal with slice::from_ref in reload test

This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and …

93e0129cby auto-pr-bot+1−11 file
No security note in commit
Informational 12 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix CI: rebuild test coin-selection impl and rework reused-ID balance test' (#5684)

This commit is a test-only fix for a broken continuous integration (CI) build. It updates a test mock to match a new function signature and rewrites an existing test to use three nodes instead of two so the test scenario remains valid unde…

17bac68aby Matt Corallo+26−202 files
No security note in commit
Moderate 68 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Guard pending closing signatures before channel_ready' (#5681)

This change fixes a Lightning channel bug where a malicious peer could renegotiate the closing transaction fee while the local node was still waiting for its own signer to produce the final signature. If allowed, the local node might combi…

State-machine guard expansion to prevent fee renegotiation while a closing signature is pendingRisk of combining mismatched signatures across different closing feesRegression test demonstrates malicious peer renegotiation attempt and expected warning rejection
a01273a2by Matt Corallo+169−21 file
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Release wallet UTXOs when FundingBuilder rejects a coin selection' (#5634)

This change fixes a wallet bug in rust-lightning where a UTXO could be selected for a Lightning funding transaction, then rejected because its previous transaction was too large to fit in a Lightning peer message. Previously, that rejectio…

API change to CoinSelectionSource::select_confirmed_utxos adding max_input_prevtx_serialized_lenWalletSync filters UTXOs by prevtx serialized length before selectionFundingBuilder enforces Lightning tx_add_input message-size limit at selection time
56054190by Matt Corallo+148−155 files
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Refuse to pay BOLT 12 invoices with records above experimental range

This commit hardens LDK's BOLT 12 payment logic so it refuses to pay invoices containing very large unknown record types (4 billion and up). These records are legal under the Lightning spec, but LDK doesn't understand them, so the change t…

Defensive refusal to pay invoices with unknown high-numbered TLV recordsReuses existing UnknownRequiredFeatures failure path instead of adding a new oneAdds explicit checks before payment state insertion and route construction
2970372fby auto-pr-bot+106−177 files
No security note in commit
Moderate 64 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Read invoice TLV records above the experimental range

This commit fixes a backward-compatibility bug in LDK's BOLT 12 invoice parser. A previous change had capped the range of 'experimental' TLV record types at 4 billion, but the Lightning spec imposes no upper bound. As a result, invoices cr…

Backward-compatibility regression in deserialization of persisted channel monitorsDenial-of-service via unreadable monitor blocking all channel monitoringSpec compliance fix: TLV record types have no upper bound
9e28db58by auto-pr-bot+133−84 files
No security note in commit
High 74 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to sign messages that collide with gossip serializations' (#5677)

This change fixes a security issue where a signed text message could be crafted so that its prefixed form looks exactly like a Lightning 'node_announcement' gossip message. Because both use the same double-SHA256 hash and the same signing …

Signature replay / message confusion between signed messages and gossip announcementsForged `node_announcement` signatures via chosen-prefix message constructionNew validation rejects prefixed messages that deserialize as `UnsignedNodeAnnouncement`
ec40e097by Matt Corallo+74−148 files
Vendor flagged security relevance
Low 37 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Retry a single HTLC before abandoning an unfundable batch' (#5406)

This change fixes a corner case in how the Lightning node tries to claim multiple pending HTLCs (small Bitcoin payments locked in a channel) when the wallet cannot fund a single large batch transaction. Previously, if the multi-HTLC batch …

Funds-recovery robustness improvement: prevents premature abandonment of a single unbatched HTLCChange in error-handling arithmetic from checked_sub/saturating_sub with max(1)New unit tests covering both failed and successful singleton HTLC funding paths
643e8684by wpaulino+119−21 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to persist fresh monitors that alias archived monitors' (#5645)

This change prevents a Lightning node from accidentally overwriting an archived copy of a channel's security monitor with a brand-new one that happens to use the same identifier. In the old code, if a new channel reused the same identifier…

Data-loss prevention: stops archived ChannelMonitor from being overwritten by a later channel with the same keySafety guard added to both sync and async persistence pathsPersistence refusal surfaces as InProgress/UnrecoverableError rather than silent overwrite
3c606c11by Matt Corallo+298−332 files
No security note in commit
Moderate 52 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Handle fee multiplication overflow when merging MPP paths' (#5288)

This change fixes a place in the Lightning payment routing code where adding up fees could overflow the maximum number a computer can store in a 64-bit integer. Previously, the code assumed this could never happen and would crash (panic) i…

Integer overflow in fee computationPreviously unreachable!() panic path reachableMPP path merge could trigger overflow
25f8a740by Matt Corallo+42−171 file
No security note in commit
Low 43 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Resume channels stuck awaiting a completed monitor persistence on reload' (#5610)

This commit fixes a bug where a Lightning node could get stuck after restarting. If the node crashed or restarted while it was still saving the initial channel monitor to disk, and that save later finished in another process, the restarted…

Fixes a state-machine stall on node reload that could leave channels non-functionalRemoves an overstrict assertion that would panic on a legitimate post-reload stateAdds explicit detection of monitor persistence completed in a prior process
11815ed1by Matt Corallo+334−74 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Correct KeysManager docs on spliced channels' remote_key derivation' (#5609)

This change only updates documentation and code comments in the Lightning Dev Kit library. It clarifies that a particular key-derivation setting is fixed when a channel is first opened and is not changed by splicing. No code behavior was a…

83a4d243by Matt Corallo+17−91 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix DelayedPaymentKey/HtlcKey from_basepoint docs and document justice tx witness script' (#5596)

This commit only changes documentation comments in two source files. It corrects the wording of how certain public keys are derived in the Lightning protocol and adds details about which witness script a signer must use when creating justi…

Documentation-only changeClarifies key derivation semantics for Lightning commitment transactionsClarifies justice transaction witness script requirements for signers
2f832195by Matt Corallo+44−62 files
No security note in commit
Informational 19 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Document that TokioSpawner requires all of LDK in a tokio context' (#5621)

This change only adds documentation comments to a Rust struct. It does not modify any executable code, so it cannot by itself introduce or fix a security vulnerability. The new text warns developers that using TokioSpawner incorrectly can …

Documentation-only changeNo code logic modifiedNo unsafe blocks added
6e555fa2by Matt Corallo+11−01 file
No security note in commit
High 70 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Make custom signers verify holder commitment sigs synchronously' (#5616)

This commit hardens how Lightning Dev Kit handles custom signing modules. Previously, LDK relied on each custom signer to check that the other party's signatures on a holder commitment transaction were valid. The change adds a ready-made v…

New synchronous signature-verification helper for holder commitment transactionsTrait documentation now mandates verification before Ok(()) because LDK acts immediatelyInMemorySigner now validates that holder funding key belongs to signer before signature checks
0e3b6d33by Matt Corallo+324−954 files
Vendor flagged security relevance
Moderate 64 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse channel_ready while the initial funding_signed is pending' (#5612)

This update fixes a corner case in the Lightning Dev Kit where a node could get confused if it received a 'channel_ready' message while still waiting for its own signer to produce the first commitment signature. The patch makes the node re…

State-machine confusion between funding_signed and channel_ready in async signer flowPremature channel_ready could advance counterparty_next_commitment_point before initial commitment is signedPatch closes channel rather than allowing inconsistent commitment state
d68d2235by Matt Corallo+101−12 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-priorityMerge PR 'Respect default fee limit when paying static invoices' (#5558)by Matt Corallo · 945199b0 · Nov 11, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Respect default fee limit when paying static invoices' (#5558)

from val/2026-10-async-pmt-fee-limit into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5558
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
Lower-priorityIgnore push_msat balances on closed unfunded inbound channelsby auto-pr-bot · 5dec7704 · Nov 11, 2026 · 2 filesMessage 95 · StrongTriage 0Details
Commit message · auto-pr-bot

Ignore push_msat balances on closed unfunded inbound channels

As reported by Anthropic's OSS Scanner (ANT-2026-03R3IMY1), as quoted in
the issue by @tnull:

> A peer with no channel to an LDK node, spending nothing on-chain, can
> make the node keep an unbounded number of `ChannelMonitor`s that are
> never archived. It does this by repeatedly opening an inbound V1
> channel with `push_msat` at or above the node's 354 sat dust limit,
> sending `funding_created`, never broadcasting the funding transaction,
> and closing with `error`. Each leaked monitor is about 6.8 KB. It is
> persisted, held in memory, reloaded at start-up, rewritten in full
> through `Persist::update_persisted_channel` on every block, and raises
> a `BumpTransaction::ChannelClose` event on every block and every
> `rebroadcast_pending_claims` tick. There is no public API to remove
> these monitors. No funds are at risk.

@wpaulino asked:

> @auto-pr-bot open a PR to fix this issue with the suggestion provided.
> Include in the commit message that this was reported by Anthropic's
> OSS Scanner, as ANT-2026-03R3IMY1.

A monitor for an inbound channel closed without any state update whose
funding never appeared is only archived when it reports no claimable
balances. Because the pushed amount shows up as our balance on the
initial holder commitment transaction, a push above our dust limit kept
the monitor alive forever, letting a peer leave behind one monitor per
open/funding_created/error round with no bound.

Extend the condition that omits the primary balance for such monitors to
also cover a non-zero push: for an inbound V1 channel we contributed
nothing, so the only balance is the counterparty's push, which exists
only if they broadcast the funding transaction after we already closed
the channel. Outbound channels (our own funds), dual-funded inbound
channels (we may have contributed inputs), and monitors written before
`funding_seen_onchain` existed (which default it to true on read) are
unaffected. The trade-off, which the earlier fix already contemplated,
is that a push is forfeited if the funding transaction only confirms
after the channel was closed and the monitor was archived; we never held
those funds.

Raise the push in test_channel_conf_timeout above the dust limit so the
test covers the non-zero-balance case; it fails without the fix.

Requested-by: @wpaulino
Authored-By: matt/GLM-5.3-Flash-GGUF:Q4_K_XL <goose@users.noreply.local>

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
AI review queuedMerge PR 'Preserve conflicting output watches' (#5557)by Matt Corallo · e68ee7d2 · Nov 11, 2026 · 4 filesMessage 81 · StrongModerate 61Details
Commit message · Matt Corallo

Merge PR 'Preserve conflicting output watches' (#5557)

from tnull/2026-10-preserve-output-watches into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5557
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 61/100

This change fixes a bug in how the Lightning Dev Kit's transaction-sync clients (Electrum and Esplora) keep track of watched Bitcoin outputs. Previously, if the same output was registered more than once with different script pubkeys (for example, one real and one bogus), the later registration would overwrite the earlier one. This could cause the client to stop monitoring the real output, potentially missing when it is spent on-chain. The fix stores all registered script pubkeys for each output instead of keeping only the last one, so no conflicting watch can hide a legitimate spend.

Security candidateMerge PR 'Handle claim replay for payments which reused a payment hash' (#5541)by Matt Corallo · 55ce2abd · Nov 10, 2026 · 3 filesMessage 81 · StrongModerate 58Details
Commit message · Matt Corallo

Merge PR 'Handle claim replay for payments which reused a payment hash' (#5541)

from 2026-11-reused-payment-claim-replay into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5541
Reviewed-by: Val Wallace <val@noreply.git.rust-bitcoin.org>

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
boot or update pathmerge-commit duplicate discount
AI analysis · Moderate 58/100

This commit fixes a bug in the Lightning Dev Kit where the node could confuse two different payments that reused the same payment hash. Previously, completing an old multi-part payment could incorrectly trigger a 'payment received' event for a newer payment, or a restart could fail to replay all owed 'payment received' events. The fix tags each completion action with the payment's unique internal ID so events are only generated for the correct payment.

Lower-priorityRemove stale monitor updates in parallel batchesby auto-pr-bot · b839477b · Nov 10, 2026 · 1 fileMessage 76 · AdequateTriage 0Details
Commit message · auto-pr-bot

Remove stale monitor updates in parallel batches

@matt has asked in lightningdevkit/rust-lightning#5542:

the cleanup_stale_updates_for_monitor_to method in `persist.rs` may
remove many updates at once but currently does so entirely serially.
This may be a substantial performance hit for nodes with async stores,
so please make it operate in parallel, removing in batches of up to 50
removes at a time.

The stale updates are now collected first and removed via
`MultiResultFuturePoller` in batches of up to 50 concurrent removes,
matching the pattern already used when loading monitor updates. Bounding
the batch size keeps a single monitor with a large backlog of stale
updates from issuing an unbounded number of concurrent removes at the
store. As before, the first failing remove aborts the cleanup, though
removes within a batch may still complete concurrently before the error
is observed.

Fixes #5542

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/issues/5542
Authored-By: matt/GLM-5.3-Flash-GGUF:Q4_K_XL <goose@users.noreply.local>

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Lower-priorityMerge PR 'Reject inbound channel acceptance when its ID is already in use' (#5545)by Matt Corallo · 1f220a7a · Nov 10, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Reject inbound channel acceptance when its ID is already in use' (#5545)

from auto-pr-bot/bot/234-preserve-funded-channels-when-ac-842b22 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5545
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
AI review queuedMerge PR 'Don't panic on splice txs confirming with empty witnesses' (#5536)by Matt Corallo · 088c6840 · Nov 10, 2026 · 1 fileMessage 81 · StrongModerate 57Details
Commit message · Matt Corallo

Merge PR 'Don't panic on splice txs confirming with empty witnesses' (#5536)

from 2026-11-funding-splice-panic into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5536
Reviewed-by: jkczyz <jkczyz@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Moderate 57/100

This patch fixes a crash (panic) in the Lightning Dev Kit's channel handling code. Previously, the code assumed that any outbound funding transaction was built by the user, and it would panic if the transaction had an empty witness. Splice transactions are also outbound but are built internally, so the old assumption was wrong. The fix adds a check to only panic for user-built funding transactions, and instead return a normal processing error for internally-built splice transactions that don't match expectations.

Lower-priorityMerge PR 'Remove stale updates when archiving and at monitor load' (#5540)by Matt Corallo · 3295945e · Nov 10, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Remove stale updates when archiving and at monitor load' (#5540)

from auto-pr-bot/bot/255-archived-monitor-s-stale-updates-f2e12c into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5540
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
Security candidateHandle claim replay for payments which reused a payment hashby Matt Corallo · c2020bca · Nov 10, 2026 · 3 filesMessage 85 · StrongModerate 66Details
Commit message · Matt Corallo

Handle claim replay for payments which reused a payment hash

A payment hash may be paid, and claimed, more than once, leaving
several claims for it in a `ChannelMonitor`. On `ChannelManager` load
we replayed such claims matching them against `claimable_payments`
and `pending_claiming_payments` only by payment hash. As a result:

* if the first replayed claim's `PaymentClaimed` was delayed (the
channel was closed or had a `ChannelMonitorUpdate` in flight), the
second claim's replay found its `pending_claiming_payments` entry
and `ChannelManager::read` failed on every startup,
* a different, unclaimed, payment with the same payment hash was
dropped from `claimable_payments` and reported as claimed without
its HTLCs being claimed.

Because a replayed claim is durably in a `ChannelMonitor`, and thus
replayed again on the next startup, we don't need to wait on its
`ChannelMonitorUpdate`s to generate the `PaymentClaimed`. Thus, we
now generate it immediately and no longer track replayed claims in
`pending_claiming_payments`. We also only drop a payment from
`claimable_payments` if it shares an HTLC with the replayed claim,
i.e. it is a stale copy of the claimed payment.

Further, `MonitorUpdateCompletionAction::PaymentClaimed` identified
its payment only by payment hash, so an action completing after a
different payment with the same payment hash began being claimed
generated that payment's `PaymentClaimed` before its preimage was
durable. It now carries the claim's `PaymentId` and only generates
the event for a matching payment.

Note that a `ChannelManager` reloaded again before its startup
`ChannelMonitorUpdate`s complete now generates another redundant
preimage update for each closed channel in a replayed claim.

Thanks to Erick Cestari for reporting this issue.

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

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
boot or update path
AI analysis · Moderate 66/100

This commit fixes a bug in LDK (a Lightning Network implementation in Rust) where the same payment hash could be used for multiple payments. On restart, the software could either crash repeatedly or incorrectly mark a different, unclaimed payment as already claimed. The fix makes sure each payment is tracked by its unique ID, not just by its payment hash, so claims are replayed correctly after a restart.

Lower-priorityMerge PR 'Reject zero-value variable-payment retries before LSPS2 fee splitting' (#5538)by Matt Corallo · acc6169d · Nov 10, 2026 · 3 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Reject zero-value variable-payment retries before LSPS2 fee splitting' (#5538)

from auto-pr-bot/bot/202-reject-zero-value-variable-payme-82055c into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5538
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
AI review queuedDon't panic on splice txs confirming with empty witnessesby Matt Corallo · e80e5653 · Nov 10, 2026 · 1 fileMessage 73 · AdequateModerate 60Details
Commit message · Matt Corallo

Don't panic on splice txs confirming with empty witnesses

When a funding transaction of an outbound channel confirms, we do
some sanity-checks and panic if it appears the user used an unsafe
funding transaction. Sadly, we retained these panics for outbound
channels when a splice funding confirms, which is incorrect as our
counterparty may have added the inputs we're looking at.

Thanks to Erick Cestari for reporting this issue.

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

This fix stops a Lightning node from crashing when a special type of channel upgrade transaction called a 'splice' confirms on the Bitcoin blockchain. Before the fix, the node would panic and shut down because it wrongly applied a safety check meant for regular outbound channels to splice transactions, where the other party may have supplied inputs. A malicious or buggy counterparty could potentially trigger this panic, causing a denial of service by crashing the victim's node.

Lower-priorityMerge PR 'Skip MPP claim replay parts whose ChannelMonitor was archived' (#5528)by Matt Corallo · 61c665ea · Nov 10, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Skip MPP claim replay parts whose ChannelMonitor was archived' (#5528)

from auto-pr-bot/bot/253-mpp-claim-replay-panics-on-every-f57184 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5528
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
AI review queuedMerge PR 'Reject closing_signed while a fee update remains pending' (#5533)by Matt Corallo · dd658f22 · Nov 10, 2026 · 2 filesMessage 81 · StrongModerate 60Details
Commit message · Matt Corallo

Merge PR 'Reject closing_signed while a fee update remains pending' (#5533)

from tankyleo/leo/2026-10-panic-on-closing-signed into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5533
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Moderate 60/100

This change fixes a bug in the Lightning Dev Kit where a Bitcoin Lightning channel could panic (crash) if a 'closing_signed' message was processed while a fee update was still pending. The fix rejects such messages and closes the channel gracefully instead of crashing. The test names and code confirm the previous behavior could cause a panic.

AI review queuedMerge PR 'Drop accepted closing_signed state on peer disconnection' (#5532)by Matt Corallo · 87c2743c · Nov 10, 2026 · 2 filesMessage 81 · StrongModerate 59Details
Commit message · Matt Corallo

Merge PR 'Drop accepted closing_signed state on peer disconnection' (#5532)

from auto-pr-bot/bot/223-preserve-accepted-closing-signat-87d4ef into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5532
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Moderate 59/100

This patch fixes a state-handling bug during Lightning channel close negotiations. If a user's signing device was slow or offline and the peer disconnected in the middle, the node could later combine an old accepted fee with a freshly proposed fee, potentially broadcasting an unintended closing transaction. The fix clears the stale 'closing_signed' state when the peer reconnects, forcing the negotiation to restart cleanly.

Lower-priorityMerge PR 'Classify HTLC timeout claims with nonempty witness selectors' (#5531)by Matt Corallo · eab5ac13 · Nov 10, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Classify HTLC timeout claims with nonempty witness selectors' (#5531)

from auto-pr-bot/bot/239-htlcclaim-misses-valid-timeout-w-58180a into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5531
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
Security candidateMerge PR 'Ignore duplicate announcement_signatures' (#5529)by Matt Corallo · 977c0cb1 · Nov 10, 2026 · 2 filesMessage 81 · StrongModerate 52Details
Commit message · Matt Corallo

Merge PR 'Ignore duplicate announcement_signatures' (#5529)

from auto-pr-bot/bot/207-bound-channel-handler-gossip-que-30dc42 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5529
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
signing boundarymerge-commit duplicate discount
AI analysis · Moderate 52/100

This change prevents a Lightning node from repeatedly broadcasting the same channel announcement if a peer keeps replaying a specific protocol message (announcement_signatures). Before the fix, a malicious or buggy peer could make the node generate and flood fresh channel_announcement broadcasts, wasting bandwidth and gossip buffer space across the network. The patch adds a flag so only the first processed announcement_signatures triggers a broadcast, with one deliberate exception after a node restart to preserve reliability.

Lower-priorityMerge PR 'Strictly limit in-flight gossip validations to 32' (#5526)by Matt Corallo · 099ba194 · Nov 10, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Strictly limit in-flight gossip validations to 32' (#5526)

from auto-pr-bot/bot/246-more-strictly-limit-gosip-valida-eaeb81 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5526
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
Lower-priorityMerge PR 'Gate zero-conf splice test helper behind cfg(test)' (#5523)by Matt Corallo · dbb82df9 · Nov 9, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Gate zero-conf splice test helper behind cfg(test)' (#5523)

from bot/5521-ci-failing-035a2d into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5523
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-priorityMerge PR 'Broadcast JIT funding despite failed held forwards' (#5524)by Matt Corallo · 34d508a9 · Nov 9, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Broadcast JIT funding despite failed held forwards' (#5524)

from benthecarman/lsps2-broadcast-despite-stale-htlc into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5524
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
Lower-priorityMerge PR 'Polish LSPS2 OpenChannel docs and drop redundant serialization tests' (#5499)by Matt Corallo · c99cf6f6 · Nov 9, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Polish LSPS2 OpenChannel docs and drop redundant serialization tests' (#5499)

from bot/5274-carry-negotiated-client-to_self_-50781d into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5499
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Security candidateMerge PR 'Include recovery ID in invoice signature ordering' (#5516)by Matt Corallo · 5653142a · Nov 6, 2026 · 1 fileMessage 86 · StrongLow 42Details
Commit message · Matt Corallo

Merge PR 'Include recovery ID in invoice signature ordering' (#5516)

from tankyleo/leo/ord-bolt11invoicesignature into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5516
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarymerge-commit duplicate discount
AI analysis · Low 42/100

This change fixes how Lightning invoices are sorted when they contain signatures. Previously, two invoices that differed only by their 'recovery ID' (a small extra number attached to a signature) were treated as equal during sorting. That could cause inconsistent ordering, duplicate entries, or subtle logic bugs in code that relies on sorted invoice collections. The patch now includes the recovery ID in the comparison so signatures are ordered correctly and consistently.

Lower-priorityMerge PR 'Count pending UTXO lookup states toward gossip backpressure' (#5511)by Matt Corallo · b43b2369 · Nov 6, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Count pending UTXO lookup states toward gossip backpressure' (#5511)

from auto-pr-bot/bot/209-same-scid-churn-bypasses-async-u-b03e6e into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5511
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
AI review queuedMerge PR 'Return an empty witness for P2A anchor inputs' (#5510)by Matt Corallo · 6a70008b · Nov 6, 2026 · 1 fileMessage 81 · StrongLow 33Details
Commit message · Matt Corallo

Merge PR 'Return an empty witness for P2A anchor inputs' (#5510)

from auto-pr-bot/bot/184-anchordescriptor-returns-non-sta-5472ff into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5510
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Low 33/100

This commit fixes how a specific type of Bitcoin transaction input (used in fee-bumping anchors) builds its witness data. Previously it created a witness containing a single empty element; now it creates a truly empty witness. The change is subtle but important because Bitcoin consensus rules treat these two forms differently for a new output type (P2A). The included test confirms the witness is now empty.

Lower-priorityMerge PR 'Saturate the gossip backfill cursor on max short_channel_id' (#5509)by Matt Corallo · a66b819e · Nov 6, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Saturate the gossip backfill cursor on max short_channel_id' (#5509)

from auto-pr-bot/bot/224-max-scid-gossip-announcement-wra-1e52fc into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5509
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount
Lower-priorityMerge PR 'Remove stale Sleeper callbacks after another future wakes' (#5508)by Matt Corallo · 4f9bf606 · Nov 6, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Remove stale Sleeper callbacks after another future wakes' (#5508)

from auto-pr-bot/bot/185-remove-stale-sleeper-callbacks-a-17d33e into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5508
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

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
merge-commit duplicate discount