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
174commits · 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 34 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 'Document payment preimage logging policy for reviewers' (#5081)by Matt Corallo · dc9084f8 · Oct 7, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Document payment preimage logging policy for reviewers' (#5081)

from codex/reviewer-logging-guidance into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5081
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
documentation-only discountmerge-commit duplicate discount
Lower-priorityDocument sensitive logging policy for reviewersby Joost Jager · 75872be2 · Oct 6, 2026 · 2 filesMessage 68 · AdequateTriage 0Details
Commit message · Joost Jager

Document sensitive logging policy for reviewers

Limit loading of reviewer-specific guidance to code reviews and
document which payment information may be logged versus secrets that
could still put on-chain funds at risk.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
Lower-priorityMerge PR '#4491 Persistent `MonitorEvent`s follow-up' (#5038)by Matt Corallo · 5a1a2885 · Oct 6, 2026 · 8 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR '#4491 Persistent `MonitorEvent`s follow-up' (#5038)

from 2026-09-persistent-mon-evs-followup into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5038
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 'Disable Nagle's algorithm in net-tokio' (#5066)by Matt Corallo · 15c5d9b8 · Oct 4, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Disable Nagle's algorithm in net-tokio' (#5066)

from bot/5065-disable-nagle-s-algorithm-in-net-d9c681 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5066
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 'Disable Nagle's algorithm in net-tokio' (#5065)by Matt Corallo · 5637d50a · Oct 3, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Disable Nagle's algorithm in net-tokio' (#5065)

from net-tokio-nodelay into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5065
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 'Add 0.2.7 and 0.1.13 changelogs' (#5064)by Matt Corallo · 37504994 · Oct 3, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Add 0.2.7 and 0.1.13 changelogs' (#5064)

from 2026-10-forward-port-relnotes into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5064
Reviewed-by: tankyleo <tankyleo@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
documentation-only discountmerge-commit duplicate discount
Lower-priorityRemove the comment above set_nodelay in net-tokioby auto-pr-bot · ac7bd7b4 · Oct 3, 2026 · 1 fileMessage 76 · AdequateTriage 0Details
Commit message · auto-pr-bot

Remove the comment above set_nodelay in net-tokio

@matt asked:

> This really doesn't need a comment, the code is obvious. @auto-pr-bot
> please drop

The reasoning for setting TCP_NODELAY lives in the commit message of the
change which added the call, so the in-code comment only restated what
the code already says.

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5066#issuecomment-449036

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Lower-priorityDisable Nagle's algorithm in net-tokioby Erick Cestari · bf129983 · Oct 3, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Erick Cestari

Disable Nagle's algorithm in net-tokio

`PeerManager` already batches outbound messages, so Nagle's algorithm
only adds latency: a small message is held until the peer ACKs our
previous segment, which Linux delays by up to 40ms when the peer has
nothing to send back. E.g. a `pong` queued right after a
`channel_update` waits on the delayed ACK of the `channel_update`.

Here we set `TCP_NODELAY` on every connection, as CLN, Eclair and LND
already do.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityAdd 0.2.7 and 0.1.13 changelogsby Matt Corallo · 3af108cd · Oct 2, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · Matt Corallo

Add 0.2.7 and 0.1.13 changelogs

This is a forward port of cf025a6e8823465168878861d324f895b40e3604,
a212216e6994cddde3762ca05dc627726bb4524d,
9823244c0442f33d814d00928577896c44eec469,
a91a2427179ff30b74f7418f13e74f06db609792,
a1df0adcba0c864169b195d6e5e9825743d9f2fc, and
072d307c500a779c126c2a4ccb7b24252b4aa56b.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
documentation-only discount
Lower-priorityMerge PR 'Reject acknowledged commitment rollbacks' (#5057)by Matt Corallo · d9aa340f · Oct 2, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Reject acknowledged commitment rollbacks' (#5057)

from 2026-10-elias-fix into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5057
Reviewed-by: benthecarman <benthecarman@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 'Fail held HTLC failures when force-closing' (#5050)by Matt Corallo · e8c3f656 · Oct 1, 2026 · 6 filesMessage 81 · StrongModerate 60Details
Commit message · Matt Corallo

Merge PR 'Fail held HTLC failures when force-closing' (#5050)

from fail-back-htlc-fc into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5050
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
boot or update pathmerge-commit duplicate discount
AI analysis · Moderate 60/100

This commit fixes a bug in the Lightning Dev Kit where a forwarded payment could get permanently stuck if a channel was force-closed at exactly the wrong moment. Normally, when the next node in a route rejects a payment, that rejection is held back briefly until the channel state is fully updated. If the channel was force-closed while that rejection was still held back, the rejection could be lost and the payment would never be failed backwards to the sender. The fix hands those held-back failures to the channel's on-chain monitor so they are released once the monitor is updated, preventing stuck payments.

Lower-priorityMerge PR 'Hold back HTLC monitor events while updates are in-flight' (#5047)by Matt Corallo · 75d33476 · Oct 1, 2026 · 3 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Hold back HTLC monitor events while updates are in-flight' (#5047)

from 2026-09-hold-back-non-htlc-evs into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5047
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 'Credit remote HTLC fulfills on remote HTLC adds' (#5043)by Matt Corallo · 0645450a · Oct 1, 2026 · 3 filesMessage 81 · StrongModerate 59Details
Commit message · Matt Corallo

Merge PR 'Credit remote HTLC fulfills on remote HTLC adds' (#5043)

from 2026-09-credit-htlc-fulfills into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5043
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 commit fixes how Lightning channels account for money that is about to be freed up when a payment succeeds or fails. Previously, the code could incorrectly let a node spend funds that were not yet actually available, or conversely block legitimate spending. The change makes the balance projection aware of whose turn it is in the commitment dance, so that incoming HTLC fulfillments are credited to the peer's available balance only when appropriate. New tests verify both the bug scenarios and the corrected behavior.

Security candidateFail held HTLC failures when force-closingby elnosh · bfc96786 · Oct 1, 2026 · 6 filesMessage 68 · AdequateModerate 68Details
Commit message · elnosh

Fail held HTLC failures when force-closing

When our counterparty fails an HTLC, the failure is held until the
ChannelMonitorUpdate for their revoke_and_ack completes. If the channel
is force-closed while that update is in-flight, the held failure was
dropped with the Channel. As the ChannelMonitor had already applied the
revocation, the HTLC was in no commitment transaction it tracks either,
so it was never failed, eventually causing a force-close.

Instead, include the held failures in the ChannelForceClosed update and
have the ChannelMonitor fail them via a MonitorEvent::HTLCEvent when
applying it. HTLC monitor events are only released once all updates
have been persisted, so the failure is only acted on once the
revocation is durable.

HTLCs which are still in a commitment transaction the ChannelMonitor
tracks are skipped. This is the case if the update for the revocation
was blocked rather than in-flight, and thus dropped on close, in which
case the counterparty can still claim the HTLC on-chain. Such HTLCs are
resolved like any other HTLC the ChannelMonitor tracks.

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

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
boot or update path
AI analysis · Moderate 68/100

This commit fixes a bug in the Lightning Dev Kit where a forwarded payment failure could get permanently lost if a channel was force-closed at exactly the wrong moment. Previously, when the other side of a channel told us an HTLC (a conditional payment) had failed, that failure was temporarily held until a channel-state update finished. If the channel was force-closed while that update was still in flight, the held failure was discarded. Because the payment was also no longer in any on-chain commitment transaction the node watches, it would never be failed backwards or forwards, eventually causing another force-close. The fix hands those held failures to the ChannelMonitor as part of the force-close update, so they are properly failed once the relevant state updates are durably persisted.

Security candidateMerge PR 'Drop since-applied blocked monitor updates before the stale-channel check' (#5046)by Matt Corallo · 49ed7c35 · Oct 1, 2026 · 2 filesMessage 81 · StrongModerate 64Details
Commit message · Matt Corallo

Merge PR 'Drop since-applied blocked monitor updates before the stale-channel check' (#5046)

from drop-applied-blocked-mon-updates into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5046
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
boot or update pathmerge-commit duplicate discount
AI analysis · Moderate 64/100

This patch fixes a bug in the Lightning Dev Kit's channel startup logic. Previously, if a user's ChannelManager state was older than their ChannelMonitor, the code would force-close the channel and incorrectly fail backwards (cancel) any HTLCs that were added in a monitor update that had already been applied. The fix drops those already-applied blocked updates before doing the stale check, so HTLCs the counterparty is already committed to are not wrongly canceled. This could have caused payment failures or loss of funds in edge cases involving stale backups.

Lower-priorityMerge PR 'Fix some bugs the LSPS2 JIT flow' (#5042)by Matt Corallo · d117befb · Oct 1, 2026 · 4 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Fix some bugs the LSPS2 JIT flow' (#5042)

from 2026-09-fix-lsps2-jit into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5042
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 'Drop option_scid_alias note from ChannelHandshakeConfig docs' (#5040)by Matt Corallo · a9015759 · Oct 1, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Drop option_scid_alias note from ChannelHandshakeConfig docs' (#5040)

from bot/5035-drop-fallback-note-from-channelh-7d72c7 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5040
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-priorityDrop option_scid_alias note from ChannelHandshakeConfig docsby auto-pr-bot · ed01f564 · Oct 1, 2026 · 1 fileMessage 91 · StrongTriage 0Details
Commit message · auto-pr-bot

Drop option_scid_alias note from ChannelHandshakeConfig docs

@matt asked:

> No, I don't see a reason to have this paragraph here at all - this is
> a config struct, documenting default-negotiated features is not
> something we should be doing here. @auto-pr-bot please fix.

Which channel types get negotiated is not something a caller sets here,
so the paragraph described behaviour rather than the configuration the
struct holds. Where the negotiated-by-default behaviour matters to
callers - replacing the removed `negotiate_scid_privacy` option - it is
already covered by `pending_changelog/default-scid-privacy.txt`, which
is left as-is.

Doc-comment only; no behaviour, API, or test changes.

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5035#issuecomment-448079

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
Lower-priorityRename ChannelMonitor::get_and_clear_pending_monitor_eventsby Valentine Wallace · 26ddc8df · Sep 30, 2026 · 2 filesMessage 63 · AdequateTriage 0Details
Commit message · Valentine Wallace

Rename ChannelMonitor::get_and_clear_pending_monitor_events

Monitor events are retained until they're acked rather than cleared when
they're returned, so the old name is misleading. Rename it to match
chain::Watch::release_pending_monitor_events.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
Security candidateRevert "Pass entropy source when queueing monitor event"by Valentine Wallace · 8f793eb7 · Sep 30, 2026 · 7 filesMessage 78 · AdequateInformational 19Details
Commit message · Valentine Wallace

Revert "Pass entropy source when queueing monitor event"

This reverts commit 6798ec9406e3f7dc7247e7423637c8d9ed98ace3.

We previously used the entropy source to generate random monitor event IDs, but
have since started generating the IDs deterministically.

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
entropy or randomness
AI analysis · Informational 19/100

This commit is a straightforward code cleanup: it removes an unused 'entropy source' argument that was previously passed around when creating monitor events. The project now generates those event IDs deterministically, so the randomness source is no longer needed. There is no indication this fixes a security bug; it is an API simplification and refactoring change.

Security candidateRevert "ChainMonitor::_entropy_source -> ::entropy_source"by Valentine Wallace · e0c0bcdd · Sep 30, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Valentine Wallace

Revert "ChainMonitor::_entropy_source -> ::entropy_source"

This reverts commit 721265b34802956e6c34f8b4f8c36b772a812044.

We previously used the entropy source to generate random monitor event IDs, but
have since started generating the IDs deterministically.

68/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
entropy or randomness
AI analysis · Informational 15/100

This commit simply renames a field inside the ChainMonitor struct from `entropy_source` back to `_entropy_source`. The leading underscore is a Rust convention meaning 'this field is intentionally unused.' The commit message explains the field is no longer needed for generating random monitor event IDs because those IDs are now created deterministically. The entropy source is still used in one peer-storage feature path, so it is kept in the struct but marked as mostly unused. There is no security bug being fixed here—this is a code cleanup/revert of a previous naming change.

Lower-priorityDerive MonitorEvent IDs deterministicallyby Valentine Wallace · ffa77a84 · Sep 30, 2026 · 2 filesMessage 75 · AdequateTriage 0Details
Commit message · Valentine Wallace

Derive MonitorEvent IDs deterministically

MonitorEvent IDs were originally implemented as random. This was broken because
ChannelMonitors may not be persisted on each block, so if a block was connected
to a monitor and generated monitor events that were surfaced to the
ChannelManager, that block may need to be reconnected later and would then
surface the same monitor events but with different ids.

For context, an upcoming version of LDK (say, 0.6) will rely on monitor events
to drive all off- and on-chain HTLC resolution. For outbound payments, this
means guaranteeing that for every payment, a Payment{Sent,Failed} event is
surfaced and the user processes it.

So this previous implementation could lead to a missing Payment{Sent,Failed}
in the following scenario:

1. Send an outbound payment on 0.4
2. Receive preimage on-chain from a block -> surface MonitorEvent::HTLCEvent {
id: X } (monitor not persisted)
3. Process monitor event X, generate PaymentSent with EventCompletionAction {
ack_monitor_event: X } (PaymentSent not processed yet)
4. Restart, monitor last persisted prior to receiving the preimage on-chain
5. Monitor processes the same block again -> surface duplicate
MonitorEvent::HTLCEvent { id: Y }
6. Process monitor event Y, ack it immediately because X is already cached with
PaymentSent
7. Restart on 0.6 with a stale manager that forgot the payment --> neither X or
Y replay and PaymentSent is lost

As such, here we begin setting monitor event IDs deterministically so the same
block replay will result in the same IDs for any resulting monitor events.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

75/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Lower-priorityRemove destructure-and-reallocate for monitor event serby Valentine Wallace · b7298efd · Sep 29, 2026 · 1 fileMessage 50 · ThinTriage 0Details
Commit message · Valentine Wallace

Remove destructure-and-reallocate for monitor event ser

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Lower-priorityDocument version in new pending_monitor_events serby Valentine Wallace · 0b11c86c · Sep 29, 2026 · 1 fileMessage 50 · ThinTriage 0Details
Commit message · Valentine Wallace

Document version in new pending_monitor_events ser

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Lower-priorityUpdate outdated docs for persistent monitor eventsby Valentine Wallace · f223e269 · Sep 29, 2026 · 2 filesMessage 50 · ThinTriage 0Details
Commit message · Valentine Wallace

Update outdated docs for persistent monitor events

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