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.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
This commit rewrites how a Lightning wallet talks to Esplora block-explorer servers so that many status checks happen in parallel instead of one at a time. It is a performance/refactoring change. There is no direct evidence in the commit t…
Concurrency/timing change in transaction confirmation logicNew inconsistency check preserved when a previously-confirmed tx is reported unconfirmedAdded defensive error path for missing pre-fetched block status
This change stops the Electrum-based transaction sync client from downloading the very transaction that created an output it is watching. Previously, the client could request that transaction from Electrum, even though a transaction can ne…
Avoids unnecessary Electrum transaction.get requests for watched outputsReduces information disclosure to Electrum server about watched outpointsAdds regression test verifying request suppression
This change improves how the Lightning Dev Kit's Electrum and Esplora transaction-sync clients track watched Bitcoin transactions. Previously, the code ignored the script pubkey (the 'address' associated with a transaction) supplied when r…
Previously ignored `script_pubkey` argument in `register_tx` for transaction watchersElectrum script-history queries previously used an arbitrary transaction output, which could be OP_RETURN and therefore unindexed by some Electrum serversNew logic prefers caller-supplied script pubkey and falls back to non-OP_RETURN outputs
This commit changes how LDK stores pending event notifications. It adds serialization support for several event types that previously were not fully saved to disk, and introduces a helper method so the code can decide which events are wort…
Data-loss prevention: previously non-round-trippable event variants are now fully serialized, avoiding accidental event loss when users serialize Event queues themselvesState-consistency hardening: ChannelManager now explicitly skips events that describe non-surviving restart state, preventing replay of stale eventsDefensive assertion: debug builds assert that every persisted event round-trips to Some(event), catching serialization mismatches
This commit only adds documentation comments to two source files. It explains that certain funding-signing events can become stale if the underlying negotiation fails, and that callers may see specific harmless errors as a result. No code …
This commit removes a fixed-version pin for the honggfuzz fuzzing tool in a continuous-integration script. The project now uses the current release of honggfuzz instead of an older pinned version. There is no change to the actual Lightning…
This commit changes the Rust toolchain used in the continuous integration (CI) fuzzing job from a fixed older version (1.75) to the latest stable release. It is purely a build/test infrastructure change to fix a dependency compatibility is…
This commit makes a previously internal helper function public so that outside developers can build dummy-hop tails for blinded payment paths without recreating the logic themselves. It is an API usability change, not a fix for a known sec…
No security-relevant behavior change in the diffAPI visibility broadened from crate-public to publicCLTV expiry overflow check already present and unchanged
This change adds a safety check in a Bitcoin Lightning Network library (LDK). Previously, if the software tried to verify a peer's commitment signature before it had learned the peer's channel parameters, it could crash with a panic. Now i…
Defensive check added on peer-driven code path to prevent panicMissing counterparty_parameters could previously cause panic during commitment transaction constructionChannel closure returned instead of panic
This commit only changes the wording of an error message sent to peers when a commitment transaction fails validation. It replaces the vague phrase 'Failed to validate our commitment' with the clearer 'Received commitment failed validation…
This commit moves the checks that validate a counterparty's signatures on the holder's commitment and HTLC transactions out of the general channel code and into the signer module (InMemorySigner). Previously, these signature checks were do…
Moved signature validation from channel state machine into signer moduleAdded new tests that corrupt signatures and verify rejectionChanged error message from 'Invalid commitment tx signature from peer' / 'Invalid funding_created signature from peer' to 'Failed to validate our commitment'
This change fixes a Lightning channel splicing bug: when two peers temporarily disconnect during a splice, any half-finished signature the other side already sent is now discarded. Before the fix, that stale signature could be reused after…
State-invalidation bug in multi-step protocol (splice negotiation)Stale cryptographic signature not cleared on disconnectPotential reuse of old commitment state after reconnect
This fix prevents a Lightning channel from being accidentally force-closed. During a splice (a way to resize a payment channel), one side's initial signature could be kept in memory after the peers disconnected. If the peers later reconnec…
State inconsistency: in-memory buffered message not cleared on disconnectDuplicate message processing after reconnectionForce-close consequence for active Lightning channel
This commit is a simple rename of a public function from `matches_invoice_signing_pubkey` to `key_can_sign_invoice`, plus matching updates to its documentation, callers, tests, and changelog. No behavior changed. It is not a security fix.
This commit is a simple rename of a function and its documentation from matches_invoice_signing_pubkey to key_can_sign_invoice. No logic, behavior, or security properties changed. It is a follow-up code-review naming cleanup.
This commit adds a new public helper method, Offer::matches_invoice_signed_by (later renamed matches_invoice_signing_pubkey), that lets callers check whether an invoice signing key belongs to the recipient named by a BOLT 12 offer. It also…
Refactors existing BOLT 12 invoice-signing-pubkey validation into a reusable helperAdds public API to bind an invoice signing key to an offer recipientAdds unit tests for issuer-id vs. path-last-hop matching behavior
This commit is a feature enhancement for LDK's internal serialization macros. It allows developers to mark old protocol fields as 'retired' (reserved but no longer used) in more places, so those type numbers cannot be accidentally reused. …
TLV type-number reservation mechanism extended to more macro-generated code pathsPrevents accidental reuse of retired protocol field type numbersAvoids UnknownRequiredFeature decode failures for obsolete even-type fields
This commit is a test-only cleanup in the Lightning Dev Kit (LDK) Rust codebase. It removes low-level byte-level tests for splice failure events and replaces them with a single cross-version test that actually loads a 0.2 node with seriali…
Cross-version serialization compatibility test addedRemoval of byte-level tests that could not detect real 0.2 mismatchesNo production code changes
This commit only adds a code comment explaining an existing quirk: if a revoked old channel transaction contains two identical-looking payment forwards and the other side claims both, the software may only claim one upstream while letting …
Behavioral quirk in revoked-commitment HTLC resolution documentedDuplicate (payment_hash, amount) HTLCs can map to the same upstream sourcePotential missed upstream preimage claim on second identical HTLC
This commit fixes a state-handling bug in Lightning Dev Kit's splicing feature. When a user tries to speed up or replace a pending splice (an 'RBF' attempt) and the older splice transaction unexpectedly gets confirmed on-chain, the softwar…
State-conflict handling between confirmed splice candidate and active RBF negotiationStructured abort propagation through chain-event pathConditional abort based on holder signature progress to avoid unsafe cancellation
Throw arbitrary bytes at `PayerProof::try_from` to exercise the merkle-root reconstruction and the deserialization path together.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencesecond-pass: broader security terminology
AI analysis · Informational 15/100
This commit only adds a new fuzz test target. Fuzz tests are automated tools that throw random or crafted input at a piece of code to look for crashes or bugs. The commit does not change any production code, protocol behavior, or user-facing functionality, so it does not introduce or fix a security issue by itself.
AI review queuedci: don't double-assign reviewers, support manual assignment runsby Matt Corallo · 24651a1a · Jul 3, 2026 · 1 fileMessage 90 · StrongInformational 15Details
Commit message · Matt Corallo
ci: don't double-assign reviewers, support manual assignment runs
The assign-reviewer workflow blindly picked a random reviewer every time it ran, so a re-run (or any future non-opened trigger) could request review from a second person even when someone was already on the PR. Teach it to inspect the PR state first:
* Anyone already requested as a reviewer or who has submitted a review is never picked. The author self-reviewing (commenting on their own PR) doesn't count. * On automatic runs (including re-runs), skip assignment entirely if anyone from the REVIEWERS pool has already reviewed or been requested; reviews from people outside the pool are ignored.
Also add a workflow_dispatch trigger taking a PR number so a reviewer can be assigned manually. Manual runs skip the "someone is already on it" check and always add a new (not-yet-involved) reviewer if an eligible candidate remains.
This should let us fully emulate the old bot's second-reviewer assignment logic fully via the action. A first reviewer can go hunt in the actions page and trigger a second assignment (but we'll add a UI element in the PR page above merge to trigger this in a nice UI).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
90/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This is a routine update to the project's automated reviewer-assignment workflow. It prevents the bot from accidentally adding a second random reviewer when one is already assigned, and adds a manual trigger so maintainers can request an additional reviewer on demand. There is no security-relevant change here.
AI review queuedFix assign-reviewer's auth by setting the authorized integration audienceby Matt Corallo · 055d334d · Jul 3, 2026 · 1 fileMessage 55 · ThinInformational 18Details
Commit message · Matt Corallo
Fix assign-reviewer's auth by setting the authorized integration audience
55/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Names security-relevant behavior explicitly! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 18/100
This is a one-line fix to a Forgejo workflow that assigns reviewers. The workflow requests a temporary identity token from the CI system so it can call another service. The change adds an explicit audience parameter to that token request, ensuring the token is only valid for the intended recipient. Without this, the token might be accepted by a broader set of services or rejected by the intended one, depending on how the CI and target service are configured. It is a hardening/configuration fix rather than a user-facing vulnerability in the Lightning library itself.
Only emit Event::SpliceNegotiated when contributing
There's no need to inform users of negotiated splices when they're not contributing as it just produces noise. Once they do start contributing, they cannot stop, so we always emit the event going forward. Note that we still emit `Event::ChannelReady` with the new locked funding outpoint for each locked splice, so users can still learn that a splice occurred that way.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 19/100
This commit changes when users of the Lightning Dev Kit library are notified about a 'splice'—a way to resize a Lightning channel's on-chain funding. Previously both sides got an event when a splice was negotiated. Now only the side that actually added or removed money (a 'local contribution') gets the event. The other side still learns about the locked splice later through a different event. This is a user-interface cleanup, not a security fix, and does not change how funds are protected.
Use the account name present on this Forgejo instance so Joost stays in the reviewer rotation.
Co-Authored-By: HAL 9000
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This commit simply corrects a username in an automated reviewer assignment workflow. It changes one reviewer handle from 'joost_spiral' to 'joostjager' so the right person stays in the rotation. There is no security issue here.
AI review queuedFix lightning-invoice bitcoin dependency versionby Daniel Roberts · fbc22051 · Jun 29, 2026 · 1 fileMessage 68 · AdequateInformational 20Details
Commit message · Daniel Roberts
Fix lightning-invoice bitcoin dependency version
`lightning-invoice` since 743f43fcfd5acba55242792ed1e9337f2ab52858 will not build against `rust-bitcoin` older than v0.32.7.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 20/100
This commit is a routine packaging fix. It updates the minimum required version of the rust-bitcoin library for the lightning-invoice crate from 0.32.4 to 0.32.7 because the code no longer compiles against older 0.32.x releases. It does not change any application logic, cryptographic operations, or network behavior, and there is no indication it fixes a security vulnerability.
AI review queuedAdd workflow to assign a random reviewer on new PRsby Matt Corallo · 311a74cf · Jun 28, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Matt Corallo
Add workflow to assign a random reviewer on new PRs
Forgejo has no built-in random/round-robin reviewer assignment, so add a small Forgejo Actions workflow that, on pull request open, picks a random developer from the maintainer pool (excluding the author) and requests their review via the API.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This commit adds a harmless automation script that randomly picks a code reviewer when a new pull request is opened. It does not change any payment, cryptography, or network code, and it does not introduce any obvious security flaw.
AI review queuedDrop the BufReader wrapperby Abeeujah · b582ce15 · Jun 24, 2026 · 1 fileMessage 58 · ThinInformational 15Details
Commit message · Abeeujah
Drop the BufReader wrapper
Post `0.32.4` deserialization of consensus objects now use `Read` as the trait bounds, making the BufReader no longer needed for deserialization.
This commit removes a small, custom one-byte buffering helper that was only needed to make older versions of a dependency (rust-bitcoin) happy. After the dependency changed its requirements, the wrapper became unnecessary. There is no security issue here—just routine cleanup of dead code.
AI review queuedDeserialize consensus objects using Read typeby Abeeujah · deee085c · Jun 24, 2026 · 1 fileMessage 68 · AdequateInformational 15Details
Commit message · Abeeujah
Deserialize consensus objects using Read type
The BufReader wrapping is no longer needed after the rust-bitcoin `0.32.4` release which contains the standardisation of the trait bounds for deserialization to `Read` instead of `BufReader`.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 15/100
This is a small cleanup change that removes an unnecessary BufReader wrapper when deserializing Bitcoin consensus objects. The underlying rust-bitcoin library now accepts a simpler 'Read' trait directly, so the code was updated to match. There is no security issue visible in the change.
AI review queuedDrop duplicate Hasher importby Abeeujah · b4f74165 · Jun 23, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Abeeujah
Drop duplicate Hasher import
35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100
This commit removes a duplicate import of the `Hasher` trait in a Rust source file. It is a code cleanup change with no functional or security effect. The `Hasher` symbol was already imported elsewhere in the same scope, so the duplicate import only generated a compiler warning. No behavior of the Lightning Dev Kit code changes as a result.
AI review queuedAvoid over-allocating when reading corrupted lengths for `HashMap`sby Matt Corallo · 5b4626fa · Jun 18, 2026 · 1 fileMessage 73 · AdequateModerate 55Details
Commit message · Matt Corallo
Avoid over-allocating when reading corrupted lengths for `HashMap`s
Luckily this was only used in `ChannelManager` and scorer deserialization, though we anticipate occasionally fetching the second from an only semi-trusted source.
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 55/100
This commit fixes a denial-of-service risk when rust-lightning reads saved data containing HashMaps. A corrupted or malicious length field could previously trick the program into reserving a huge amount of memory before it had read any actual entries. The patch now caps the initial allocation to a safe maximum based on the largest buffer size the code is willing to handle. The commit message says the affected deserialization paths were mainly ChannelManager and scorer data, with scorer data sometimes coming from a semi-trusted source.
AI review queuedFix invalid dummy pubkey in send_to_routeby Valentine Wallace · 54cdd85f · Jun 17, 2026 · 1 fileMessage 80 · StrongLow 44Details
Commit message · Valentine Wallace
Fix invalid dummy pubkey in send_to_route
If a caller of send_payment_with_route provided a route with either no paths, or where the first path had 0 hops, the method would panic due to attempting to unwrap a dummy pubkey that was initialized with 32 bytes instead of the required 33.
Reported by Project Loupe.
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Low 44/100
This commit fixes a programming bug in rust-lightning's send_to_route function. When a user supplied a payment route with no paths or an empty first path, the code tried to create a fallback 'dummy' public key using 32 bytes of data, but public keys require 33 bytes. That mismatch caused the program to panic and crash. The fix simply changes the dummy data to 33 bytes so the fallback public key is valid and the unwrap succeeds. It is a denial-of-service/crash bug, not a theft-of-funds vulnerability, because the panic aborts the operation rather than letting an attacker manipulate funds.
AI review queuedCorrect deserialization of `u16::MAX` byte-Featuresby Matt Corallo · 87c8c326 · Jun 17, 2026 · 1 fileMessage 73 · AdequateLow 38Details
Commit message · Matt Corallo
Correct deserialization of `u16::MAX` byte-Features
This shouldn't really matter in practice, but it aligns the serialization and deserialization logic.
Reported by Project Loupe.
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 · Low 38/100
This commit fixes a mismatch in how Lightning feature flags are read from the wire. Previously, a feature set whose serialized byte length was exactly 65,535 bytes (u16::MAX) could be deserialized incorrectly because the code used a generic vector reader that may interpret the length differently. The fix reads the length as a u16 and then reads exactly that many bytes, matching the write side. The commit message says this 'shouldn't really matter in practice.'
AI review queuedDon't panic when a composite sub-handler returns `Ok(None)`by Jeffrey Czyz · 77ac339b · Jun 17, 2026 · 1 fileMessage 73 · AdequateHigh 76Details
Commit message · Jeffrey Czyz
Don't panic when a composite sub-handler returns `Ok(None)`
A handler built with `composite_custom_message_handler!` routes an incoming message type to the sub-handler whose pattern matches it and assumed the sub-handler would always decode it. But per the `CustomMessageReader` contract a sub-handler returns `Ok(None)` for a type it doesn't recognize, and a sub-handler's pattern -- a range in particular -- can be broader than the types it actually decodes.
Since the message type comes from peer input, this let a remote peer panic the message-processing thread with a single custom message whose type falls in a sub-handler's pattern but isn't decoded by it. Report such a message as unknown instead, matching how `wire::do_read` handles an undecoded custom message.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 · High 76/100
This commit fixes a bug where a remote peer could crash a Lightning node by sending a specially chosen custom message. The crash happened because a message-routing helper assumed a sub-component would always recognize any message type matching its declared pattern, but sub-components can legitimately decline to decode some types within their pattern. The fix replaces an internal 'this should never happen' crash with a graceful 'unknown message' response.
Replayed intercepted HTLC events should not duplicate queued payments or panic after restart. Ignore already-queued intercept IDs so persisted queues remain stable across event replay.
Co-Authored-By: HAL 9000
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Low 44/100
This change fixes a crash and duplicate-queue bug in the Lightning Dev Kit's LSPS2 payment queue. After a restart, previously seen intercepted HTLCs can be replayed; the old code would panic (in debug builds) or add duplicates, while the new code returns the existing payment status instead. It is a reliability/idempotency fix rather than a direct theft-of-funds vulnerability, but a panic on restart could disrupt a liquidity service.
AI review queuedVerify Electrum transaction responses before useby Elias Rohrer · 1d131506 · Jun 17, 2026 · 1 fileMessage 90 · StrongHigh 74Details
Commit message · Elias Rohrer
Verify Electrum transaction responses before use
Electrum confirmations must reject transaction_get responses whose body does not compute the requested txid. Otherwise a malicious server can substitute an unrelated transaction and provide matching Merkle data for the substituted body.
Co-Authored-By: HAL 9000
This finding was discovered by Project Loupe
90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · High 74/100
This commit fixes a security hole in how a Bitcoin Lightning wallet talks to Electrum servers. Previously, the wallet asked a server for a specific transaction by its ID, but it did not check that the returned transaction actually matched that ID. A malicious or compromised Electrum server could send a different transaction instead, and the wallet would trust it. The fix adds a simple verification step: after receiving a transaction, the wallet recomputes its ID and rejects it if it does not match what was requested. The commit message explicitly says this prevents a malicious server from substituting an unrelated transaction and providing matching proof data.
AI review queuedCheck Esplora Merkle leaf risk by base sizeby Elias Rohrer · bc05d9d9 · Jun 17, 2026 · 1 fileMessage 80 · StrongModerate 59Details
Commit message · Elias Rohrer
Check Esplora Merkle leaf risk by base size
Esplora confirmation checks must use the non-witness transaction size for the 64-byte Merkle leaf guard. Witness padding can otherwise raise total_size without changing the serialization hashed into the txid and Merkle tree.
Co-Authored-By: HAL 9000
This finding was discovered by Project Loupe
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Moderate 59/100
This commit fixes a guard condition in LDK's Esplora transaction-sync code. The code tries to skip 64-byte transactions because such transactions can be abused in a known Bitcoin Merkle-tree weakness. The bug was that it measured total transaction size, which includes witness data. A transaction with witness data could be larger than 64 bytes in total size while still having a 64-byte non-witness serialization, so the guard could be bypassed. The fix uses a helper that checks the base (non-witness) size instead.
AI review queuedCheck Electrum Merkle leaf risk by base sizeby Elias Rohrer · 4636d6c9 · Jun 17, 2026 · 2 filesMessage 80 · StrongModerate 62Details
Commit message · Elias Rohrer
Check Electrum Merkle leaf risk by base size
Electrum confirmation checks must reject transactions whose non-witness serialization is 64 bytes, since txids and Merkle leaves are computed from that serialization. Witness padding can otherwise move total_size above 64 without removing the inner-node ambiguity.
Co-Authored-By: HAL 9000
This finding was discovered by Project Loupe
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Moderate 62/100
This commit fixes a bug in how rust-lightning's Electrum transaction sync checks for a known Bitcoin Merkle-tree weakness. The old code rejected transactions whose total byte size was exactly 64, but an attacker could pad a transaction with extra witness data to push the total size above 64 while keeping the non-witness (base) size at 64. Because Bitcoin txids and Merkle leaves are computed from the non-witness data, the bypass could let a malicious 64-byte-base transaction be treated as a valid Merkle leaf, potentially allowing fake transaction confirmations. The fix checks the base (non-witness) size instead of total size and applies the check in more code paths.
AI review queuedFix underflow in blinded path amt_to_forwardby Valentine Wallace · e560ec17 · Jun 15, 2026 · 1 fileMessage 80 · StrongHigh 70Details
Commit message · Valentine Wallace
Fix underflow in blinded path amt_to_forward
If we have a high (200%+) proportional fee as an intermediate blinded node combined with a low inbound amount, we previously had some code that calculated the outbound amount of the forward that would've underflowed. This would've caused a panic in debug builds and caused us to relay a payment that should've been rejected (due to being unable to cover our high fee) in release builds.
Reported by Project Loupe.
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · High 70/100
This commit fixes a subtraction underflow bug in the code that decides how much of a Lightning payment a blinded intermediate node should forward. With extremely high proportional fees and a small incoming payment amount, the code subtracted a larger fee from a smaller amount, which would crash in debug builds and silently produce a wrong, too-small result in release builds. In release builds that wrong result could have allowed a payment to be relayed that should have been rejected because it could not cover the node's fee. The fix uses Rust's checked subtraction so the function returns 'None' instead of underflowing.
AI review queuedClear duplicate monitor-pending RAA on signer resendby Wilmer Paulino · 27223fdd · Jun 15, 2026 · 2 filesMessage 83 · StrongModerate 66Details
Commit message · Wilmer Paulino
Clear duplicate monitor-pending RAA on signer resend
The `chanmon_consistency` fuzz target found a reconnect ordering where `signer_pending_revoke_and_ack` and `monitor_pending_revoke_and_ack` could both describe the same owed `revoke_and_ack`.
The channel first received a `commitment_signed` whose monitor update completed, but the signer could not provide the next point or secret, leaving `signer_pending_revoke_and_ack` set. Later, receiving the peer `revoke_and_ack` freed holding-cell HTLCs and produced a held monitor update. While that monitor update was still blocked, `channel_reestablish` saw the peer one state behind and recorded `monitor_pending_revoke_and_ack`, plus the corresponding monitor-pending `commitment_signed`, so the messages could be replayed once monitor updating was restored.
If the signer unblocked before the held monitor update was released, `signer_maybe_unblocked` generated and sent the already monitor-safe RAA using `signer_pending_revoke_and_ack`. The monitor-pending flag was not cleared at that point, so `monitor_updating_restored` later generated the same RAA again when the held update completed. The peer had already advanced after accepting the signer-unblocked RAA, so it rejected the duplicate secret as not corresponding to its current pubkey and force-closed.
Fix this by clearing `monitor_pending_revoke_and_ack` in the signer-resume path only once a signer-pending RAA is actually being returned.
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencesigning or wallet pathsecond-pass: security-sensitive path
AI analysis · Moderate 66/100
This commit fixes a bug in the Lightning Dev Kit where, after a peer reconnects, the same cryptographic 'revoke_and_ack' message could be generated and sent twice. The duplicate would contain a secret the peer had already accepted, so the peer would reject it and force-close the payment channel. The fix clears an internal 'monitor-pending' flag when the signer-resume path actually produces the message, preventing the later duplicate.
AI review queuedValidate reserved fees on both commitmentsby Leo Nash · 9fe1a362 · May 21, 2026 · 2 filesMessage 80 · StrongModerate 64Details
Commit message · Leo Nash
Validate reserved fees on both commitments
The local and remote commitments may have different dust limits, which can cause each commitment to have a different transaction fee.
Therefore when we reserve commitment transaction fees in `get_available_balances`, we must ensure that we read the maximum of the transaction fees on the local and the remote commitments. Otherwise, we may have not reserved enough fees to ensure that our next proposed channel state update is onside.
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
defensive validationsigning or wallet pathsecond-pass: near security thresholdsecond-pass: security-sensitive path
AI analysis · Moderate 64/100
This commit fixes a fee-reservation bug in a Lightning Network node implementation. When a node calculates how much money it can still send through a channel, it must set aside enough funds to pay the on-chain transaction fee if the channel later closes. Previously, the calculation only considered the node's own view of the commitment transaction. Because the two channel partners can agree on different 'dust limits,' the actual fee on the partner's version of the commitment can be higher. If the node did not reserve enough, it could propose a payment that is valid by its own numbers but violates the protocol when the partner checks it, potentially causing the channel update to be rejected or the channel to become inconsistent. The patch now reserves the larger of the two possible fees.
AI review queuedBreak `get_available_balances` into small helper functionsby Leo Nash · 69d2f08c · May 21, 2026 · 1 fileMessage 50 · ThinInformational 13Details
Commit message · Leo Nash
Break `get_available_balances` into small helper functions
Most diffs here are code moves.
50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 13/100
This commit is a pure code cleanup: it takes one large function that calculates how much money can still be sent over a Lightning channel and splits it into smaller, named helper functions. The actual arithmetic and rules appear unchanged, and the commit message explicitly says most of the changes are code moves. There is no indication this fixes or introduces a security problem.
AI review queuedValidate `next_splice_out_maximum_sat` on both commitmentsby Leo Nash · 89e9b75b · May 21, 2026 · 3 filesMessage 73 · AdequateModerate 59Details
Commit message · Leo Nash
Validate `next_splice_out_maximum_sat` on both commitments
Wilmer's fuzzing runs caught a case where an advertised splice out maximum hit the debug assertions in `get_next_splice_out_maximum`. These debug assertions ensure that any adverstised splice out maximum passes the validation of splice contributions.
The core issue is that we only read the local commitment when calculating the splice out maximum, but our splice validation requires that any splice out maximum is covered by the minimum of the holder's balances on the local and the remote commitments.
Therefore, if a HTLC is dust on the local commitment, but non-dust on the remote commitment, and the holder is the funder of the channel, we advertise a splice out maximum that is not covered by the holder's balance on the remote commitment, and fails our validation of splice contributions.
We now read both commitments when calculating the next splice out maximum, which fixes this issue.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
defensive validationfuzzing or regression evidencesigning or wallet pathsecond-pass: near security thresholdsecond-pass: security-sensitive path
AI analysis · Moderate 59/100
This commit fixes a bug in how the Lightning node calculates the maximum amount a user can splice out of a channel. Previously, the calculation only looked at the user's own view of the channel (the local commitment). It now also checks the peer's view (the remote commitment). If the two views differ because an HTLC is considered 'dust' (too small to be worth including as an output) on one side but not the other, the old code could advertise a splice-out limit that the node's own safety rules would later reject. In debug builds this triggered an internal assertion failure; in release builds it could lead to inconsistent or rejected splice attempts. The fix makes the advertised limit valid under both commitments.
AI review queuedDon't check for no-outputs under fee spikes in `get_available_balances`by Leo Nash · 257033fe · May 19, 2026 · 1 fileMessage 73 · AdequateLow 45Details
Commit message · Leo Nash
Don't check for no-outputs under fee spikes in `get_available_balances`
We only assume fee spikes in legacy channels, and we do not allow `holder_selected_channel_reserve_satoshis` to be set to zero in such channels. It is nonetheless still possible to reach the no-outputs case in a fee spike with solely the counterparty selected reserve set to zero, so we still guard against this case in `get_next_commitment_stats`.
We don't guard against no-outputs under fee spikes `get_available_balances`; in the worst case, the receiver of the HTLC we just sent fails it back.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 45/100
This commit relaxes a safety check in how Lightning channels calculate available balances during fee spikes. Previously, the code tried to ensure a commitment transaction would still have at least one output even if fees spiked. The change says that for one specific calculation (get_available_balances), it's okay not to guard against the 'no outputs' case under fee spikes, because the worst outcome is that an HTLC you just sent gets failed back by the receiver. The change keeps the stricter guard in another function (get_next_commitment_stats).
AI review queuedSkip stale fs store artifactsby benthecarman · 9246d868 · May 19, 2026 · 2 filesMessage 68 · AdequateLow 34Details
Commit message · benthecarman
Skip stale fs store artifacts
The exhaustive filesystem store listing treated leftover temp and trash files as namespace directories after identifying them as non-keys. Skip those artifacts before recursing so migrations can ignore crash leftovers.
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Low 34/100
This commit fixes a bug in the Lightning Dev Kit's filesystem storage module. Previously, leftover temporary and 'trash' files from crashes or interrupted operations were mistakenly treated as real data folders during listing and migration. The patch makes the code skip these stale artifacts, preventing potential confusion or errors during data migration. It is a defensive hardening fix rather than a directly exploitable vulnerability.