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 24 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-priorityBump the CI rustfmt task to 1.85by auto-pr-bot · 15a8494c · Oct 17, 2026 · 4 filesMessage 98 · StrongTriage 5Details
Commit message · auto-pr-bot

Bump the CI rustfmt task to 1.85

@matt asked:

> @auto-pr-bot we're planning on bumping MSRV to 1.85 sooner or later
> anyway, and in the mean time you're wasting tokens figuring out why
> there's diff on rustfmt when you run it on the whole tree. Please bump
> the forgejo build.yml rustfmt task to 1.85 and re-format the codebase
> with rustfmt 1.85.

The Forgejo and GitHub workflows carry the same rustfmt job and are kept
in lockstep, so both are bumped; the following commit re-formats the
tree with 1.85, which would otherwise leave the GitHub job failing its
check. Only the formatting check moves -- the MSRV build, fuzz-sanity
and tor-connect jobs stay on 1.75, as does the `cargo +1.75.0 test`
instruction in CLAUDE.md.

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

98/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
fuzzing or regression evidence
AI review queuedReject serializing blinded paths with more than 255 hopsby auto-pr-bot · ecfcd267 · Oct 16, 2026 · 1 fileMessage 100 · StrongModerate 58Details
Commit message · auto-pr-bot

Reject serializing blinded paths with more than 255 hops

`BlindedPath::write` narrowed the hop count from `usize` to `u8` without
checking it was representable, so a path with 256 or more hops was
serialized as a wrapped `num_hops` byte followed by every hop body. In
BOLT12 fields that concatenate `...*blinded_path` values without
per-path framing, the trailing hop bodies remain inside the signed TLV
value and may be interpreted as additional paths or make the signed
offer/invoice unparsable.

We don't return an error here because it cannot propagate through TLV
encoding: `_encode_tlv!` computes each field's `serialized_length` up
front via an infallible writer, so a `BlindedPath` with too many hops
would panic there rather than surface the error. Instead we
debug-assert the invariant and, in release builds, cap the write at 255
hops so the trailing bodies are dropped rather than corrupting the
enclosing TLV value.

@val asked:

> @auto-pr-bot please open a PR that addresses this issue. No need for a
> test, just `try_into` when converting the blinded hops length to a u8
> on the write side.

and, on the erroring approach:

> @auto-pr-bot the review bot is right. Instead, we should
> `debug_assert` that we're not writing more than `u8::MAX` hops here,
> and only write up to 255 hops.

Fixes #5152

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

100/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✓ Links an issue, advisory, or supporting reference
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 58/100

This commit fixes a serialization bug in the way secret routing paths (blinded paths) are written to data messages. Previously, if a path had 256 or more hops, the hop count was silently truncated to fit in a single byte, causing the remaining hop data to spill into the next part of the message. That could corrupt offers/invoices or make them unparseable. The fix caps the written hops at 255 and adds a debug-only assertion to catch the condition during development.

Lower-priorityStop processing peer messages when their outbound buffer grows too largeby auto-pr-bot · 9c1538a7 · Oct 15, 2026 · 1 fileMessage 98 · StrongTriage 0Details
Commit message · auto-pr-bot

Stop processing peer messages when their outbound buffer grows too large

A peer can send a stream of tiny messages which each cause us to queue
several large messages back at it, growing our outbound buffer for that
peer arbitrarily large. To avoid such a bug ever allowing unbounded
memory growth, after handling each message check the size of the peer's
outbound buffer and, if it exceeds
`OUTBOUND_BUFFER_SIZE_LIMIT_STASH_READS` (i.e.
`OUTBOUND_BUFFER_SIZE_LIMIT_DROP_GOSSIP * 8`, or 1 MiB, a limit
intentionally set high enough that we should never hit it in practice),
stash any remaining read bytes for the peer instead of processing them,
until `process_events` finds space again. While read bytes are stashed
we also pause reads from the peer.

Because `process_events` processes the stashed bytes itself, a marker is
kept on the peer while doing so which keeps reads paused and defers any
bytes the socket driver delivers anyway into the stash. This ensures
reads for a given peer are only ever processed serially, as
`PeerManager` requires, regardless of which thread drives the reads.

@matt asked:

> @auto-pr-bot project loupe reported several instances where a peer can
> send a lot of tiny messages and get us to queue a handful of large
> messages back. None of them were security-critical in that they could
> result in us allocating enough memory that any real clients would
> actually OOM, but I'm somewhat worried that we'll end up accidentally
> introducing such a bug in the future. Instead, please implement logic
> to queue, inside `PeerManager` pending read bytes from a peer that we
> decline to process. After processing each message, check how big our
> buffer of outgoing messages is for the peer and if it grows too large,
> stash the pending read bytes rather than processing them until we have
> more space to handle them, in `process_events`. Use a size limit of
> the outbound buffer of `OUTBOUND_BUFFER_SIZE_LIMIT_DROP_GOSSIP * 8`
> (i.e. 1 MiB) to avid ever hitting this logic in practice.

Fixes #5147

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

98/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Lower-priorityMerge PR 'Apply a one-hop blinded path's CLTV expiry delta' (#5126)by Val Wallace · e3439aa8 · Oct 13, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Val Wallace

Merge PR 'Apply a one-hop blinded path's CLTV expiry delta' (#5126)

from one-hop-blinded-cltv into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5126
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
merge-commit duplicate discount
Security candidateMerge PR 'Avoid overflow when averaging liquidity offsets in merge' (#5208)by Matt Corallo · ca77cdfa · Oct 13, 2026 · 1 fileMessage 86 · StrongLow 48Details
Commit message · Matt Corallo

Merge PR 'Avoid overflow when averaging liquidity offsets in merge' (#5208)

from bot/5121-unchecked-u64-addition-in-channe-326b73 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5208
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
memory safetymerge-commit duplicate discount
AI analysis · Low 48/100

This patch fixes an arithmetic overflow bug in rust-lightning's payment-path scoring logic. When the software merged two stored estimates of a Lightning channel's available liquidity, it added two large 64-bit numbers together and then divided by two to get an average. If both numbers were near the maximum a u64 can hold, the addition would overflow and wrap around, producing a tiny, wrong average. The fix computes the average safely by dividing each number first, then adding. The commit message and new test explicitly describe this as an overflow risk, especially when data is loaded from disk or untrusted external sources.

Lower-priorityRework async gossip UTXO validation around one lookup per SCIDby Matt Corallo · 5abeb492 · Oct 13, 2026 · 3 filesMessage 73 · AdequateTriage 0Details
Commit message · Matt Corallo

Rework async gossip UTXO validation around one lookup per SCID

The async gossip UTXO validation queueing and pending-message
management logic was substantially overcomplicated. This has led
to many bugs and LLMs complaining about all kinds of edge-cases
(most of which don't matter all that much, but in sum they're
worth fixing).

Here we replace the complicated tracking of in-flight messages
with a two simple maps and a stack of messages to process later.
Per-SCID, instead of trying to keep exactly the messages we'll
apply if its valid, we just keep one pending future and all the
messages related to that SCID. This way if a peer sends us a
bogus message for a channel while we're validating its UTXO
we'll still process the legitimate one from another peer. We
then track node announcements separately in their own map.

Once we do this we have to limit the number of pending gossip
messages in addition to the number of pending lookups, but this
trivially fits into our existing limiting framework.

Assisted-By: Claude Fable 5.1

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityMerge PR 'Stop logging derived payment preimage if hash doesn't match' (#5109)by Matt Corallo · 191c18b4 · Oct 12, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Stop logging derived payment preimage if hash doesn't match' (#5109)

from bot/5086-stop-logging-derived-payment-pre-1d37b9 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5109
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 'Document private-channel policy under non-strict forwarding' (#5218)by Matt Corallo · 55a33f4f · Oct 12, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Document private-channel policy under non-strict forwarding' (#5218)

from bot/5141-document-forwarding-channel-sele-57e8d0 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5218
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 'Propagate fatal write errors when socket reads are paused' (#5220)by Matt Corallo · 2d9cd00d · Oct 12, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Propagate fatal write errors when socket reads are paused' (#5220)

from bot/5144-propagate-fatal-write-errors-whe-04ca28 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5220
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-priorityPropagate fatal write errors when socket reads are pausedby auto-pr-bot · 9e1bb562 · Oct 11, 2026 · 1 fileMessage 100 · StrongTriage 5Details
Commit message · auto-pr-bot

Propagate fatal write errors when socket reads are paused

@matt asked:

> @auto-pr-bot please fix this non-security issue reported by project loupe.
>
> send_data returns a short write on permanent try_write/poll_write_ready
> errors without recording the failure or waking a disconnect path. When
> continue_read is false, schedule_read subsequently waits only on the two
> mpsc receivers, so it cannot observe the socket's read-side EOF/reset
> either. The pending outbound messages remain queued, so
> write_buffer_space_avail keeps reads paused instead of resolving the
> failure.
>
> A peer that completes Noise/init can request enough responses to reach
> PeerManager's 12-message read-pause threshold and reset its TCP
> connection. If write-error handling runs before read-error handling, the
> dead connection retains its peer registration, queued messages, socket,
> and processing tasks. [...] Severity is low because regular
> PeerManager timer ticks eventually disconnect an inactive peer.

When send_data hits a permanent write error it now takes the writer and
wakes the read future before returning the short write. The read loop
checks for a taken writer on every iteration and, since a paused
connection waits only on its wake channels and would otherwise never
observe the dead socket, exits via PeerManager::socket_disconnected so
rust-lightning is informed the socket is gone and the peer is deregistered
with its queued messages dropped, instead of lingering until a
timer-based disconnect.

The regression test parks the connection with reads paused, a write-dead
socket, and a peer that stays connected so the read side never observes an
EOF, then asserts the connection is torn down and the peer deregistered
without any timer ticks.

Fixes #5144

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

100/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✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
fuzzing or regression evidence
Lower-priorityMerge PR 'Fix clippy lints in lightning-liquidity' (#5182)by jkczyz · aab7579d · Oct 10, 2026 · 9 filesMessage 81 · StrongTriage 0Details
Commit message · jkczyz

Merge PR 'Fix clippy lints in lightning-liquidity' (#5182)

from 2026-10-lints into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5182
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 discount
Lower-priorityMerge PR 'Preserve ancestor history in reorg disconnect locators' (#5171)by Matt Corallo · b0ae3d7a · Oct 10, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Preserve ancestor history in reorg disconnect locators' (#5171)

from bot/5099-preserve-ancestor-history-in-reo-cc4b1b into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5171
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 'Log HTLC failures handed to the monitor on force-close' (#5056)by Matt Corallo · b6b121c0 · Oct 9, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Log HTLC failures handed to the monitor on force-close' (#5056)

from bot/5050-fail-held-htlc-failures-when-for-2453cd into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5056
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 'Propagate read errors instead of panicking during deserialization' (#5155)by Matt Corallo · 370d129c · Oct 9, 2026 · 3 filesMessage 81 · StrongLow 47Details
Commit message · Matt Corallo

Merge PR 'Propagate read errors instead of panicking during deserialization' (#5155)

from bot/5093-propagate-read-errors-instead-of-bf13cc into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5155
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 · Low 47/100

This change fixes three spots where the code would crash (panic) if reading data failed during deserialization. Now these spots return a proper error instead, which is safer and allows the caller to handle the problem gracefully. The included test confirms one of the fixes works for a fake failing reader.

Lower-priorityMerge PR 'Reject message-content TLVs in dummy onion-message hops' (#5087)by Matt Corallo · abcc58ec · Oct 9, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Reject message-content TLVs in dummy onion-message hops' (#5087)

from dummy-reject-message into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5087
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 'Fix hang in `test_single_channel_multiple_mpp` on busy machines' (#5131)by Matt Corallo · a1eaff1a · Oct 9, 2026 · 11 filesMessage 91 · StrongInformational 14Details
Commit message · Matt Corallo

Merge PR 'Fix hang in `test_single_channel_multiple_mpp` on busy machines' (#5131)

from 2026-10-racy-test into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5131
Reviewed-by: Val Wallace <val@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
cryptography-sensitive pathboot or update pathmerge-commit duplicate discount
AI analysis · Informational 14/100

This commit fixes a flaky test that could hang on busy machines. It does not change production code behavior or fix any security vulnerability in the software itself. The rest of the patch is minor code cleanup, such as switching to newer Rust syntax for formatting strings and constructing vectors.

Lower-priorityFix new clippy lint suggesting `then_some` over `filter`by Matt Corallo · 6c2ffa1c · Oct 9, 2026 · 1 fileMessage 50 · ThinTriage 0Details
Commit message · Matt Corallo

Fix new clippy lint suggesting `then_some` over `filter`

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Security candidateFix new clippy lint complaining about extra `&`s in `format!()`by Matt Corallo · f1498b25 · Oct 9, 2026 · 6 filesMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Fix new clippy lint complaining about extra `&`s in `format!()`

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

This commit only cleans up Rust formatting strings to satisfy a new Clippy lint. It removes unnecessary ampersands (&) inside format!() and writeln!() calls. There is no change to program logic, no security fix, and no behavior change.

Lower-priorityFix new clippy lint complaining about `vec!()`by Matt Corallo · d8b099d5 · Oct 9, 2026 · 4 filesMessage 45 · ThinTriage 0Details
Commit message · Matt Corallo

Fix new clippy lint complaining about `vec!()`

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Lower-priorityMerge PR 'Drop trailing semicolons from log macros' (#5053)by Matt Corallo · f0142def · Oct 9, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Drop trailing semicolons from log macros' (#5053)

from log-macro-semicolons into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5053
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 missing scid alias check against real channels' (#5070)by Matt Corallo · a698ccb6 · Oct 8, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Add missing scid alias check against real channels' (#5070)

from 2026-10-scid-alias-check into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5070
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 candidateFix hang in `test_single_channel_multiple_mpp` on busy machinesby Matt Corallo · e7a51475 · Oct 8, 2026 · 1 fileMessage 100 · StrongInformational 16Details
Commit message · Matt Corallo

Fix hang in `test_single_channel_multiple_mpp` on busy machines

`test_single_channel_multiple_mpp` claims an MPP payment from a
background thread while each `ChannelMonitorUpdate` persistence blocks
until the test sends into an mpsc channel. The claiming thread holds
node 8's per-peer lock while blocked, so the main thread can only take
that lock in the brief window after each update completes.

To fetch the first `commitment_signed`, the main thread called
`get_and_clear_pending_msg_events`, which takes the per-peer lock four
separate times. Only three updates were completed before it had to
return, and under CPU contention the main thread may get the lock only
once per update. It then stayed blocked on the lock while the claiming
thread waited for a write which only a thread spawned after the call
returns would send, hanging the test forever.

Instead, read the pending messages from the peer state directly,
taking the lock only once. Further, complete updates from a background
thread until each call returns, rather than a fixed number of times.
At least two are still completed while fetching the messages, so that
some claims are in the holding cell when the `revoke_and_ack` arrives.
Finally, accept any number of fulfills in each batch at the end, as
that depends on how far the claim got before the `revoke_and_ack` was
handled.

This may or may not be a complete fix, and may or may not make the
test unable to detect the original issue, but at this point it hardly
matters. We want to drop the test entirely in #4552 and its been racy
for so long that its starting to cause other issues.

Fixes #4744

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

100/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✓ Links an issue, advisory, or supporting reference
Why it was queued
boot or update path
AI analysis · Informational 16/100

This change fixes a flaky automated test that could freeze forever on heavily loaded computers. It only touches test code, not the actual Lightning node software that users run, so it has no direct security impact on real deployments.

Security candidateLog blinded route tails without payload bytesby auto-pr-bot · 2b9039e6 · Oct 8, 2026 · 1 fileMessage 76 · AdequateModerate 58Details
Commit message · auto-pr-bot

Log blinded route tails without payload bytes

`DebugRoute` formatted `Path::blinded_tail` with the derived `Debug`,
which emits every `BlindedHop::encrypted_payload` byte as a decimal
list. Routes are logged at INFO by the default router after the
recipient-provided blinded path from a BOLT 12 invoice has been cloned
into them, so a single "Got route" record scaled with—and could largely
consist of—invoice ciphertext chosen by whoever issued the invoice.

Instead, log one line for the tail's blinding point, excess CLTV expiry
delta and final value, one line per Trampoline hop, and one line per
blinded hop carrying its blinded node id and encrypted payload length.
Rendering each hop is then bounded to a fixed ~150 bytes regardless of
the payload size, while staying readable for debugging.

@val reported in #5084:

> `DebugRoute` formats `p.blinded_tail` with derived `Debug`. That
> recursively emits every `BlindedHop::encrypted_payload` byte as a
> decimal list. The default route finder logs this formatter at INFO
> (`Got route`) after cloning the selected recipient-provided blinded
> path into the route, so attempting payment of an attacker-issued BOLT
> 12 invoice can make an ordinary log record scale with—and
> substantially amplify—the invoice ciphertext. [...]

@matt asked:

> @auto-pr-bot please come up with a better way to log these, something
> that's relatively readable, the suggested fix isn't bad.

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/issues/5084#issuecomment-449421

Fixes #5084

Authored-By: ggml-org/GLM-5.3-Flash-GGUF:Q4_K <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
Why it was queued
explicit security language
AI analysis · Moderate 58/100

This change fixes a logging issue where paying a BOLT 12 invoice could cause the software to write an unusually large log entry. The previous code printed every byte of encrypted data from the invoice's hidden payment path as a long list of numbers, which could waste disk space, slow down logging, and potentially disrupt log collection systems. The fix prints only a short summary and the length of each encrypted payload instead.

Lower-priorityMerge PR 'Check invoice chain in pay_for_bolt12_invoice' (#5072)by benthecarman · 6b58e571 · Oct 7, 2026 · 7 filesMessage 81 · StrongTriage 0Details
Commit message · benthecarman

Merge PR 'Check invoice chain in pay_for_bolt12_invoice' (#5072)

from bolt12-direct-pay-chain-check into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5072
Reviewed-by: vincenzopalazzo <vincenzopalazzo@noreply.git.rust-bitcoin.org>
Reviewed-by: joostjager <joostjager@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 'Keep the outbound SCID alias of closing channels on reload' (#5080)by Matt Corallo · 8010356c · Oct 7, 2026 · 3 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Keep the outbound SCID alias of closing channels on reload' (#5080)

from saidalaoui/keep-closing-channel-alias-on-reload into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5080
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