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 fixes a bug in the Lightning Dev Kit's handling of channel monitor updates that are refused because the channel's funding transaction was already spent on-chain. Previously, such refused updates were persisted as a full monitor…
Durability ordering bug: later MonitorEvent::Completed could imply earlier refused update was persistedRefused monitor update may carry forwarded HTLC preimage, creating risk of inconsistent state across restartAsynchronous persistence tracking gap for refused updates
This commit only adds and modifies test code in rust-lightning. It expands test coverage for a specific edge case in Lightning channel splicing: when a splice transaction gets confirmed before both peers have finished exchanging signatures…
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…
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
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
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.
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 …
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…
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
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
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
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
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`
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
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
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
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
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…
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
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 …
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Lower-priorityLog unknown channel_update with dont_forward at debug level instead of warnby Thrishalmadasu · 4f9d6511 · Jan 30, 2026 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · Thrishalmadasu
Log unknown channel_update with dont_forward at debug level instead of warn
50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100
This commit simply changes one log message from 'warning' level to 'debug' level. It does not fix a security bug, change any behavior, or alter how the software processes network messages. The change reduces log noise when LDK receives a channel_update it does not recognize.
Lower-priorityExtend full_stack fuzz test to cover splicingby Wilmer Paulino · b52b0692 · Jan 30, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Wilmer Paulino
Extend full_stack fuzz test to cover splicing
This includes a new seed that covers the splice flow to completion (exchanging `splice_locked` and promoting the `FundingScope`).
Co-Authored-By: Claude Opus 4.5 <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 evidence
AI analysis · Informational 15/100
This commit is a routine test improvement. It extends an existing fuzzing harness to exercise the new Lightning channel splicing feature, adding test-only code and a deterministic seed that walks through a splice-in flow. There is no change to production code, no bug fix, and no security patch.
Lower-priorityBuffer interactive-tx initial commitment signed from counterpartyby Wilmer Paulino · 7e226a03 · Jan 29, 2026 · 3 filesMessage 73 · AdequateLow 37Details
Commit message · Wilmer Paulino
Buffer interactive-tx initial commitment signed from counterparty
This is crucial to enable the splice cancellation use case. When we process the initial commitment signed from our counterparty, we queue a monitor update that cannot be undone. To give the user a chance to abort the splice negotiation before it's committed to, we buffer the message until a successful call to `Channel::funding_transaction_signed` and process it then.
Note that this is currently only done for splice and RBF attempts, as if we want to abort a dual funding negotiation, we can just force close the channel as it hasn't been funded yet.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 37/100
This change is a defensive fix for the Lightning Dev Kit's handling of channel splicing. Previously, when a counterparty sent their initial commitment signature during a splice negotiation, LDK would immediately apply an irreversible monitor update. That made it impossible for the user to safely cancel the splice if they changed their mind. The patch buffers that counterparty message and only processes it after the user explicitly approves the splice by calling funding_transaction_signed. This prevents a state where a splice could be partially committed to before the user actually wanted to proceed.
Support funding_transaction_signed for unfunded dual-funded channels
Now that we require users to first call `ChannelManager::funding_transaction_signed` before releasing any signatures, it's possible that it is called before we receive the initial commitment signed from our counterparty, which would transition the channel to funded. Because of this, we need to support the API call while the channel is still in the unfunded phase.
Note that this commit is mostly a code move of `FundedChannel::funding_transaction_signed` to `Channel::funding_transaction_signed` that doesn't alter the signing logic.
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 boundary
AI analysis · Low 32/100
This commit moves the handling of funding-transaction signatures so it can be called earlier, while a dual-funded Lightning channel is still unfunded. Previously the API required the channel to already be in a funded state, which could fail if a user signed before the counterparty's first commitment arrived. The change is described by the authors as mostly a code move that does not alter the actual signing logic.
Previously, we'd emit a FundingTransactionReadyForSigning event once the initial commitment_signed is exchanged for a splicing/dual-funding attempt and require users to call back with their signed inputs using ChannelManager::funding_transaction_signed. While this approach worked in practice, it prevents us from abandoning a splice if we cannot or no longer wish to sign as the splice has already been committed to by this point.
This commit reworks the API such that this is now possible. After exchanging tx_complete, we will no longer immediately send our initial commitment_signed. We will now emit the FundingTransactionReadyForSigning event and wait for the user to call back before releasing both our initial commitment_signed and our tx_signatures. As a result, the event is now persisted, as there is only one possible path in which it is generated. Note that we continue to only emit the event if a local contribution to negotiated transaction was made.
Future work will expose a cancellation API such that we can abandon splice attempts safely (we can just force close the channel with dual-funding).
This commit reorders the splicing/dual-funding handshake in LDK so that the node does not send its initial commitment signature until after the user has had a chance to sign the funding transaction. Previously, the commitment was sent first, which locked the node into the splice even if the user could not or did not want to sign. The change also makes the 'ready to sign' event persistent across restarts and adds a forward-compatibility note that downgrading while a splice is pending is not supported with async monitor updates. It is a protocol-flow hardening change, not a fix for an active exploit.
Lower-priorityRemove `rustfmt::skip` from `utxo.rs`by Elias Rohrer · 821559b9 · Jan 29, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Elias Rohrer
Remove `rustfmt::skip` from `utxo.rs`
Signed-off-by: Elias Rohrer <dev@tnull.de>
60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100
This commit is purely a code cleanup: it removes formatting-suppression markers (`#[rustfmt::skip]`) from the file `lightning/src/routing/utxo.rs` and lets rustfmt reformat the code. There is no functional change, no bug fix, and no security-relevant behavior change.
AI review queuedFix race condition in async `UtxoFuture` resolutionby Elias Rohrer · 114f6b56 · Jan 29, 2026 · 1 fileMessage 73 · AdequateLow 43Details
Commit message · Elias Rohrer
Fix race condition in async `UtxoFuture` resolution
Previously, we refactored the `GossipVerifier` to not require holding a circular reference. As part of this, we moved to a model where the `UtxoFuture`s are now polled by the background processor which checks for completion through `get_and_clear_pending_msg_events`.
However, as part of this refactor we introduced race-condition: as we only held `Weak` references in `PendingChecksContext` and the `UtxoFuture` was directly dropped by the `GossipVerifier` after calling `resolve`, the actual data was dropped with the future and gone when the background processor attempted to retrieve and apply it via `check_resolved_futures`.
Here, we fix this issue by simply holding on to the `state` `Arc`s in a separate `pending_states` `Vec` that is only pruned in `check_resolved_futures`, ensuring any completed results are collected first.
Signed-off-by: Elias Rohrer <dev@tnull.de>
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 43/100
This commit fixes a race condition in how the Lightning Dev Kit processes background checks on channel announcements (UTXO lookups). Previously, the result of a completed check could be thrown away before another part of the system could collect it, meaning valid gossip messages might be silently lost and not applied to the network graph. The fix keeps the result alive until it is explicitly collected.
Lower-priorityDon't override log context set by inner `WithContext`sby Matt Corallo · 878e632c · Jan 28, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo
Don't override log context set by inner `WithContext`s
If a logger is wrapped with `WithContext` which is then wrapped with another `WithContext` with different values, we want to use the context information set closest to the code, ie that which will be set first.
Thus, here, we avoid overriding context that has already been set.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100
This commit fixes a logging behavior bug where an outer log-context wrapper would overwrite context fields already set by an inner wrapper. The change makes context values stick to the closest (innermost) source, which is the intended behavior. There is no security vulnerability here—only a correctness improvement to log metadata.
Lower-priorityAdd `PaymentId` to logging `Record`sby Matt Corallo · 253ceede · Jan 28, 2026 · 4 filesMessage 80 · StrongInformational 15Details
Commit message · Matt Corallo
Add `PaymentId` to logging `Record`s
While `PaymentHash`es are great for searching logs, in the case of BOLT 12 the hash isn't selected until well into the payment process. Thus, its important that we allow for filtering by `PaymentId` as well to ensure payment-related logs are always reliably searchable.
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 15/100
This commit only adds a new piece of information—the PaymentId—to log records so operators can search logs more reliably, especially for newer BOLT 12 payments where the payment hash isn't known early. It does not change any payment logic, cryptography, network handling, or access controls, and it does not fix or introduce any security vulnerability.
Lower-priorityRequire `WithContext` log wrappers on `OutboundPayments` callsby Matt Corallo · 5e64c401 · Jan 28, 2026 · 2 filesMessage 93 · StrongInformational 15Details
Commit message · Matt Corallo
Require `WithContext` log wrappers on `OutboundPayments` calls
In much of LDK we pass around `Logger` objects both to avoid having to `Clone` `Logger` `Deref`s (soon to only be `Logger`s) and to allow us to set context with a wrapper such that any log calls on that wrapper get additional useful metadata in them.
Sadly, when we added a `Logger` type to `OutboundPayments` we broke the ability to do the second thing - payment information logged directly or indirectly via logic in the `OutboundPayments` has no context making log-searching rather challenging.
Here we fix this by retunring to passing loggers explicitly to `OutboundPayments` methods that need them, specifically requiring `WithContext` wrappers to ensure the callsite sets appropriate context on the logger.
Fixes #4307
93/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
AI analysis · Informational 15/100
This change is a code-quality and observability fix, not a security patch. The developers noticed that payment-related log messages from an internal component called OutboundPayments were missing useful context (like the payment hash), making it harder to search and debug logs. They fixed it by passing a specially-wrapped logger into each OutboundPayments call so the context is attached at the point where the call is made. There is no vulnerability being fixed here.
Lower-priorityln: add function to build trampoline forwarding onionsby Carla Kirk-Cohen · d7955f94 · Jan 28, 2026 · 1 fileMessage 50 · ThinTriage 0Details
Commit message · Carla Kirk-Cohen
ln: add function to build trampoline forwarding onions
50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Lower-priorityUse a single `WithContext` wrapper rather than several log-wrappersby Matt Corallo · 0f253c0b · Jan 28, 2026 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo
Use a single `WithContext` wrapper rather than several log-wrappers
In `ChannelMonitor` logging, we often wrap a logger with `WithChannelMonitor` to automatically include metadata in our structured logging. That's great, except having too many logger wrapping types flying around makes for less compatibility if we have methods that want to require a wrapped-logger.
Here we change the `WithChannelMonitor` "constructors" to actually return a `WithContext` instead, making things more consistent.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100
This is a routine internal code cleanup in a Lightning network library. It replaces a custom logger wrapper type with a shared, existing wrapper type. There is no change to user-facing behavior, no bug fix, and no security-relevant change.
Lower-priorityRefactor monitor file listing in tests to filter .tmp filesby Joost Jager · beccec2d · Jan 28, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Joost Jager
Refactor monitor file listing in tests to filter .tmp files
Extract common logic for listing monitor files into a helper function that filters out temporary .tmp files created during persistence operations. This simplifies test code and improves reliability on systems where directory iteration order is non-deterministic.
Co-Authored-By: Claude Opus 4.5 <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 · Informational 15/100
This commit only changes test code in the Lightning Dev Kit Rust library. It extracts repeated logic for listing monitor files into a small helper function that ignores temporary `.tmp` files. There is no change to production code, no security fix, and no vulnerability being addressed.
Lower-priorityAdd basic `CLAUDE.md` fileby Elias Rohrer · 8b1386c7 · Jan 28, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Elias Rohrer
Add basic `CLAUDE.md` file
We add a basic `CLAUDE.md` file pointing it to some workspace specifics (in particular running `cargo fmt` on 1.75.0 MSRV, and using `./ci/ci-tests.sh` to run tests).
Signed-off-by: Elias Rohrer <dev@tnull.de>
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
documentation-only discount
AI analysis · Informational 15/100
This commit adds a documentation file (CLAUDE.md) that gives instructions to an AI coding assistant about how to work with the project. It does not change any program code, build scripts, tests, or configuration that could affect security.
Lower-prioritySupport generic HTLC interceptionby Matt Corallo · a0723ad7 · Jan 27, 2026 · 10 filesMessage 70 · AdequateLow 37Details
Commit message · Matt Corallo
Support generic HTLC interception
At various points we've had requests to support more generic HTLC interception in LDK. In most cases, full HTLC interception was not, in fact, the right way to accomplish what the developer wanted, but there have been various times when it might have been.
Here, we finally add full HTLC interception support, doing so with a configurable bitfield to allow developers to intercept only certain classes of HTLCs.
Specifically, we currently support intercepting HTLCs: * which were to be forwarded to intercept SCIDs (as was already supported), * which were to be forwarded to offline private channels (for LSPs to accept HTLCs for offline clients so that they can attempt to wake them before failing the HTLC), * which were to be forwarded to online private channels (for LSPs to take additional fees or enforce certain policies), * which were to be forwarded over public channels (for general forwarding policy enforcement), * which were to be forwarded to unknown SCIDs (for everything else).
This commit expands an existing Lightning payment interception feature in LDK. Previously, developers could only intercept payments routed through special fake channel IDs. Now they can intercept a wider range of forwarded payments (private channels, public channels, unknown channel IDs) using a configurable bitfield. The change is a feature addition, not a fix for a known vulnerability, but it touches sensitive payment-forwarding logic and changes a public configuration option from a boolean to a bitfield.
Lower-priorityMove HTLC interception decisions to `forward_htlcs` callsitesby Matt Corallo · 04351fd8 · Jan 27, 2026 · 3 filesMessage 85 · StrongLow 35Details
Commit message · Matt Corallo
Move HTLC interception decisions to `forward_htlcs` callsites
In the next commit we'll substantially expand the types of HTLCs which can be intercepted. In order to do so, we want to make forwarding decisions with access to the (specified) destination channel. Sadly, this isn't available in `forward_htlcs`, so here we move interception decisions out of `forward_htlcs` and into `process_pending_update_add_htlcs` and `handle_release_held_htlc`.
Note that we do not handle HTLC interception when forwarding an HTLC which was decoded in LDK versions prior to 0.2, which is noted in a suggested release note. This is due to a gap where such HTLC might have had its routing decision made already and be waiting for an interception decision in `forward_htlcs`, but now we will only make an interception decision when decoding the onion.
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 35/100
This commit refactors when and where the Lightning node decides to intercept HTLCs (payments it is asked to forward). It moves the interception decision from a later forwarding stage to the earlier moment when the incoming HTLC is decoded. The change is preparatory work for a larger feature and includes a noted backwards-compatibility limitation: HTLCs first received on LDK versions before 0.2 will no longer be intercepted and will instead be forwarded or failed automatically. There is no direct evidence in the commit that this fixes an active security vulnerability, but it changes payment-handling logic in a security-sensitive area.
Lower-priorityExpose the outgoing HTLC's CLTV expiry in `Event::HTLCIntercepted`by Matt Corallo · ce91315b · Jan 27, 2026 · 3 filesMessage 73 · AdequateInformational 20Details
Commit message · Matt Corallo
Expose the outgoing HTLC's CLTV expiry in `Event::HTLCIntercepted`
In the previous commit our interception documentation noted that in some cases devs may wish to validate the CLTV expiry of HTLCs before forwarding. Here we enable that by exposing the next-hop's CLTV value in `Event::HTLCIntercepted`
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
defensive validation
AI analysis · Informational 20/100
This commit adds a new piece of information—the outgoing HTLC's CLTV expiry block height—to the Event::HTLCIntercepted event in the Lightning Dev Kit. This lets developers who intercept payments inspect when the forwarded HTLC would time out, so they can validate it before forwarding. It is a feature/API enhancement, not a fix for an active vulnerability.
Lower-priorityDrop lockorder comments on `ChannelManager`by Matt Corallo · 653692ea · Jan 27, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Matt Corallo
Drop lockorder comments on `ChannelManager`
While its nice to document things, the lockorder comment at the top of `ChannelManager` is just annoying to always update and doesn't add all that much value. Developers likely shouldn't be checking it while writing code, our automated lockorder issue detection framework more than suffices to catch any bugs in test-reachable code. That makes it basically write-only which isn't exactly a useful comment.
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 15/100
This commit only removes documentation comments describing the order in which internal locks should be acquired in the ChannelManager. No code logic, lock usage, or behavior changed. It is a cleanup of stale developer comments, not a security fix or vulnerability.
Lower-priorityMove HTLC holding into HTLC decode from `forward_htlcs`by Matt Corallo · b5d1f7e2 · Jan 27, 2026 · 1 fileMessage 85 · StrongLow 35Details
Commit message · Matt Corallo
Move HTLC holding into HTLC decode from `forward_htlcs`
When we added support for async payments (which requires holding HTLCs until we receive an onion message), we added the hold logic to `ChannelManager::forward_htlcs`. This made sense as we reused the forwarding datastructure in the holding logic so already had the right types in place, but it turns out only a single call of `forward_htlcs` should ever result in an HTLC being held.
All of the other calls (un-holding an HTLC, forwarding an intercepted HTLC, forwarding an HTLC decoded by LDK prior to 0.2, or processing a phantom receive) should never result in an HTLC being held. Instead, HTLCs should actually only ever be held when the HTLC is decoded in `process_pending_update_add_htlcs` before forwarding.
Because of this, and because we want to move the interception (and thus also the holding logic) out of `forward_htlcs`, here we move the holding logic into `process_pending_update_add_htlcs`.
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 35/100
This commit is a code cleanup that moves where in the program Lightning payments are intentionally held (paused) for async delivery. It does not add or remove security behavior, but it changes which internal function is responsible for deciding to hold a payment. Because the change is described as a prerequisite for moving interception logic out of a central forwarding function, it could affect correctness of payment handling if done wrong, but the diff itself appears to preserve the same hold logic in a different location.
Lower-priorityDRY HTLC failure paths in `process_pending_update_add_htlcs`by Matt Corallo · 4d5b0a6e · Jan 27, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo
DRY HTLC failure paths in `process_pending_update_add_htlcs`
50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100
This commit is a straightforward code cleanup that removes repeated HTLC failure handling code by introducing a small macro. It also improves logging context and adds a duplicate-intercept error log. There is no security fix or behavior change visible in the diff.
Lower-priorityFix the HTLC failure reason reported when a peer is offlineby Matt Corallo · d497ec20 · Jan 27, 2026 · 2 filesMessage 73 · AdequateLow 33Details
Commit message · Matt Corallo
Fix the HTLC failure reason reported when a peer is offline
If a peer is offline, but only recently went offline and thus the channel has not yet been marked disabled in our gossip, we should be returning `LocalHTLCFailureReason::PeerOffline` rather than `LocalHTLCFailureReason::ChannelNotReady`. Here we fix the error returned and tweak documentation to make the cases clearer.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 33/100
This commit fixes a small but meaningful error-code bug in the Lightning Dev Kit. When a payment is being routed through a node whose peer just went offline (but the network gossip hasn't yet marked the channel as disabled), the node was incorrectly reporting 'channel not ready' instead of 'peer offline'. The fix makes the reported failure reason accurate, which helps other nodes and payment senders understand why a route failed and choose better routes.
Add validation for bech32 padding in BOLT 12 offer parsing per BIP-173 which states: "Any incomplete group at the end MUST be 4 bits or less, MUST be all zeroes, and is discarded."
This adds a test vector from the BOLT specification that ensures offers with invalid padding (exceeding the 4-bit limit) are properly rejected.
Previously, LDK would accept offers with invalid bech32 padding. This was identified through differential fuzzing across Lightning implementations (see lightning/bolts#1312).
The fix calls `validate_segwit_padding()` from the bech32 crate during offer parsing, and introduces a new `InvalidPadding` variant to `Bolt12ParseError` to surface these errors.
✓ 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
defensive validationfuzzing or regression evidence
AI analysis · Low 45/100
This change fixes how LDK parses BOLT 12 offers encoded in bech32. Previously, LDK accepted offers whose bech32 padding was invalid according to the BIP-173 standard. The fix now rejects such malformed offers, matching the protocol specification and preventing potential parsing disagreements between Lightning implementations.
AI review queued`ElectrumSyncClient`: Skip unconfirmed `get_history` entriesby Elias Rohrer · cc1eb168 · Jan 23, 2026 · 1 fileMessage 73 · AdequateLow 49Details
Electrum's `blockchain.scripthash.get_history` will return the *confirmed* history for any scripthash, but will then also append any matching entries from the mempool, with respective `height` fields set to 0 or -1 (depending on whether all inputs are confirmed or not).
Unfortunately we previously only included a filter for confirmed `get_history` entries in the watched output case, and forgot to add such a check also when checking for watched transactions. This would have us treat the entry as confirmed, then failing on the `get_merkle` step which of course couldn't prove block inclusion. Here we simply fix this omission and skip entries that are still unconfirmed (e.g., unconfirmed funding transactions from 0conf channels).
Signed-off-by: Elias Rohrer <dev@tnull.de>
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 49/100
This patch fixes a bug in rust-lightning's Electrum-based transaction sync. When checking whether watched transactions were confirmed, the code previously treated unconfirmed mempool entries from Electrum's get_history as if they were already confirmed. It would then try to fetch a Merkle proof of block inclusion, which cannot exist for an unconfirmed transaction, causing a failure. The fix skips any history entry whose height is 0 or -1 (unconfirmed) in the watched-transaction path, matching what was already done for watched outputs. A debug assertion was also replaced with a proper error log and return if a server returns duplicate history entries.
AI review queuedrustfmt: format priv_short_conf_testsby Thrishalmadasu · b0883ba5 · Jan 23, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Thrishalmadasu
rustfmt: format priv_short_conf_tests
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 only reformats a test file using rustfmt. It changes whitespace and line breaks but does not alter any actual code logic, behavior, or security-sensitive functionality. There is no security impact.
Lower-prioritySet dont_forward on private channel updates and add testsby Thrishalmadasu · 194678d4 · Jan 23, 2026 · 2 filesMessage 60 · AdequateLow 48Details
Commit message · Thrishalmadasu
Set dont_forward on private channel updates and add tests
60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Low 48/100
This commit fixes a protocol-compliance issue in LDK's Lightning channel update messages. Private (unannounced) channels now correctly set the 'dont_forward' flag on their channel_update messages, telling other nodes not to relay them across the network. Public channels continue not to set this flag. The change also adds a warning log when a node receives a channel_update for an unknown channel that has dont_forward set, which can help diagnose configuration mistakes. This is a correctness and privacy improvement rather than a critical vulnerability.