LDK
← All projectsLightning Dev Kit

rust-lightning

Composable Rust libraries for building Lightning wallets, nodes, and services.

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1672 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

254security candidates228second-pass queue1527AI analyses
83commits · 30 days
183commits · 60 days
554commits · 180 days
1255commits · 365 days
Backfill bands
Aug 5 → Feb 6819 seen18 candidatesComplete
Feb 6 → Jun 6468 seen16 candidatesComplete
Jun 6 → Jul 6128 seen8 candidatesComplete
Jul 6 → Aug 561 seen3 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

70/100 average clarity
478Strong · 80–100
837Adequate · 60–79
295Thin · 40–59
62Opaque · 0–39
3security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Elias Rohrer15315153667
Matt Corallo43754372574
Jeffrey Czyz19545182169
Wilmer Paulino15945155169
Leo Nash11613116162
Valentine Wallace14612139169
Vincenzo Palazzo11311183
Joost Jager16224162069
elnosh391333058
auto-pr-bot2578087
shaavan22622069
Carla Kirk-Cohen78366068
Analysis record

Published AI watches

Last scanned 7 minutes ago

Moderate 57 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Don't track refused monitor updates as pending' (#5030)

This patch fixes a bookkeeping bug in rust-lightning's ChainMonitor. When a channel monitor refuses an update (for example, because the channel is already force-closing), the code used to still record that update as 'pending completion.' B…

State inconsistency: pending monitor updates tracked for updates that will never completePotential denial of service / channel freeze: stale pending entry could block completion actionsLightning-specific risk: delayed or blocked PaymentClaimed event could affect fund recovery timing
47850384by Matt Corallo+44−132 files
No security note in commit
Moderate 55 AI analysisMessage 76 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Persistent `MonitorEvent`s' (#4491)

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
9a324e72by wpaulino+467−45912 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix payment attribution edge cases and simplify claiming' (#5021)

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
ee7c61c2by Matt Corallo+256−17322 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'release utxos from failed splices' (#4973)

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)
7220a6fdby jkczyz+295−383 files
No security note in commit
Low 49 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Restore `Wallet` UTXO locks when coin selection fails afterwards

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
81afd9caby elnosh+146−331 file
No security note in commit
Moderate 66 AI analysisMessage 68 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Don't track refused monitor updates as pending

This patch fixes a bookkeeping bug in rust-lightning's ChainMonitor. When a monitor update is rejected (for example, because the channel funding has already been spent), the code may persist the entire monitor instead of the individual upd…

State inconsistency: rejected monitor update tracked as pending-persist despite never being persisted individuallyDenial-of-service-like effect: completion actions blocked until restartForce-close risk: stalled forwarding channel can lead to HTLC timeout and force close
ada0cb7aby Valentine Wallace+44−132 files
Vendor flagged security relevance
Informational 19 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'tx-sync: Parallelize esplora status queries' (#4913)

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
c303f515by Matt Corallo+140−371 file
No security note in commit
Low 30 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Skip Electrum creator transaction downloads' (#4992)

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
c36e50cbby Matt Corallo+142−02 files
No security note in commit
Low 44 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Use preferred sPK of watched txn in electrum, not rand ones' (#4867)

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
bfe5ca89by tnull+52−243 files
No security note in commit
Low 33 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Serialize transient Event variants; move persist decision into ChannelManager' (#4791)

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
a0d4632eby Matt Corallo+694−818 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Document that funding signing events can go stale' (#4960)

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 …

26eecf2dby Matt Corallo+15−02 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add `Wallet::release_utxos` to free UTXOs from abandoned transactions

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
52ab13fdby elnosh+148−43 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop the honggfuzz version pin from the CI fuzz job

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…

4a1635efby auto-pr-bot+1−51 file
No security note in commit
Informational 15 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Run the CI fuzz job on the stable toolchain

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…

21c4ed2bby auto-pr-bot+3−32 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Expose the dummy-hop tail constructor publicly

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
c5443353by auto-pr-bot+14−71 file
No security note in commit
Moderate 54 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Fail commitment sig verification without counterparty params

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
de7ecc2fby auto-pr-bot+24−01 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Clarify the commitment validation failure message

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…

3284a006by auto-pr-bot+11−114 files
No security note in commit
Moderate 61 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Move holder commit sig checks to `InMemorySigner`' (#4885)

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'
83f5ba55by Matt Corallo+626−31024 files
No security note in commit
Low 42 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Drop stale splice signature on disconnect' (#4954)

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
c9a77251by Matt Corallo+22−12 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop stale splice signature on disconnect

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
71405b4bby Wilmer Paulino+22−12 files
Vendor flagged security relevance
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Lower-priorityRemove now-unused ServeStaticInvoice::invoice_idby Valentine Wallace · e159ae42 · Aug 21, 2025 · 5 filesMessage 68 · AdequateInformational 15Details
Commit message · Valentine Wallace

Remove now-unused ServeStaticInvoice::invoice_id

In the initially-merged version of the static invoice server protocol, the
static invoice server would sometimes have to find a specific static invoice
based on (recipient_id, invoice_slot) and sometimetimes based on (recipient_id,
invoice_id). This made the API harder to use in terms of how the server would
index into the KVStore.

Over the course of the previous commits we transitioned to the server always
finding a specific invoice based on (recipient_id, invoice_slot). We still have
a few dangling references to invoice_id in some messages and events though, so
remove those here.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a routine cleanup of an internal messaging protocol. It removes a now-unused field called invoice_id and standardizes on a different identifier (invoice_slot) for looking up stored invoices. There is no security fix here; it is purely a simplification of the code and data structures.

Lower-priorityReplace StaticInvoiceReq::invoice_id with ::inv_slotby Valentine Wallace · f53325bf · Aug 21, 2025 · 5 filesMessage 73 · AdequateInformational 15Details
Commit message · Valentine Wallace

Replace StaticInvoiceReq::invoice_id with ::inv_slot

In the initially-merged version of the static invoice server protocol, the
static invoice server would sometimes have to find a specific static invoice
based on (recipient_id, invoice_slot) and sometime based on (recipient_id,
invoice_id). This made the API harder to use in terms of how the server would
index into the KVStore.

We'd like to transition to the server always finding a specific invoice based on
(recipient_id, invoice_slot) and get rid of the invoice_id concept.

Previously, when an invoice request would come in for the server on behalf of
the often-offline recipient, they would need to find the static invoice based
on the recipient_id and invoice_id. However, previous commits have now led to
the server being able to use the invoice_slot in the initial offer paths that
they create, which we do here, obviating the need for them to create their own
randomly-generated invoice_id. The final dangling references to the invoice_id
will be removed in the next commit.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit is a straightforward internal API cleanup in the experimental static-invoice-server protocol. It replaces a randomly-generated 128-bit invoice_id with a simpler 16-bit invoice_slot when looking up stored invoices. There is no security fix here—just making the database lookup key consistent and easier to use.

Lower-priorityRemove now-unused ServeStaticInv::inv_slot from OMby Valentine Wallace · 06f20197 · Aug 21, 2025 · 3 filesMessage 73 · AdequateInformational 18Details
Commit message · Valentine Wallace

Remove now-unused ServeStaticInv::inv_slot from OM

In the initially-merged version of the static invoice server protocol, the
static invoice server would sometimes have to find a specific static invoice
based on (recipient_id, invoice_slot) and sometime based on (recipient_id,
invoice_id). This made the API harder to use in terms of how the server would
index into the KVStore.

We'd like to transition to the server always finding a specific invoice based on
(recipient_id, invoice_slot) and get rid of the invoice_id concept.

In the previous commit the server began including the invoice_slot in the
ServeStaticInvoice blinded path context that gets provided back to themselves.
Therefore there is no need for the recipient to redundantly include it in the
ServeStaticInvoice onion message itself.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This commit removes an unused data field called invoice_slot from a message type used in a new Lightning protocol feature for storing static invoices on a server. The change is described by the developers as a cleanup to simplify how the server looks up stored invoices. There is no indication in the commit that this fixes a security bug; it appears to be a normal API and protocol simplification.

Lower-priorityTrack invoice_slot in ServeStaticInvoice contextby Valentine Wallace · 748c04a0 · Aug 21, 2025 · 3 filesMessage 80 · StrongInformational 18Details
Commit message · Valentine Wallace

Track invoice_slot in ServeStaticInvoice context

In the initially-merged version of the static invoice server protocol, the
static invoice server would sometimes have to find a specific static invoice
based on (recipient_id, invoice_slot) and sometime based on (recipient_id,
invoice_id). This made the API harder to use in terms of how the server would
index into the KVStore.

We'd like to transition to the server always finding a specific invoice based on
(recipient_id, invoice_slot) and get rid of the invoice_id concept.

As part of this series of commits, include the invoice_slot in the
ServeStaticInvoice blinded path context that the server creates when sending an
offer_paths message. This is possible due to a previous commit including the
invoice_slot in the initial offer_paths_request from the recipient, and lays
the groundwork for removing the invoice_id field from this blinded path
context.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 18/100

This commit is a small internal cleanup in the code that handles static Lightning invoices. It makes the software remember an 'invoice_slot' number earlier in the process so that later, when serving a stored invoice, the server can look it up by slot number instead of relying only on an 'invoice_id'. The change adds a new field to a protocol data structure and threads it through the request/response flow. There is no indication this fixes a security bug; it appears to be a design/API simplification.

Lower-priorityCache pending offer in specific invoice slotby Valentine Wallace · ed0bf367 · Aug 21, 2025 · 3 filesMessage 68 · AdequateLow 26Details
Commit message · Valentine Wallace

Cache pending offer in specific invoice slot

When we as an async recipient receive offer paths from the static invoice server,
we create an offer and cache it, retrying persisting a corresponding invoice with
the server until it succeeds.

In the initially-merged version of this protocol, we would put this cached
offer in any slot in the cache that needed an offer at the time the offer paths
were received. However, in the last commit we started requesting offer paths
for a specific slot in the cache, as part of eliminating the use of the
invoice_id field in the overall protocol.

As a result, here we put the cached offer in the specific cache slot that the
original OfferPathsRequest indicated, rather than any slot that could use a new
offer.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 26/100

This commit tightens up how a Lightning node caches payment offers when receiving them from a static invoice server. Previously, the node would place a newly received offer into any open slot in its cache. After this change, it stores the offer only in the specific slot it originally requested. The change is part of a protocol cleanup to remove reliance on an invoice_id field. It is primarily a correctness and protocol-consistency fix rather than a clear security patch, though the old behavior could theoretically have allowed a server to confuse or overwrite unrelated cached offers.

Lower-priorityAccount for shared input EMPTY_SCRIPT_SIG_WEIGHTby Jeffrey Czyz · 75b7e802 · Aug 21, 2025 · 1 fileMessage 68 · AdequateLow 44Details
Commit message · Jeffrey Czyz

Account for shared input EMPTY_SCRIPT_SIG_WEIGHT

When splicing a channel, the previous funding output is spent and fees
for it are paid by the splice initiator. However, the witness weight was
not including EMPTY_SCRIPT_SIG_WEIGHT. Fix this and update the variable
name to make clear the weight needed is the input satisfaction.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 44/100

This commit fixes a fee-calculation bug in an experimental Lightning channel-splicing feature. When two parties splice a channel, the initiator pays the on-chain Bitcoin transaction fee. The code previously forgot to count a small but mandatory 8-weight-unit 'empty script signature' cost for the old funding input it re-spends. That made the initiator's fee estimate slightly too low. The fix adds that missing weight, so the initiator contributes enough fee and the splice transaction is more likely to confirm at the intended fee rate. It is a correctness/economic bug, not a direct theft-of-funds vulnerability, but a low fee could cause a transaction to stall or be dropped from mempools.

Lower-priorityInclude invoice_slot in OfferPathsRequest messageby Valentine Wallace · 33291b62 · Aug 21, 2025 · 3 filesMessage 68 · AdequateInformational 18Details
Commit message · Valentine Wallace

Include invoice_slot in OfferPathsRequest message

In the initially-merged version of the static invoice server protocol, the
static invoice server would sometimes have to find a specific static invoice
based on (recipient_id, invoice_slot) and sometimes based on (recipient_id,
invoice_id). This made the API harder to use in terms of how the server would
index into the KVStore.

We'd like to transition to the server always finding a specific invoice based on
(recipient_id, invoice_slot) and get rid of the invoice_id concept.

Now that the invoice_slot is in the initial paths request, the server will be
able to include the slot in the offer paths that they create in response,
allowing the slot to be surfaced instead of the invoice_id when the invoice
request comes in, in upcoming commits.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This commit changes an internal Lightning protocol message so that a wallet tells a static invoice server which database 'slot' to use when storing an invoice. It is a protocol/API simplification, not a security fix. There is no evidence it prevents or fixes any exploit.

Lower-priorityRemove TransactionU16LenLimitedby Jeffrey Czyz · 70929ae8 · Aug 20, 2025 · 6 filesMessage 60 · AdequateLow 44Details
Commit message · Jeffrey Czyz

Remove TransactionU16LenLimited

TransactionU16LenLimited was used to limit Transaction serialization
size to u16::MAX. This was because messages can not be longer than
u16::MAX bytes when serialized for the transport layer. However, this
limit doesn't take into account other fields in a message containing a
Transaction, including the length of the transaction itself.

Remove TransactionU16LenLimited and instead check any user supplied
transactions in the context of the enclosing message (e.g. TxAddInput).

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode! Too few words to establish purpose
AI analysis · Low 44/100

This commit removes a wrapper that limited individual Bitcoin transactions to 65,535 bytes. The old limit was too generous in some places and too strict in others: it did not account for other fields in the same message, so a transaction just under the limit could still make the overall wire message too large. The patch moves the size check into the context of the enclosing message (TxAddInput) and lets the transaction field hold a normal Bitcoin transaction. It is a correctness/refactoring change for the Lightning protocol implementation, not a clear-cut remote exploit.

Lower-priorityRemove their_funding_contribution_satoshis from FundingNegotiationContextby Jeffrey Czyz · c9ddcbfc · Aug 20, 2025 · 2 filesMessage 63 · AdequateInformational 13Details
Commit message · Jeffrey Czyz

Remove their_funding_contribution_satoshis from FundingNegotiationContext

Once the counterparty supplies their funding contribution, there is no
longer a need to store it in FundingNegotiationContext as it will have
already been used to create a FundingScope.

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 13/100

This commit removes an unused field that tracked how much money the other party was putting into a channel. The field was marked as dead code and only relevant for future dual-funding/splicing features. The commit message says the value is no longer needed because it has already been used to create a FundingScope. There is no indication of a security bug being fixed.

Security candidateInclude witness weights in FundingNegotiationContextby Jeffrey Czyz · 33273821 · Aug 20, 2025 · 3 filesMessage 73 · AdequateInformational 12Details
Commit message · Jeffrey Czyz

Include witness weights in FundingNegotiationContext

ChannelManager::splice_channel takes witness weights with the funding
inputs. Storing these in FundingNegotiationContext allows us to use them
when calculating the change output and include them in a common struct
used for initiating a splice-in.

In preparation for having ChannelManager::splice_channel take
FundingTxContributions, add a weight to the
FundingTxContributions::InputsOnly, which supports the splice-in use
case.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Informational 12/100

This commit is a straightforward internal refactoring in the Lightning Dev Kit codebase. It changes how transaction 'witness weights' (a measure of data size) are stored alongside funding inputs during channel creation and splicing. The weights are now kept in a shared negotiation context so they can be used later when calculating change outputs. There is no indication this fixes a security bug; it appears to be preparatory cleanup for upcoming dual-funding and splicing features.

Security candidateCheck splice contributions against SignedAmount::MAX_MONEYby Jeffrey Czyz · 9bd2144d · Aug 20, 2025 · 3 filesMessage 78 · AdequateModerate 60Details
Commit message · Jeffrey Czyz

Check splice contributions against SignedAmount::MAX_MONEY

Splice contributions should never exceed the total bitcoin supply. This
check prevents a potential overflow when converting the contribution
from sats to msats. The commit additionally begins to store the
contribution using SignedAmount.

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
memory safety
AI analysis · Moderate 60/100

This commit fixes a potential integer overflow in the experimental splicing feature of the Lightning Dev Kit. When a user or peer tried to splice a channel with a contribution larger than the total Bitcoin supply (about 21 million BTC), the code could overflow while converting the amount from satoshis to millisatoshis. The patch adds explicit checks that reject contributions above SignedAmount::MAX_MONEY and begins storing contributions using the safer SignedAmount type instead of raw i64 values. The bug is only reachable through the still-experimental splicing code path.

Lower-priorityFetch HolderCommitmentPoint::current_point on readby Jeffrey Czyz · 3ae8c4a6 · Aug 20, 2025 · 1 fileMessage 73 · AdequateLow 30Details
Commit message · Jeffrey Czyz

Fetch HolderCommitmentPoint::current_point on read

When reading HolderCommitmentPoint, attempt to fetch the current point
if it wasn't serialized. This allows channels to be spliced without
first needing to have the HolderCommitmentPoint advanced. Don't fail if
it can't be fetch synchronously as the channel can still be spliced once
it is advanced.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 30/100

This change fixes a channel-recovery edge case in the Lightning Dev Kit. When an older serialized channel state is loaded after an upgrade, the code now tries to re-derive a missing 'current commitment point' from the signer instead of leaving it blank. That lets splicing work immediately after restore; if the signer cannot provide the point, the code falls back to the old behavior rather than failing. It is a robustness improvement, not a clear exploitable vulnerability.

Lower-prioritySet HolderCommitmentPoint::current_point on readby Jeffrey Czyz · 7a5a2a9c · Aug 20, 2025 · 1 fileMessage 68 · AdequateModerate 52Details
Commit message · Jeffrey Czyz

Set HolderCommitmentPoint::current_point on read

When introducing HolderCommitmentPoint::current_point, the value was
mistakenly not set when read except in the legacy case where the next
point needed to be fetched. But in that case, it would have been read as
None given it is a new field.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Moderate 52/100

This is a one-line bug fix in a Bitcoin Lightning Network library. A new field called `current_point` was added to track a cryptographic key for the current channel state, but when loading older saved channel data, the code accidentally left it blank (None) instead of restoring the saved value. This could cause the node to lose track of the correct key for the current commitment transaction, potentially leading to failures when signing or broadcasting channel state updates. It appears to be a data-corruption-on-upgrade bug rather than an obvious remote exploit.

Lower-priorityFix comment regarding holder commitment pointby Jeffrey Czyz · fa9cb2e1 · Aug 20, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Fix comment regarding holder commitment point

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit changes a single word in a code comment, replacing 'current' with 'next' to accurately describe which commitment point is being populated when restoring a channel after an upgrade. There is no code change, no functional change, and no security impact.

Lower-priorityUse WarnAndDisconnect to fail a spliceby Jeffrey Czyz · 8ef76e9c · Aug 20, 2025 · 1 fileMessage 80 · StrongLow 41Details
Commit message · Jeffrey Czyz

Use WarnAndDisconnect to fail a splice

When the current holder commitment point is unavailable for a channel,
we can't splice the channel. Make sure to disconnect so that the channel
is no longer quiescent. Otherwise, it cannot be used for payments.

80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Low 41/100

This tiny patch changes how one specific splicing failure is handled in a Lightning channel. Previously, when the local node's commitment point was not ready, the code only warned the peer. Now it also disconnects the peer. The goal is to take the channel out of a temporary 'quiet' (quiescent) state so it can be used for normal payments again. Without the disconnect, the channel could get stuck and be unable to process payments after a failed splice attempt. This is a reliability/availability fix rather than a direct theft-of-funds bug.

Lower-priorityRe-phrase splice_channel error messageby Jeffrey Czyz · 9d2d3687 · Aug 20, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Re-phrase splice_channel error message

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit only rewords an error message shown when a user tries to splice a Lightning channel before it is ready. No code behavior, logic, or security boundary changes.

Lower-priorityMake `ChannelMonitor` round-trip tests more robustby Matt Corallo · a8ec9661 · Aug 19, 2025 · 2 filesMessage 83 · StrongInformational 16Details
Commit message · Matt Corallo

Make `ChannelMonitor` round-trip tests more robust

During testsing, we check that a `ChannelMonitor` will round-trip
through serialization exactly. However, we recently added a fix to
change a value in `PackageTemplate` on reload to fix some issues in
the field in 0.1. This can cause the round-trip tests to fail as a
field is modified during read.

We fix it here by simply exempting the field from the equality test
in the condition where it would be updated on read.

We also make the `ChannelMonitor` `PartialEq` trait implementation
non-public as weird workarounds like this make clear that such a
comparison is a britle API at best.

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 16/100

This commit only changes test code and the visibility of an equality-checking feature. It makes a test comparison ignore a field that gets rewritten when data is loaded back from disk, and it hides the equality trait from public use because the comparison is fragile. There is no runtime security fix here.

Lower-priorityCorrect `test_dup_htlc_onchain_doesnt_fail_on_reload`by Matt Corallo · 0a6c3fb4 · Aug 19, 2025 · 1 fileMessage 63 · AdequateInformational 15Details
Commit message · Matt Corallo

Correct `test_dup_htlc_onchain_doesnt_fail_on_reload`

`test_dup_htlc_onchain_doesnt_fail_on_reload` made reference to
`ChainMonitor` persisting `ChannelMonitor`s on each new block,
which hasn't been the case in some time. Instead, we update the
comment and code to make explicit that it doesn't impact the test.

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification! Too few words to establish purpose
AI analysis · Informational 15/100

This commit only updates an internal test and its comments. It removes an outdated assumption that a component called ChainMonitor saves ChannelMonitors on every new block, and instead makes clear that the test does not rely on that behavior. There is no change to production code, no fix for a security issue, and no security relevance stated by the project.

Lower-priorityAllow quiescence-init while disconnected from peersby Matt Corallo · c7e4887d · Aug 19, 2025 · 2 filesMessage 73 · AdequateLow 26Details
Commit message · Matt Corallo

Allow quiescence-init while disconnected from peers

There are a number of things in LDK where we've been lazy and not
allowed the user to initiate an action while a peer is
disconnected. While it may be accurate in the sense that the action
cannot be started while the peer is disconnected, it is terrible
dev UX - these actions can fail without the developer being at
fault and the only way for them to address it is just try again.

Here we fix this dev UX shortcoming for splicing, keeping any
queued post-quiescent actions around when a peer disconnects and
retrying the action (and quiescence generally) when the peer
reconnects.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Low 26/100

This commit improves developer experience in the Lightning Dev Kit by allowing users to request a channel pause (called 'quiescence') even when the peer is temporarily disconnected. Previously, the action would fail and the developer had to retry manually. Now, the request is remembered and automatically retried when the peer reconnects. This is a usability fix, not a security bug fix, and the commit message explicitly frames it as a developer-experience improvement.

Lower-priorityStop skipping the line in quiescence if our peer speaks firstby Matt Corallo · dd024982 · Aug 19, 2025 · 2 filesMessage 85 · StrongLow 27Details
Commit message · Matt Corallo

Stop skipping the line in quiescence if our peer speaks first

In the case where we prepare to initiate quiescence, but cannot yet
send our `stfu` because we're waiting on some channel operations to
settle, and our peer ultimately sends their `stfu` before we can,
we would detect this case and, if we were able, send an `stfu`
which would allow us to send "something fundamental" first.

While this is a nifty optimization, its a bit overkill - the chance
that both us and our peer decide to attempt something fundamental
at the same time is pretty low, and worse this required additional
state tracking.

We simply remove this optimization here, simplifying the quiescence
state machine a good bit.

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 27/100

This commit removes a small optimization in the Lightning quiescence protocol. Previously, if both sides were about to request a pause (quiescence) at nearly the same time, the code tried to let one side 'go first' based on a tie-breaker. The commit simplifies this by always treating the peer that sends its pause message first as the initiator. This is a cleanup change that reduces state-tracking complexity and lowers the chance of subtle state-machine bugs, but it does not by itself fix a known active exploit.

Lower-priorityAdd a `QuiescentAction` to track why we're going quiescentby Matt Corallo · e15c2f59 · Aug 19, 2025 · 2 filesMessage 85 · StrongInformational 18Details
Commit message · Matt Corallo

Add a `QuiescentAction` to track why we're going quiescent

When we initiate quiescence, it should always be because we're
trying to accomplish something (in the short term only splicing).
In order to actually do that thing, we need to store the
instructions for that thing somewhere the splicing logic knows to
look at once we reach quiescence.

Here we add a simple enum which will eventually store such actions.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 18/100

This commit adds internal bookkeeping so that when a Lightning channel enters a quiet 'pause' state (called quiescence), the code remembers what action triggered the pause. Right now the only action is a placeholder used in tests, so this is a development-only infrastructure change with no immediate security impact on users.

Lower-priorityUpdate `test_peer_storage` style to match newer testsby Matt Corallo · 0a598a3c · Aug 19, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Matt Corallo

Update `test_peer_storage` style to match newer tests

...somewhat cleaning up rustfmt crust.

60/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Mentions testing or verification! No meaningful explanatory body
AI analysis · Informational 15/100

This commit is a minor cleanup of a single test file. It introduces local variables for node IDs and reuses an Init message object to make the test code shorter and more readable. There is no change to production code or to the test's actual behavior.

Lower-priorityMove `test_peer_storage` to `reload_tests`by Matt Corallo · c6103e6e · Aug 19, 2025 · 2 filesMessage 60 · AdequateInformational 15Details
Commit message · Matt Corallo

Move `test_peer_storage` to `reload_tests`

In general we shouldn't be adding new tests in `channelmanager.rs`

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides an explanatory body✓ Mentions testing or verification
AI analysis · Informational 15/100

This commit simply moves an existing test function from one file to another within the project's test suite. No production code, behavior, or security properties changed. It is a code-organization cleanup with no security relevance.

Lower-priorityCorrect comments and flow in `test_peer_storage`by Matt Corallo · 2ce54796 · Aug 19, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Matt Corallo

Correct comments and flow in `test_peer_storage`

This cleans up `test_peer_storage` a bit to clarify what messages
are actually being exchanged.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit only rewrites comments and reorders assertions inside a single test function. It does not change any production code, cryptographic logic, network handling, or behavior visible to users. There is no security issue here.

Lower-priorityAdd debug assertions on revoked counterparty tx number fetchingby Matt Corallo · 9d9cfe65 · Aug 19, 2025 · 1 fileMessage 73 · AdequateInformational 16Details
Commit message · Matt Corallo

Add debug assertions on revoked counterparty tx number fetching

We actually store the latest counterparty revoked commitment
transaction number in two places in `Channel` - as
`context.cur_counterparty_commitment_transaction_number + 2` and
in `commitment_secrets`.

Here we add a debug assertion that both values are equal.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 16/100

This commit adds an internal consistency check (a debug-only assertion) to make sure two different places storing the same counterparty commitment transaction number agree. It does not change release behavior, fix a known bug, or alter how funds are secured. It is a defensive code-quality improvement.