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 makes on-chain 'MonitorEvent' notifications durable and replay-safe. Previously, if a node crashed after a ChannelMonitor persisted a block update but before the ChannelManager processed the resulting event, the event could be …
Durability/atomicity fix for async persistence: prevents lost MonitorEvents across crashesNew ack-based event lifecycle with random event IDsArchival gating on unacknowledged events to avoid losing preimage/timeout information
This commit refactors how LDK nodes claim incoming Lightning payments. It replaces a separate 'claim with known custom TLVs' method with an options struct passed to the normal claim call, and fixes two edge cases in payment attribution dat…
API change: claim_funds now takes ClaimFundsOptions, consolidating TLV-known behavior into one pathFailure-packet length bound added to prevent oversized onion error messagesIncoming failure packet truncated at 32 KiB before processing
This change fixes a wallet bookkeeping problem in rust-lightning's built-in coin-selection wrappers. Previously, when a splice attempt failed or coin selection errored after picking UTXOs, those UTXOs stayed marked as 'reserved' in memory …
Resource exhaustion / denial-of-service via permanent in-memory UTXO reservationIncorrect state tracking in coin-selection wrapperNew API method required for correct lifecycle management (release_utxos)
This commit fixes a bug in the wallet's coin-selection code. When the wallet picked UTXOs to spend, it locked them immediately so they couldn't be reused. But if a later step—fetching the change address or the previous transaction—failed, …
Resource lock leak on error pathUTXO lock state inconsistency between selection and confirmationDenial-of-service/funds-unavailability risk from persistent UTXO locks
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 fixes a design flaw in LDK's built-in wallet helper where coins selected for a splice-in (or other unclaimed funding) were permanently reserved in memory if the transaction was abandoned. Over repeated failed splices, all spend…
Denial-of-service via UTXO exhaustion from repeated failed splice negotiationsRisk of inability to broadcast fee-bumping/claim transactions due to lack of available UTXOsNew API surface (release_utxos) introduced to mitigate resource leak
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.
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Lower-priorityDon't fail channel if inbound UA breaches counterparty-selected reserveby Leo Nash · 396af7cf · Mar 26, 2026 · 2 filesMessage 73 · AdequateLow 47Details
Commit message · Leo Nash
Don't fail channel if inbound UA breaches counterparty-selected reserve
We do not care if our balance drops below the counterparty-selected reserve upon an inbound `update_add_htlc`. This is the counterparty's problem.
Hence, we drop the assumption that once our balance rises above the counterparty-selected reserve, it will always remain above this reserve for the lifetime of a funding scope.
In the following commit, we make the assumption that the counterparty does not complain if we push them below our selected reserve when adding a HTLC, so we accommodate this assumption here.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 47/100
This commit changes how the Lightning node handles incoming payment requests (HTLCs) that would push the node's own balance below the 'channel reserve' amount chosen by the other party. Previously, the node would reject such HTLCs and close the channel, treating it as a violation. The new behavior accepts these HTLCs, because the developers consider it the counterparty's problem, not theirs. A related safety assertion is now only checked in tests, not in production code. This is a protocol-behavior change rather than a traditional memory-safety or cryptography bug, but it removes a defensive check that previously prevented the local balance from dropping below a reserve threshold on inbound HTLCs.
Security candidatePrevent downgrades in case holder-selected reserve is zero satoshisby Leo Nash · 63e4538e · Mar 26, 2026 · 1 fileMessage 73 · AdequateInformational 22Details
Commit message · Leo Nash
Prevent downgrades in case holder-selected reserve is zero satoshis
We prevent downgrades from 0.3 only in the case where the holder-selected reserve is 0, as we've had support for counterparty selected 0-reserves in prior releases.
There is no need for this sentinel in `FundingScope` serialization code as this would only apply to pending `FundingScope`'s.
Also, if the current scope has some zero-reserve, that reserve is carried over to all pending scopes automatically. Therefore it is not possible for a pending scope to have some 0-reserve without the current one also having it.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
update trust
AI analysis · Informational 22/100
This commit adds a marker to saved channel data so that older versions of the software will refuse to load it if the channel uses a zero-satoshi reserve chosen by the local user. That prevents accidental downgrades that could mishandle such channels, because older releases only understood zero-reserve channels when the remote side chose the zero reserve. It is a forward-compatibility guard, not a fix for an active attack.
Lower-priorityReject RBF with non-confirming feerate after several attemptsby Jeffrey Czyz · 8d001392 · Mar 26, 2026 · 3 filesMessage 85 · StrongLow 48Details
Commit message · Jeffrey Czyz
Reject RBF with non-confirming feerate after several attempts
After a few RBF attempts, both our own and the counterparty's RBF should target a feerate that will actually confirm. Reject attempts with feerates below the fee estimator's NonAnchorChannelFee target to prevent exhausting the RBF budget at low feerates.
The spec requires: "MUST set a high enough feerate to ensure quick confirmation."
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 48/100
This change tightens the rules for fee-bumping (RBF) during Lightning channel splicing. After 10 RBF attempts, any new attempt must use a feerate high enough to actually get the transaction confirmed according to the node's own fee estimator. Before this patch, a user or counterparty could keep submitting slightly higher but still-too-low fees, draining the RBF budget without ever confirming. The patch enforces the BOLT spec requirement to 'set a high enough feerate to ensure quick confirmation.'
Lower-priorityRe-validate contribution at quiescence timeby Jeffrey Czyz · 4e805629 · Mar 26, 2026 · 5 filesMessage 68 · AdequateModerate 60Details
Commit message · Jeffrey Czyz
Re-validate contribution at quiescence time
Outbound HTLCs can be sent between funding_contributed and quiescence, reducing the holder's balance. Re-validate the contribution when quiescence is achieved and balances are stable. On failure, emit SpliceFailed + DiscardFunding events and disconnect the peer so both sides cleanly exit quiescence.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
defensive validation
AI analysis · Moderate 60/100
This commit fixes a bug in Lightning Dev Kit's channel splicing logic. When users add or remove funds from a channel (splicing), the software now re-checks whether the proposed funding contribution is still valid once the channel becomes 'quiescent' (paused for the splice). The bug was that new outbound payments sent between when the contribution was first accepted and when quiescence actually occurred could reduce the user's balance, making a previously-valid splice-out invalid. Without this fix, the splice could proceed based on stale balance information, potentially creating an invalid funding transaction or putting the channel in an inconsistent state. The fix emits failure events and disconnects the peer so both sides cleanly abort the splice.
Lower-prioritySet the correct floor for the reserves in inbound V2 channelsby Leo Nash · a3dded17 · Mar 25, 2026 · 1 fileMessage 65 · AdequateModerate 59Details
Commit message · Leo Nash
Set the correct floor for the reserves in inbound V2 channels
The floor for *our* selected reserve is *their* dust limit.
65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Moderate 59/100
This commit fixes a swap in how reserve amounts are calculated for a new type of Lightning channel (V2). Each side's reserve has a minimum floor based on the other side's 'dust limit' (the smallest transaction output they consider meaningful). The code had the two dust limits reversed: the local reserve floor was using the remote dust limit and vice versa. That could let one side set a reserve floor lower than intended, potentially creating a channel state where tiny, uneconomic outputs are created or where balance protections are weaker than the protocol expects.
Security candidateAdd inbound and outbound checks for zero reserve channelsby Leo Nash · 98b71c88 · Mar 25, 2026 · 7 filesMessage 77 · AdequateHigh 70Details
Commit message · Leo Nash
Add inbound and outbound checks for zero reserve channels
The goal is to prevent any commitments with no outputs, since these are not broadcastable.
77/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathboot or update path
AI analysis · High 70/100
This commit fixes a bug in the Lightning Dev Kit where a payment channel could end up with a commitment transaction that has zero spendable outputs. In Bitcoin, a transaction with no outputs is invalid and cannot be broadcast, which would make it impossible to enforce or recover funds from the channel if something goes wrong. The patch adds checks during channel opening, fee updates, and HTLC handling to ensure that zero-reserve channels always keep at least one valid output.
Lower-priorityAdd FundingContributionError for FundingTemplate methodsby Jeffrey Czyz · 9dc529a2 · Mar 25, 2026 · 3 filesMessage 73 · AdequateInformational 18Details
Commit message · Jeffrey Czyz
Add FundingContributionError for FundingTemplate methods
Replace opaque Err(()) returns from FundingTemplate methods with a descriptive FundingContributionError enum. This gives callers diagnostic information about what went wrong: feerate bounds violations, invalid splice values, coin selection failures, or non-RBF scenarios.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 18/100
This commit is a straightforward code-quality improvement: it replaces generic, uninformative error returns with a new descriptive error type for funding/splicing operations. It does not change the underlying checks or security boundaries; it only gives callers clearer messages about why an operation failed. There is no indication this fixes a vulnerability or changes exploitable behavior.
Lower-priorityPreserve original contribution on counterparty RBF abortby Jeffrey Czyz · a547960b · Mar 25, 2026 · 2 filesMessage 73 · AdequateModerate 57Details
Commit message · Jeffrey Czyz
Preserve original contribution on counterparty RBF abort
When the counterparty initiates an RBF, the prior contribution was popped and replaced with the feerate-adjusted version. If the RBF aborted, the adjusted version persisted, leaving a stale higher feerate in contributions.
Change contributions to be an append-only log where each negotiation round pushes a new entry. On abort, pop the last entry if its feerate doesn't match the locked feerate. This naturally preserves the original contribution as an earlier entry in the vec.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Moderate 57/100
This commit fixes a bug in Lightning Dev Kit's channel splicing/RBF logic. When a counterparty started a fee-bump (RBF) negotiation that later aborted, the local node's record of its own funding contribution was accidentally left at the higher, adjusted fee rate instead of reverting to the original. The fix makes the contribution history append-only and pops the unconfirmed round's entry on abort, restoring the original contribution. The bug could cause incorrect fee accounting and, in some abort paths, a panic or wrong wallet events when the node later initiated its own RBF.
AI review queuedMerge rbf_channel into splice_channel and expose prior contributionby Jeffrey Czyz · a052afa9 · Mar 25, 2026 · 7 filesMessage 85 · StrongInformational 24Details
Commit message · Jeffrey Czyz
Merge rbf_channel into splice_channel and expose prior contribution
Users previously had to choose between splice_channel (fresh splice) and rbf_channel (fee bump) upfront. Since splice_channel already detects pending splices and computes the minimum RBF feerate, rbf_channel was redundant. Merging into a single API lets the user call one method and discover from the returned FundingTemplate whether an RBF is possible.
The FundingTemplate now carries the user's prior contribution from the previous splice negotiation when one is available. This lets users reuse their existing contribution for an RBF without performing new coin selection. A PriorContribution enum distinguishes whether the contribution has been adjusted to the minimum RBF feerate (Adjusted) or could not be adjusted due to insufficient fee buffer or max_feerate constraints (Unadjusted).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 24/100
This commit is a routine API refactor in a Lightning network library. It merges two user-facing methods, `splice_channel` and `rbf_channel`, into one, and adds a way to reuse a previous funding contribution when bumping transaction fees (RBF). The changes are mostly code cleanup and convenience; they do not appear to fix an active security bug. There is one small defensive improvement: a helper now filters out inputs/outputs that are still committed to an earlier splice round when reporting a failed splice, which reduces the chance of accidentally double-spending a contribution. No independent security advisory, CVE, or researcher attribution is present in the materials.
Lower-priorityAdjust contribution feerate to minimum RBF feerate in funding_contributedby Jeffrey Czyz · 452ec465 · Mar 25, 2026 · 3 filesMessage 73 · AdequateLow 34Details
Commit message · Jeffrey Czyz
Adjust contribution feerate to minimum RBF feerate in funding_contributed
When splice_channel is called before a counterparty's splice exists, the user builds a contribution at their chosen feerate without a minimum RBF feerate. If the counterparty completes a splice before funding_contributed is called, the contribution's feerate may be below the 25/24 RBF requirement. Rather than always waiting for the pending splice to lock (which would proceed as a fresh splice), funding_contributed now attempts to adjust the contribution's feerate upward to the minimum RBF feerate when the budget allows, enabling an immediate RBF.
When the adjustment isn't possible (max_feerate too low or insufficient fee buffer), the contribution is left unchanged and try_send_stfu delays until the pending splice locks, at which point the splice proceeds at the original feerate.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 34/100
This commit fixes a protocol edge case in Lightning splicing. If a user prepared a splice contribution at a low fee rate, and meanwhile the other party completed their own splice, the user's contribution might no longer satisfy Bitcoin's RBF (Replace-By-Fee) minimum-bump rule. The patch makes the node automatically raise its contribution's fee rate when the budget allows, so the splice can proceed immediately as an RBF instead of stalling or falling back to a fresh splice. If the budget doesn't allow it, the node gracefully waits instead of sending an invalid message.
Lower-prioritySend BroadcastChannelAnnouncements via the broadcast queueby Matt Corallo · 6da89c22 · Mar 24, 2026 · 3 filesMessage 81 · StrongLow 33Details
Commit message · Matt Corallo
Send BroadcastChannelAnnouncements via the broadcast queue
In 47a3e5c694321dac1a1d0f53e6dcb357282a79be we started asserting that the per-peer message queue was empty when a peer connected to ensure we don't have stale messages sitting around in memory. This turned up an issue for `channel_announcement` messages generated by block connections while a peer was disconnected.
Here we push those out through the broadcast message queue rather than the per-peer message queue as there's no reason to tie them to the individual peer anyway, fixing the assertions.
This should fix #4437
Written by Claude
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Low 33/100
This commit fixes an internal consistency bug in LDK (a Lightning Network implementation in Rust). When a new block created a channel announcement while a peer was offline, the announcement was placed in that specific peer's queue. After a later change started checking that peer queues are empty on reconnect, this leftover message caused assertion failures (crashes in debug builds). The fix moves these broadcast messages into a global broadcast queue, where they belong, instead of a per-peer queue.
fuzz: improve iteration scaling, add minimization and summary table
Replace the fixed 30s run_time with iteration counts scaled to 8x corpus size (plus a 1000 baseline) with a 10-minute hard cap per target. This ensures the full corpus is replayed with room for mutations, while small targets finish quickly.
On main (and on PRs with the fuzz-minimize label), run honggfuzz corpus minimization after each target to prune inputs that don't contribute unique coverage, keeping the cache size manageable.
Print a summary table at the end with per-target stats: iterations, corpus sizes before/after fuzzing and minimization, and run times.
Other changes: - Use -q (quiet) to suppress per-iteration status output - Set 3s per-input timeout (-t 3) for all targets - Pass FUZZ_MINIMIZE env var from PR label in workflow - Check for crashes after minimization, not just after fuzzing
AI tools were used in preparing this commit.
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 evidence
AI analysis · Informational 15/100
This commit changes how the project's automated fuzz testing is run in CI. It replaces a fixed 30-second fuzzing run with a scaled iteration count, adds an optional corpus minimization step, prints a summary table, and tweaks runtime flags. There is no change to production code, user-facing behavior, or cryptographic logic. It is purely a testing infrastructure improvement.
Lower-priorityci: split fuzz sanity check into separate parallel jobby Joost Jager · b41fa33d · Mar 23, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · Joost Jager
ci: split fuzz sanity check into separate parallel job
The sanity check (cargo test on fuzz targets) doesn't use the restored corpus and was blocking the actual fuzz run. Move it to a separate fuzz_sanity job so both run in parallel.
AI tools were used in preparing this commit.
95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencedocumentation-only discount
AI analysis · Informational 15/100
This is a routine GitHub Actions CI workflow change. It moves a pre-fuzz sanity check (running cargo test on fuzz targets) out of the main fuzz job into its own parallel job so the actual fuzz run is no longer blocked waiting for the sanity check. There is no change to application code, cryptography, networking, or any user-facing behavior.
AI review queuedSkip mixed-mode assertion for replayed monitor updatesby Joost Jager · 88f99de0 · Mar 23, 2026 · 1 fileMessage 73 · AdequateLow 29Details
Commit message · Joost Jager
Skip mixed-mode assertion for replayed monitor updates
When a node restarts and switches from async to sync persistence, the in-flight monitor updates from the previous session are replayed as background events. These replayed updates are resubmitted to the Watch which now returns Completed, while earlier in-flight updates are still queued as background events. This triggered a false panic in the assertion that guards against out-of-order monitor update completion.
Track whether an update is a replay (already present in in_flight_monitor_updates) and skip the assertion for replays, since the remaining in-flight updates will be submitted by subsequent background events.
AI tools were used in preparing this commit.
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 29/100
This commit fixes a bug where LDK would incorrectly crash (panic) when restarting after switching a setting from asynchronous to synchronous persistence. The crash happened because replayed background tasks looked like they completed out of order. The fix tells LDK to skip that order-check for replayed tasks, since they are expected to look out of order during startup replay. It is a reliability/stability fix, not an exploitable security vulnerability.
AI review queuedAdd .cargo/config.toml for fuzz cfg flagsby Joost Jager · 43cf3800 · Mar 23, 2026 · 4 filesMessage 90 · StrongInformational 15Details
Commit message · Joost Jager
Add .cargo/config.toml for fuzz cfg flags
Set fuzzing, secp256k1_fuzz, and hashes_fuzz cfg flags in fuzz/.cargo/config.toml so they are automatically applied to plain cargo commands (cargo test, cargo run) run from the fuzz directory. Remove the now-redundant RUSTFLAGS from the README crash reproduction examples, the CI cargo test step, and generate_fuzz_coverage.sh.
The honggfuzz and cargo-fuzz docs are unchanged because those tools build their own RUSTFLAGS env var (which overrides config.toml) and require the flags to be exported separately.
AI tools were used in preparing this commit.
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
fuzzing or regression evidencesecond-pass: broader security terminology
AI analysis · Informational 15/100
This change is purely a developer tooling cleanup. It moves three special Rust compiler flags used only for fuzz testing into a Cargo configuration file inside the fuzz directory, so developers no longer have to type them by hand. It does not change any production code, user-facing behavior, or security-sensitive logic.
Defer monitor update completions after funding spend
When no_further_updates_allowed() is true and the persister returns Completed, ChainMonitor now overrides the return to InProgress and pushes a MonitorEvent::Completed directly into pending_monitor_events. In release_pending_monitor_events, these deferred completions are appended after per-monitor events, so ChannelManager sees the force-close MonitorEvents before the completion.
This eliminates phantom InProgress entries that would never complete: previously, a rejected pre-close update (e.g. commitment_signed arriving after funding spend) returned InProgress with no completion path, blocking MonitorUpdateCompletionActions (PaymentClaimed, PaymentForwarded) indefinitely. A subsequent post-close update returning Completed would then violate the in-order completion invariant.
AI tools were used in preparing this commit.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
boot or update path
AI analysis · Moderate 53/100
This commit fixes an internal bug in the Lightning Dev Kit's chain monitoring code. When a channel is being force-closed (because the funding transaction was spent), the code could previously get stuck: it would report a monitor update as 'in progress' forever, blocking legitimate payment completion events like 'PaymentClaimed' or 'PaymentForwarded'. In some cases, this could also break the ordering rules for monitor updates. The fix defers the completion signal until after the force-close events are processed, allowing payments to complete normally and preventing the ordering violation. There is no direct evidence this was exploitable by an attacker; it appears to be a correctness/robustness fix.
Security candidatefuzz: use process::exit panic hook in stdin_fuzz on macOSby Joost Jager · 39c8b0c8 · Mar 20, 2026 · 72 filesMessage 95 · StrongInformational 15Details
Commit message · Joost Jager
fuzz: use process::exit panic hook in stdin_fuzz on macOS
On macOS, panic=abort causes the process to call abort() which sends SIGABRT. The ReportCrash daemon then tries to generate a crash report, leaving the process stuck in an uninterruptible wait state that cannot be killed even with SIGKILL. This makes stdin_fuzz unusable for crash reproduction on macOS.
Install a custom panic hook (gated behind #[cfg(target_os = "macos")]) that flushes stdout (preserving log output), prints the panic info with a full backtrace to stderr, then calls process::exit(1) to terminate cleanly before the abort machinery runs. The hook is only installed on macOS to avoid interfering with debuggers like GDB on Linux.
AI tools were used in preparing this commit.
95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencesigning or wallet pathboot or update pathauthentication pathparser or protocol path
AI analysis · Informational 15/100
This commit only changes internal fuzz-testing helper programs so they exit cleanly on macOS instead of getting stuck when a crash occurs. It does not affect the actual Lightning Dev Kit library, real Lightning nodes, or any user-facing code. There is no security vulnerability being fixed or introduced.
Release tx_signatures after async monitor update completes
In 83b2d3e, we reworked `ChannelManager::funding_transaction_signed` such that it would also for a user to cancel a splice up until they send `commitment_signed`. Previously, we would would only emit `Event::FundingTransactionReadyForSigning` when both nodes exchanged `commitment_signed` and the corresponding monitor update completed. With the event now being generated immediately after the nodes exchange `tx_complete`, we now need to handle the monitor update not having completed by the time we are ready to send `tx_signatures`. Unfortunately, we also did not have test coverage, allowing this to go unnoticed until being caught by the fuzzer due to a debug assertion. Doing so avoids a potential funds-loss scenario if the funding transaction confirms without the counterparty's signature for our commitment being durably persisted.
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✓ Names security-relevant behavior explicitly
Why it was queued
signing boundaryfuzzing or regression evidencesigning or wallet path
AI analysis · Moderate 66/100
This commit fixes a bug in the Lightning Dev Kit where, during a special channel operation called splicing, the node could release its signatures for the new funding transaction before the local channel monitor had durably saved the counterparty's signature for the new commitment. If the funding transaction confirmed on-chain while the counterparty's signature was not yet persisted, the node could be left unable to enforce its funds, creating a potential loss of funds scenario. The fix delays sending `tx_signatures` until the asynchronous monitor update completes, and adds tests to cover this case.
Security candidateAdd test for monitor update after funding spendby Joost Jager · 1d3704d5 · Mar 19, 2026 · 1 fileMessage 78 · AdequateModerate 56Details
Commit message · Joost Jager
Add test for monitor update after funding spend
Add a regression test that reproduces the panic when a commitment_signed is processed after the counterparty commitment transaction has confirmed. The ChannelMonitor's no_further_updates_allowed() returns true, causing update_monitor to fail, which ChainMonitor overrides to InProgress. A subsequent preimage claim returning Completed then triggers the per-channel assertion that Completed must not follow InProgress.
AI tools were used in preparing this commit.
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 evidenceboot or update path
AI analysis · Moderate 56/100
This commit adds a regression test that reproduces a crash (panic) in the Lightning Dev Kit's channel monitoring logic. The crash happens when a blockchain event and a peer message arrive in an unlucky order: after the counterparty's commitment transaction confirms on-chain, the local node still processes a new commitment_signed message from that peer. The code marks the channel monitor as frozen, but a later legitimate payment preimage claim returns a success status, conflicting with the earlier frozen status and triggering an internal assertion that crashes the node.
Replace dual-sync-async persistence panic with Watch contract
Commit 0760f99 ("Disallow dual-sync-async persistence without restarting") added a panic in non-test builds when a Persist implementation returns both Completed and InProgress from the same ChannelManager instance. However, this check runs against the status that ChainMonitor returns to ChannelManager, not the raw Persist result. When ChannelMonitor::update_monitor fails (e.g. a counterparty commitment_signed arrives after a funding spend confirms), ChainMonitor persists the full monitor successfully but overrides the return value to InProgress. If the user's Persist impl only ever returns Completed, this override triggers a false mode-mismatch panic.
This replaces the panic with a per-channel contract at the Watch trait level: a Watch implementation must not return Completed for a channel update while prior InProgress updates are still pending. Switching from Completed to InProgress is always allowed, but switching back is impractical because the Watch implementation cannot observe when ChannelManager has finished processing a MonitorEvent::Completed. The documentation on ChannelMonitorUpdateStatus is updated to describe these rules.
The mode tracking and panic checks from 0760f99 are removed and replaced with a panic that validates the new contract directly on the in-flight update state. Legacy tests that switch the persister between modes mid-flight can opt out via Node::disable_monitor_completeness_assertion().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
defensive validationboot or update path
AI analysis · Low 44/100
This commit fixes a bug where the Lightning Dev Kit (LDK) node software could crash with a false alarm panic. The panic was meant to catch incorrect use of two persistence modes, but it could also fire in legitimate situations because it checked an overridden status value rather than the raw result from the user's persistence code. The fix replaces the broad panic with a more precise rule at the Watch trait level and adds a test-only opt-out for legacy tests that intentionally switch modes mid-flight.
Lower-priorityci: fix OOM in artifact upload and update actions to v4by Atishyy27 · 43066b78 · Mar 19, 2026 · 4 filesMessage 62 · AdequateInformational 15Details
Commit message · Atishyy27
ci: fix OOM in artifact upload and update actions to v4
62/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope! No meaningful explanatory body
Why it was queued
documentation-only discount
AI analysis · Informational 15/100
This commit only updates GitHub Actions configuration files. It upgrades checkout actions from v3 to v4, disables compression on a fuzzing corpus artifact upload to avoid running out of memory, and ensures one workflow fetches the full git history. There are no code changes affecting the rust-lightning software itself or its security.
fuzz: handle missing SendTx* message events in chanmon_consistency
Add handlers for SendTxInitRbf, SendTxAckRbf, SendTxRemoveInput, and SendTxRemoveOutput in the chanmon_consistency fuzz target. These variants were reachable but not matched, causing panics on the wildcard arm ("Unhandled message event").
SendTxInitRbf became reachable after commit 5873660a0 added splicing support without updating the fuzz target's message delivery logic.
AI tools were used in preparing this commit.
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 evidence
AI analysis · Informational 17/100
This commit fixes a fuzz testing harness so it can handle four new types of message events related to the experimental splicing feature. Previously, the harness would panic with 'Unhandled message event' when these messages appeared during automated fuzzing. This is a test-only fix and does not change the production Lightning protocol code that real nodes run.
Security candidateAssign random ids to monitor eventsby Valentine Wallace · 4f385aee · Mar 18, 2026 · 6 filesMessage 73 · AdequateInformational 24Details
Commit message · Valentine Wallace
Assign random ids to monitor events
Currently, the resolution of HTLCs (and decisions on when HTLCs can be forwarded) is the responsibility of Channel objects (a part of ChannelManager) until the channel is closed, and then the ChannelMonitor thereafter. This leads to some complexity around race conditions for HTLCs right around channel closure. Additionally, there is lots of complexity reconstructing the state of all HTLCs in the ChannelManager deserialization/loading logic.
Instead, we want to do all resolution in ChannelMonitors (in response to ChannelMonitorUpdates) and pass them back to ChannelManager in the form of MonitorEvents (similar to how HTLCs are resolved after channels are closed). In order to have reliable resolution, we'll need to keep MonitorEvents around in the ChannelMonitor until the ChannelManager has finished processing them. This simplifies things - on restart instead of examining the set of HTLCs in monitors we can simply replay all the pending MonitorEvents.
To allow the ChannelManager to ack specific monitor events once they are resolved, here we give each MonitorEvent a corresponding unique id. It's implemented in such a way that we can delete legacy monitor event serialization in future LDK versions when persistent monitor events are enabled by default.
73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
boot or update path
AI analysis · Informational 24/100
This commit is a code-quality and architecture refactor in a Lightning Network library. It assigns random unique IDs to internal 'monitor events' so the system can reliably track which events have been processed after a restart. The change itself does not fix an active security bug; it lays groundwork for a future simplification of how payment resolution is handled. There is no evidence in the commit or supplied references that this is a disclosed security fix or that it addresses a known exploit.
Security candidateFail HTLCs from late counterparty commitment updates after funding spendby Joost Jager · 3e1a18c8 · Mar 18, 2026 · 4 filesMessage 73 · AdequateModerate 68Details
Commit message · Joost Jager
Fail HTLCs from late counterparty commitment updates after funding spend
When a ChannelMonitorUpdate containing a new counterparty commitment is dispatched (e.g. via deferred writes) before a channel force-closes but only applied to the in-memory monitor after the commitment transaction has already confirmed on-chain, the outbound HTLCs in that update must be failed back.
Add fail_htlcs_from_update_after_funding_spend to ChannelMonitorImpl which detects this race condition during update_monitor. When a LatestCounterpartyCommitmentTXInfo or LatestCounterpartyCommitment update is applied and the funding output has already been spent, the function iterates all outbound HTLCs from the update and creates OnchainEvent::HTLCUpdate entries for those that need to be failed back. These entries mature after ANTI_REORG_DELAY blocks, giving time for the peer to potentially broadcast the newer commitment.
HTLCs that appear as non-dust outputs in the confirmed commitment (whether counterparty or holder) are skipped, as they will be resolved on-chain via the normal HTLC timeout/success path. HTLCs already fulfilled by the counterparty (tracked in counterparty_fulfilled_htlcs) are also skipped. Duplicate failures from previously-known counterparty commitments are handled gracefully by the ChannelManager.
AI tools were used in preparing this commit.
73/100 · AdequateMessage clarity
✓ Specific, 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 race condition in the Lightning Dev Kit's channel monitoring code. In simple terms, when a Lightning channel is force-closed, the software must correctly fail back any outstanding payments that are stuck. Previously, if a monitor update containing new payment information was queued but only applied after the channel's funding transaction was already spent on-chain, those payments might not be properly failed back. The patch adds logic to detect this situation and create the necessary failure events, while skipping payments that already have on-chain outputs or were already fulfilled. It also ensures the event processor is notified after flushing monitor updates.
Implement deferred monitor write queueing and flushing
Replace the unimplemented!() stubs with a full deferred write implementation. When ChainMonitor has deferred=true, Watch trait operations queue PendingMonitorOp entries instead of executing immediately. A new flush() method drains the queue and forwards operations to the internal watch/update methods, calling channel_monitor_updated on Completed status.
The BackgroundProcessor is updated to capture pending_operation_count before persisting the ChannelManager, then flush that many writes afterward - ensuring monitor writes happen in the correct order relative to manager persistence.
Key changes: - Add PendingMonitorOp enum and pending_ops queue to ChainMonitor - Implement flush() and pending_operation_count() public methods - Integrate flush calls in BackgroundProcessor (both sync and async) - Add TestChainMonitor::new_deferred, flush helpers, and auto-flush in release_pending_monitor_events for test compatibility - Add create_node_cfgs_deferred for deferred-mode test networks - Add unit tests for queue/flush mechanics and full payment flow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Low 42/100
This commit finishes a previously stubbed-out feature in a Bitcoin Lightning node library. It lets the node delay saving certain channel safety records (called 'monitor writes') until after the main channel state file is saved. The goal is to prevent a crash from leaving the node in a state where the safety record is newer than the main state, which could force-close channels and cost on-chain fees. The change itself is a defensive correctness improvement, not an obvious new vulnerability, but it touches sensitive persistence ordering and replaces unimplemented!() panic stubs with real logic.