LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1478 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.

225security candidates208second-pass queue286AI analyses
63commits · 30 days
191commits · 60 days
647commits · 180 days
1475commits · 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.

69/100 average clarity
352Strong · 80–100
782Adequate · 60–79
285Thin · 40–59
59Opaque · 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 Rohrer1531525567
Matt Corallo3564756173
Leo Nash1161334162
Jeffrey Czyz1774151068
Wilmer Paulino1493942069
Joost Jager1622424069
elnosh301315056
Valentine Wallace1351014069
shaavan2266069
Carla Kirk-Cohen6533069
benthecarman1833071
Duncan Dean833057
Analysis record

Published AI watches

Last scanned 47 minutes ago

Low 47 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Return `Err`s` instead of panicking on oversized messages

This commit changes how the Lightning networking code handles oversized encrypted messages. Previously, certain conditions would cause the program to crash with a panic. Now the code returns errors instead, which is a defensive improvement…

panic-to-error conversion for oversized message encryption/decryptiondenial-of-service hardening against oversized peer messagesdebug_assert retained to preserve test coverage of invariant violations
08f12bc7by Matt Corallo+68−313 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 45 · Thin
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Update crate repository links to forgejo

This commit simply updates the 'repository' web links in 15 package metadata files from GitHub to a self-hosted Forgejo instance. It does not change any program code, build logic, dependencies, or security behavior. There is no security is…

eb77676dby benthecarman+15−1515 files
No security note in commit
Moderate 54 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Retransmit splice_locked for 0-conf channels missing tx_signatures

This commit fixes a bug in the Lightning Dev Kit where, after a disconnection, a node could fail to retransmit a 'splice_locked' message to a peer that was still waiting for transaction signatures. Without this retransmission, the two peer…

Protocol state desynchronization between channel peers after reconnectionMissing retransmission of splice_locked for 0-conf splice channelsPotential channel unusability or stuck splice negotiation
5434015bby Wilmer Paulino+266−12 files
No security note in commit
Low 26 AI analysisMessage 90 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Include to_self_delay size in DelayedPaymentOutput weight calculation

This commit fixes a small accounting bug in how the Lightning wallet estimates the size (and therefore transaction fee) of a special Bitcoin transaction that sweeps funds back to the user after a channel closes. The old code always assumed…

debug assertion failure possible in development/testing buildstransaction weight/fee estimate overestimation up to 3 WUconstant replaced with per-descriptor length computation
e6652237by Matt Morehouse+97−83 files
No security note in commit
Informational 18 AI analysisMessage 65 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct docs on `ChannelSigner::get_per_commitment_point`

This commit only updates documentation comments for a Rust function called get_per_commitment_point. It removes an outdated warning that the method was non-asynchronous and that returning an error could cause a crash, and replaces it with …

Documentation-only changeRemoves outdated panic warningAdds retry/unblock guidance for signer errors
5057809bby Matt Corallo+6−31 file
No security note in commit
Informational 15 AI analysisMessage 63 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Require manual reviewer assignment

This commit changes the project's internal code-review workflow. It stops automatically assigning a human reviewer when a pull request is opened; instead, contributors must manually click a button to request a reviewer after first addressi…

9c1e5787by Joost Jager+21−232 files
No security note in commit
Moderate 60 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Handle missing splice tx_signatures on reestablish

This commit fixes a bug in LDK's Lightning channel reconnection logic after a splice (a way to resize a channel's on-chain funds). If one peer had already received the splice signatures but the other had not, and then they disconnected and…

Protocol-state inconsistency on reconnection after splice signature exchangePotential channel stall/force-close due to quiescence not being exited before commitment updateFuzzer-discovered edge case in Lightning splicing retransmission
f93a7f0cby Wilmer Paulino+600−975 files
No security note in commit
Informational 19 AI analysisMessage 68 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

offers: Allow disabling invoice response MPP

This commit adds a new option for Lightning invoice creators to explicitly tell payers not to use multi-path payments (MPP) when paying an invoice. It does not change any enforcement rules; it only changes what feature bits are advertised …

New API surface for feature advertisement controlExplicit documentation that the method does not enforce single-HTLC receipt, shifting enforcement responsibility to callersNo removal or weakening of existing validation logic
00aabf81by Elias Rohrer+9−01 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Change assign-reviewer authorized integration token to a bot acct

This commit swaps the ID number used by an automated workflow that randomly assigns code reviewers. The old number pointed to a real person's account, so the workflow's assignments appeared to come from that person. The new number points t…

f734d1ebby Matt Corallo+1−11 file
No security note in commit
Informational 15 AI analysisMessage 45 · Thin
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Pin jobserver to 0.1.34 on pre-1.85 rustc

This commit adjusts the project's continuous integration (CI) test script to pin an older version of a build-time helper crate called `jobserver` when using older Rust compilers. It is a build compatibility fix, not a security patch, and d…

a4641403by Matt Corallo+3−01 file
No security note in commit
Informational 17 AI analysisMessage 50 · Thin
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Bump esplora-client to 0.13 to switch from `reqwest` to `bitreq`

This commit updates a dependency used to talk to Esplora blockchain servers from version 0.12 to 0.13, switching the underlying HTTP library from reqwest to bitreq. It also removes two CI workarounds that pinned older versions of idna_adap…

Dependency version bump (esplora-client 0.12 -> 0.13)HTTP backend switch (reqwest -> bitreq) in a transitive dependencyRemoval of MSRV pins for idna_adapter and hyper-rustls
5cd499e0by Matt Corallo+1−72 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Test cross-version serialization of pending splices

This commit only adds new test code. It exercises how a newer version of LDK exchanges saved channel data with the older LDK 0.2 release when a channel has a pending splice. There is no change to production logic, no bug fix, and no securi…

0beadb3bby Jeffrey Czyz+208−01 file
No security note in commit
Low 25 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Require `htlc_value_satoshis` in [pending] `HTLCUpdate`s

This commit removes the 'Option' wrapper from several HTLC amount fields, making them required instead of optional. It is a cleanup/refactoring change that simplifies the code by assuming the amount is always known. The commit message fram…

Removal of Option wrapper for financial amount fieldsSerialization format change from optional to required TLV fieldsLoss of backward compatibility with older serialized monitor/channel state
40957aadby Matt Corallo+24−284 files
No security note in commit
Informational 15 AI analysisMessage 78 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Use a builder for sign_interactive_funding_tx arguments

This commit is a code cleanup inside the project's test suite. It replaces a helper function with several hard-to-read positional arguments (like bare `false` and `None`) with a 'builder' pattern that names each option. This makes the test…

ed250c02by Jeffrey Czyz+116−861 file
No security note in commit
Low 25 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

ln: persist the paid BOLT 12 invoice and build payer proofs

This commit is a feature addition, not a vulnerability fix. It extends rust-lightning's BOLT 12 payment support so that when a wallet pays a BOLT 12 invoice, the paid invoice is saved through retries and restarts and is later exposed in th…

New BOLT 12 payer proof feature: persists paid invoice across retries/restarts and exposes it in Event::PaymentSentPayer signing key re-derived from invoice payer metadata rather than storing extra key materialAdds end-to-end test for proof creation, verification, and bech32 round-trip
580c9bc8by Vincenzo Palazzo+226−284 files
No security note in commit
Informational 17 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

refactor(offers): extract payer key derivation helpers

This commit is a code cleanup (refactor) in the Lightning Dev Kit library. It moves existing payer key-derivation logic into shared helper functions so that future 'payer proof' features can reuse the same code. The change does not appear …

Refactor only: moves existing key derivation/verification logic into helpers without changing algorithmsAdds new public API `Bolt12Invoice::derive_payer_signing_keys` for payer proof key recoveryNo mention of vulnerability, bug, CVE, security fix, or exploit in commit title/message
2bd9266aby Vincenzo Palazzo+120−212 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Upload new fuzz corpus entries as a short-lived CI artifact

This commit changes a CI workflow for the rust-lightning project. It stops trying to push new fuzz test inputs directly to a corpus repository from automated test runs, and instead uploads them as a temporary artifact that a separate sched…

b9f55b6cby Matt Corallo+52−451 file
No security note in commit
Informational 15 AI analysisMessage 90 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

ci: don't double-assign reviewers, support manual assignment runs

This is a routine update to the project's automated reviewer-assignment workflow. It prevents the bot from accidentally adding a second random reviewer when one is already assigned, and adds a manual trigger so maintainers can request an a…

24651a1aby Matt Corallo+73−91 file
No security note in commit
Informational 18 AI analysisMessage 55 · Thin
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Fix assign-reviewer's auth by setting the authorized integration audience

This is a one-line fix to a Forgejo workflow that assigns reviewers. The workflow requests a temporary identity token from the CI system so it can call another service. The change adds an explicit audience parameter to that token request, …

OIDC token audience now explicitly scopedCI workflow authentication hardeningNo change to application code or cryptographic logic
055d334dby Matt Corallo+1−11 file
No security note in commit
Low 25 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

ln: add trampoline mpp accumulation with rejection on completion

This commit adds partial support in the Lightning Dev Kit node software for receiving and temporarily holding multi-part trampoline payments, then deliberately rejects them once all parts arrive because full outbound forwarding is not yet …

New trampoline forward handling path accumulates MPP parts before rejectingDebug assertion guards first-HTLC failure in MPP mergeTODO comment flags possible MPP inconsistency in next_node_id across trampoline parts
1afd35e6by Carla Kirk-Cohen+240−112 files
No security note in commit
Repository ledger

Explore captured commits

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

Security candidateCorrectly order channel_ready on channel_reestablishby Jeffrey Czyz · a0b6dd60 · Sep 3, 2025 · 2 filesMessage 85 · StrongModerate 63Details
Commit message · Jeffrey Czyz

Correctly order channel_ready on channel_reestablish

When handling channel_reestablish, the order in which channel_ready is
sent depends on whether or not the initial commitment_signed /
tx_signatures are being retransmitted. When they are, then channel_ready
should come after them. Otherwise, channel_ready should come before any
commitment_signed.

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 · Moderate 63/100

This patch fixes the order in which Lightning messages are resent when a connection comes back after being dropped. In some channel states, the node was sending 'channel_ready' before the initial signatures it depends on, or after them when it shouldn't. The fix adds a new ordering flag so the correct sequence is used depending on whether the channel is still finalizing its funding transaction or is already operational. A wrong order could confuse a peer and prevent the channel from resuming correctly, potentially causing a denial of service or funds to be stuck.

Security candidateMake BlindedMessagePath creation infallibleby Valentine Wallace · 11f3476c · Sep 3, 2025 · 7 filesMessage 63 · AdequateLow 36Details
Commit message · Valentine Wallace

Make BlindedMessagePath creation infallible

The LDK codebase in general is comfortable panicking if the entropy source
provided to it is dysfunctional. Up until now we made an exception for blinded
path creation, where we would handle an error that could occur on mul_tweak
that could only occur if the session_priv provided was not actually random.
In comparable cases in onion_utils, we would panic instead.

In upcoming commits, we will be including blinded paths in outbound
revoke_and_ack messages as part of implementing async payments, where it is
difficult to handle failing back an HTLC if blinded path creation fails. Thus
we now have an incentive to make the blinded path creation methods infallible,
so do so here.

63/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
entropy or randomness
AI analysis · Low 36/100

This commit changes how LDK builds private 'blinded' communication paths so that the creation process can no longer fail in normal use. Previously, a bad random number could cause path creation to return an error. Now the code will panic (crash the program) instead if that happens, matching how LDK already handles broken randomness elsewhere. The change is described by the developers as a cleanup to simplify upcoming async-payments work, not as a fix for an active security bug.

Security candidateRandomize order of inputs from `OutputSweeper`by benthecarman · 8a84ed09 · Aug 28, 2025 · 1 fileMessage 73 · AdequateInformational 19Details
Commit message · benthecarman

Randomize order of inputs from `OutputSweeper`

For a marginal increase in privacy, we can randomize the inputs from the
`OutputSweeper`. Since we don't depend on `rand` to randomize the order
I just put the elements into a hashset, then back into a Vec. This
should give us enough randomness without having to introduce a new dep
or make the `OutputSweeper` depend on the `EntropySource`.

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
entropy or randomness
AI analysis · Informational 19/100

This commit makes a small privacy improvement to how the OutputSweeper selects which funds to spend. Previously, the order of inputs in a sweep transaction was predictable. Now the code puts them into a hash set and back into a list, which shuffles their order. There is no security bug being fixed here; it is a hardening/privacy tweak.

Security candidateRetransmit commitment_signed before tx_signaturesby Jeffrey Czyz · df80eb05 · Aug 28, 2025 · 1 fileMessage 58 · ThinLow 46Details
Commit message · Jeffrey Czyz

Retransmit commitment_signed before tx_signatures

During channel reestablishment, both commitment_signed and tx_signatures
messages may be retransmitted. However, commitment_signed must come
first, so re-arrange the ordering. This moves tx_abort as well to keep
the interactive tx messages together.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 46/100

This commit fixes the order in which two Lightning protocol messages are resent when a channel connection is restored after an outage. The 'commitment_signed' message must now be sent before 'tx_signatures'. Sending them out of order could cause a peer to reject or mishandle the channel re-establishment, potentially disrupting dual-funded channels. It is a protocol correctness fix rather than a clear exploit for theft of funds.

Security candidateSplit out remaining uses of `is_pre_funded_state` and rename itby Matt Corallo · 4cd52cb9 · Aug 28, 2025 · 2 filesMessage 90 · StrongLow 30Details
Commit message · Matt Corallo

Split out remaining uses of `is_pre_funded_state` and rename it

`Channel::is_pre_funded_state` is used to mean several different
things. In the past few commits we stopped using it for a few
conflicting uses, but here we break out the remaining uses and
rename the remnants for clarity.

`is_funding_broadcast` was using `is_pre_funded_state` and was then
later used to decide if the `Channel` could be written to disk
(because it can be resumed on restart), if we should broadcast a
force-close transaction, and when to emit a `ChannelPending` event.

These were also somewhat divergent - we shouldn't generate a
`ChannelReady` event or broadcast a force-closing transaction until
we've actually broadcasted but want to write the `Channel` to disk
once we enter funding signature exchange for dual-funded open.

Thus, the ability to write a `Channel` to disk is provided by a new
`can_resume_on_restart` method. Then, `is_funding_broadcast` is
updated to only consider funding broadcasted after we provide our
funding signatures (i.e. the funding *could* have been
broadcasted). This is still a bit early to generate a
`ChannelPending` event (as the funding may not actually have been
broadcasted yet), but its better than it was.

Finally, the remaining `is_pre_funded_state` is renamed
`can_resume_on_reconnect`, which has slightly different semantics
than on-restart channels in batch opens.

90/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 30/100

This commit is a code-cleanup refactor in a Bitcoin Lightning Network library. It splits one overloaded channel-state check into three more precise checks so that saving channels to disk, deciding when to broadcast force-close transactions, and emitting 'channel is opening' events no longer rely on a single ambiguous flag. The change appears aimed at preventing subtle bugs in dual-funded channel opening, but the commit itself does not claim to fix a known security vulnerability and no exploit is described.

Security candidateDon't use `is_pre_funded_state` to provide an FC monitor updateby Matt Corallo · b7ba29cf · Aug 28, 2025 · 1 fileMessage 91 · StrongModerate 57Details
Commit message · Matt Corallo

Don't use `is_pre_funded_state` to provide an FC monitor update

`Channel::is_pre_funded_state` is used to mean several different
things. In this case its used to decide if we should provide a
`ChannelMonitorUpdate` marking a channel as closed when we go to
force-close it.

Here, we want to capture exactly when the original `ChannelMonitor`
is first created, but were doing so indirectly by looking at the
channel's state. Worse, `is_pre_funded_state` got updated to be
false whenever there is an interctive signing session, which isn't
correct for this use - we may have an interactive signing session
but have already persisted the original `ChannelMonitor` when we
received the first `commitment_signed`.

Instead, we just move to examining
`counterparty_next_commitment_transaction_number` which is
decrementing for the first time at exactly the time we create the
original `ChannelMonitor`, so it provides a much simpler test.

Fixes #3880

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundary
AI analysis · Moderate 57/100

This change fixes a logic bug in how the Lightning node decides whether to send a 'channel is being force-closed' update to its on-disk channel monitor. Previously, the code used a broad channel-state check that could incorrectly skip sending the update during some interactive funding flows, or send it too early in other cases. The patch replaces that broad check with a precise counter that tracks when the original monitor was first created, ensuring the close update is only generated when a monitor already exists. The practical effect is more reliable recovery of funds during force-closes involving modern interactive channel-opening protocols.

Security candidateDont use `is_pre_funded_state` to short-circuit `shutdown` handlingby Matt Corallo · 759d7aac · Aug 28, 2025 · 1 fileMessage 73 · AdequateLow 42Details
Commit message · Matt Corallo

Dont use `is_pre_funded_state` to short-circuit `shutdown` handling

`Channel::is_pre_funded_state` is used to mean several different
things. In this case, its used to skip all the `shutdown` logic as
the funding transaction can't possibly have been broadcasted so
there's really no ned to try to sign a transaction spending it.

Here, we really want to capture any channel in `NegotiatingFunding`
or any V1 channel in `FundingNegotiated` or, finally, any V2
channel in `FundingNegotiated` where we haven't yet sent our
signatures (which is not captured in `is_pre_funded_state`).

Instead of a new helper, we just check the states directly in
`shutdown` handling.

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 · Low 42/100

This change fixes a logic bug in how the Lightning node decides whether to accept a 'shutdown' message from a peer. Previously, the code used a broad helper called 'is_pre_funded_state' to skip shutdown handling, but that helper did not correctly cover newer V2-style channels that have negotiated funding but not yet sent the node's own transaction signatures. In those cases, a peer could send shutdown and the node might try to run full shutdown logic (including signing a spending transaction) even though the funding transaction was not actually broadcastable yet. The patch narrows the check to the exact channel states where shutdown should be short-circuited.

Security candidateSign splice shared input when producing holder tx_signaturesby Wilmer Paulino · e664b7e5 · Aug 26, 2025 · 6 filesMessage 73 · AdequateModerate 57Details
Commit message · Wilmer Paulino

Sign splice shared input when producing holder tx_signatures

We also remove the `Result` to make it clear that this method does not
support async operations yet and rename the method to clarify that it is
only intended to be used for the shared input of a splice.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarycryptography-sensitive pathsigning or wallet path
AI analysis · Moderate 57/100

This commit fixes a missing signature in the Lightning splicing feature. When a user and their peer splice a channel (replace the old funding transaction with a new one), the old funding output is spent as a shared input in the new transaction. Previously, when the holder produced their tx_signatures message, they left the shared_input_signature field as None, even though the protocol requires them to sign that shared input. The commit adds that signature, renames the signer method to make its purpose clearer, and removes the Result return type because the operation is synchronous. It also adds state checks so funding signatures are only accepted when the channel is actually expecting them, and turns a debug-only assertion about signing failures into a logged warning.

Security candidateSupport splice shared input signingby Wilmer Paulino · 1170e1ba · Aug 26, 2025 · 3 filesMessage 68 · AdequateLow 35Details
Commit message · Wilmer Paulino

Support splice shared input signing

This commit tracks all data related to the shared input of a splice,
such that a valid witness can be formed upon the splice transaction
finalization.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 35/100

This commit adds support for correctly signing a special kind of Bitcoin transaction input used in Lightning channel 'splicing,' where both parties continue to share an existing funding output while adding or removing funds. Before this change, the code did not know how to build a valid witness (the cryptographic proof that unlocks the shared input) for that shared input. The patch tracks the shared input's position, the order in which the two parties' signatures must appear, and the script that unlocks the funds, then assembles the final transaction witness when both signatures are available. It also adds a small safety check that the transaction ID the caller signed matches the unsigned transaction, to detect malleation.

Security candidateRename get_inbound_payment_key to get_expanded_keyby shaavan · 4ac1fdad · Aug 26, 2025 · 14 filesMessage 68 · AdequateInformational 15Details
Commit message · shaavan

Rename get_inbound_payment_key to get_expanded_key

The use of ExpandedKey has grown beyond just encrypting inbound
payment data-it now also supports BOLT 12 Offers, spontaneous
payments, and authentication of various payment metadata.

To reflect this broader purpose, this commit renames the function
and updates its documentation accordingly.

68/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
access controlsigning or wallet path
AI analysis · Informational 15/100

This commit is a simple rename of a function from get_inbound_payment_key to get_expanded_key, plus updated documentation. It does not change any behavior, logic, or security properties of the code. The change reflects that the same cryptographic key material is now used for more purposes than just inbound payments, such as BOLT 12 Offers and spontaneous payments.

Security candidateAssume splicing input value from channel parametersby Wilmer Paulino · 712b3857 · Aug 26, 2025 · 4 filesMessage 50 · ThinLow 32Details
Commit message · Wilmer Paulino

Assume splicing input value from channel parameters

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

This commit changes how a Bitcoin Lightning channel signer calculates the value of the old funding output when signing a splice transaction. Instead of accepting the value as a caller-provided argument, it now derives the value from the channel's own stored parameters and adds a check that the transaction input actually matches the expected funding outpoint. This removes an opportunity for a caller to pass a wrong or manipulated input value, which could otherwise cause the signer to produce an invalid or subtly harmful signature.

Security candidateRemove reachable FundingTransactionReadyForSigning assertionby Wilmer Paulino · dfd7779b · Aug 26, 2025 · 1 fileMessage 55 · ThinLow 29Details
Commit message · Wilmer Paulino

Remove reachable FundingTransactionReadyForSigning assertion

This is reachable if the event doesn't get handled and a channel
reestablish occurs.

55/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Provides an explanatory body
Why it was queued
signing boundary
AI analysis · Low 29/100

This commit removes a debug-only assertion that could crash an LDK node in normal, non-buggy situations. The assertion wrongly assumed a certain event could never be queued twice, but it actually can be if a user doesn't immediately handle the event and a channel reconnect happens. The fix makes the code silently skip re-adding the duplicate event instead of panicking. In release builds this would not crash because it was a debug_assert, but in debug/test builds or custom builds with debug assertions enabled it could cause a denial of service (node shutdown).

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.

Security candidateDrop outdated async signing commentby Jeffrey Czyz · 13c81a15 · Aug 18, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Jeffrey Czyz

Drop outdated async signing comment

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

This commit removes an outdated code comment and adjusts how a future commitment public key is serialized to disk. It is a cleanup/refactoring change with no apparent security relevance.

Security candidateAllow funding errors in `full_stack_target` fuzzerby Matt Corallo · c1fefcfe · Aug 18, 2025 · 1 fileMessage 85 · StrongInformational 18Details
Commit message · Matt Corallo

Allow funding errors in `full_stack_target` fuzzer

When a channel gets replaced before we can fund it, its possible
now (due to RNG output repetition) to hit the "trying to fund
channel before its ready to be funded" error in the
`full_stack_target` fuzzer.

Thus, we now simply ignore errors when funding.

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
entropy or randomnessfuzzing or regression evidence
AI analysis · Informational 18/100

This commit changes a fuzz test (a randomized testing harness) so it no longer crashes when it tries to fund a channel that isn't ready to be funded. The change only affects test code, not the real Lightning node software that users run. It is a test-hardening fix, not a security patch for a vulnerability in production code.

Security candidateoffer: fix path validation to only require non-empty paths when issuer_id is missingby Erick Cestari · 5314ebb3 · Aug 18, 2025 · 1 fileMessage 73 · AdequateModerate 51Details
Commit message · Erick Cestari

offer: fix path validation to only require non-empty paths when issuer_id is missing

When an offer has an issuer_id, empty paths should be allowed since the
issuer_id can be used for signing. Only when issuer_id is None should
we require non-empty paths to extract the blinded node ID for signing.

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 · Moderate 51/100

This commit fixes a validation bug in how Lightning offers (BOLT12) are checked. Previously, an offer that included an issuer ID but had an empty list of payment paths was incorrectly rejected. The fix allows empty paths when an issuer ID is present, because the issuer ID itself can be used for signing. The bug was a logic error, not a clear-cut security vulnerability, but it could cause valid offers to be rejected or force users to add unnecessary paths, which may have privacy or usability implications.

Security candidateDetect commitment transaction confirmation in ChannelMonitor insteadby Wilmer Paulino · 68cd71c0 · Aug 15, 2025 · 11 filesMessage 83 · StrongLow 34Details
Commit message · Wilmer Paulino

Detect commitment transaction confirmation in ChannelMonitor instead

Previously, the `ChannelManager` would assume a `Channel` was closed the
moment it saw a spend for its funding input. With splicing, this will no
longer be the case. Since the `ChannelMonitor` is already responsible
for reliably tracking each onchain transaction relevant to a channel, we
now produce a `MonitorEvent::CommitmentTxConfirmed` event to inform the
`ChannelManager` the channel can be considered closed and removed.

As a result of this change, many tests failed now that we rely on
handling the `MonitorEvent::CommitmentTxConfirmed` first before seeing
the `ChannelMonitorUpdateStep::ChannelForceClosed` go out.

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
signing or wallet pathboot or update path
AI analysis · Low 34/100

This commit moves the responsibility for detecting when a channel-closing transaction has been confirmed from the ChannelManager to the ChannelMonitor. This is a preparatory architectural change for splicing, where a spend of the funding output does not necessarily mean the channel is closed. The change introduces a new MonitorEvent::CommitmentTxConfirmed event so the ChannelMonitor can reliably inform the ChannelManager when to actually close and remove a channel. Most of the diff is test updates adjusting the order in which closure-related events and monitor updates are expected.

Security candidateStop counting for RNG output in `full_stack_target`by Matt Corallo · dadac03a · Aug 13, 2025 · 1 fileMessage 100 · StrongInformational 15Details
Commit message · Matt Corallo

Stop counting for RNG output in `full_stack_target`

The `full_stack` fuzzer ensures that RNG output is unique by
keeping a counter of the number of `get_secure_random_bytes` calls
and using it to determine the "random" value to return.

However, because LDK regularly changes when it requests RNG output
this causes the fuzz input required to reach a codepath to change
regularly, making any existing fuzz corpus stale.

Instead, here, we allow the fuzz input to set a new RNG output
value, but otherwise always return the same output. This allows the
fuzzer to still reach RNG-output-specifc paths, but fuzzing seeds
aren't invalidated when LDK changes.

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
entropy or randomnessdefensive validationfuzzing or regression evidence
AI analysis · Informational 15/100

This commit changes only a fuzzing test harness, not production code. It alters how fake random numbers are generated during automated fuzz testing so that test inputs remain useful even when the underlying software changes. There is no security vulnerability or fix to a real system here.

Security candidateStop reading fee estimates directly in `full_stack_target`by Matt Corallo · 8230ff7f · Aug 13, 2025 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · Matt Corallo

Stop reading fee estimates directly in `full_stack_target`

The `full_stack` fuzzer tries to just expose much of the entire
library to the fuzzer, and as such when a request comes in from
LDK to estimate the current fee it tries to read two bytes of
fuzzing input and returns that as the fee to LDK.

However, because LDK regularly changes when it requests a fee
estimate from the user this causes the fuzz input required to reach
a codepath to change regularly, making any existing fuzz corpus
stale.

Instead, here, we allow the fuzz input to load a fee estimate
result into a buffer, and if its empty simply return 253. This
allows the fuzzer to still reach fee-estimate-triggered overflows,
but only invalidates fuzzing seeds that relied on fee estimate
inputs rather than all seeds whenever LDK changes fee estimate
calls.

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
memory safetydefensive validationfuzzing or regression evidence
AI analysis · Informational 15/100

This commit is a fuzz-testing infrastructure change, not a security fix. It changes how a test harness feeds fake fee estimates to the Lightning library during automated fuzzing so that existing test inputs don't become useless every time the library asks for fees in a slightly different place. There is no change to production code or to how real users' fee estimates are handled.

Security candidateUse `FundingScope` spent when signing watchtower justice transactionsby Wilmer Paulino · 775f3d9c · Aug 11, 2025 · 1 fileMessage 85 · StrongModerate 56Details
Commit message · Wilmer Paulino

Use `FundingScope` spent when signing watchtower justice transactions

Since there may be multiple counterparty commitment transactions for the
same commitment number due to splicing, we have to locate the matching
`FundingScope::channel_parameters` to provide the signer. Since this is
intended to be called during `Persist::update_persisted_channel`, the
monitor should have already had the update applied.

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 · Moderate 56/100

This patch fixes a bug in how a Lightning node signs 'justice' transactions—on-chain penalty transactions that reclaim funds when a counterparty tries to cheat. Before the fix, the code always used the current funding channel parameters when signing, but with splicing there can be multiple funding scopes. If the wrong parameters were used, the justice transaction signature could be invalid, potentially preventing the node from successfully penalizing a cheating counterparty in a spliced channel. The fix looks up the correct funding scope based on which commitment transaction is being claimed.

Security candidateVerify the holder provided valid witnesses and uses SIGHASH_ALLby Duncan Dean · 9cd40911 · Aug 8, 2025 · 3 filesMessage 100 · StrongModerate 68Details
Commit message · Duncan Dean

Verify the holder provided valid witnesses and uses SIGHASH_ALL

LDK checks the following:
* Each input spends an output that is one of P2WPKH, P2WSH, or P2TR.
These were already checked by LDK when the inputs to be contributed
were provided.
* All signatures use the `SIGHASH_ALL` sighash type.
* P2WPKH and P2TR key path spends are valid (verifies signatures)

NOTE:
* When checking P2WSH spends, LDK tries to decode 70-72 byte witness
elements as ECDSA signatures with a sighash flag. If the internal
DER-decoding fails, then LDK just assumes it wasn't a signature and
carries with checks. If the element can be decoded as an ECDSA
signature, the the sighash flag must be `SIGHASH_ALL`.
* When checking P2TR script-path spends, LDK assumes all elements of
exactly 65 bytes with the last byte matching any valid sighash flag
byte are schnorr signatures and checks that the sighash type is
`SIGHASH_ALL`. If the last byte is not any valid sighash flag, the
element is assumed not to be a signature and is ignored. Elements of
64 bytes are not checked because if they were schnorr signatures then
they would implicitly be `SIGHASH_DEFAULT` which is an alias of
`SIGHASH_ALL`.

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 boundary
AI analysis · Moderate 68/100

This commit adds verification of Bitcoin transaction signatures that a user (the 'holder') provides when building a Lightning channel funding transaction. Before this change, the code trusted the holder's supplied witness data more blindly. The new checks ensure the holder's inputs are standard types (P2WPKH, P2WSH, or P2TR), that signatures use the safe SIGHASH_ALL mode, and that P2WPKH and simple Taproot signatures are actually valid. The commit message explicitly warns that without SIGHASH_ALL, 'your funds can be held hostage'—meaning a malicious or buggy counterparty could potentially prevent the transaction from being confirmed or lock up funds.

Security candidateIntroduce `FundingTransactionReadyForSignatures` eventby Duncan Dean · 6638c13c · Aug 8, 2025 · 4 filesMessage 63 · AdequateLow 34Details
Commit message · Duncan Dean

Introduce `FundingTransactionReadyForSignatures` event

The `FundingTransactionReadyForSignatures` event requests witnesses
from the client for their contributed inputs to an interactively
constructed transaction.

The client calls `ChannelManager::funding_transaction_signed` to provide
the witnesses to LDK.

The `handle_channel_resumption` method handles resumption from both
a channel re-establish and a monitor update. When the corresponding
monitor update for the commitment_signed message completes, we will
push the event here.

We can thus only ever provide holder signatures after a monitor update
has completed.

We can also get rid of the reestablish code involved with
`monitor_pending_tx_signatures` and remove that field too.

63/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 34/100

This commit adds a new event that asks the wallet/user to sign inputs they contributed to a jointly-built Lightning channel funding transaction. It also changes when LDK sends its own signatures so that signatures are only provided after the channel monitor has been safely persisted. The change is a feature addition with safety improvements, not a fix for an active bug or known exploit.

Security candidateAdd `prev_ouput` to `NegotiatedTxInput` for SIGHASH_ALL & key-spend checksby Duncan Dean · c2b293c3 · Aug 8, 2025 · 1 fileMessage 85 · StrongLow 44Details
Commit message · Duncan Dean

Add `prev_ouput` to `NegotiatedTxInput` for SIGHASH_ALL & key-spend checks

In a following commit, We'll use the contained scriptPubKeys to validate
P2WPKH and P2TR key path spends and to assist in checking that signatures
in provided holder witnesses use SIGHASH_ALL to prevent funds being frozen
or held ransom.

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 boundarydefensive validation
AI analysis · Low 44/100

This commit adds the previous transaction output (the 'prev_output', which includes the scriptPubKey and amount) to an internal data structure called NegotiatedTxInput used during interactive transaction construction in Lightning. The commit message says a future change will use this extra data to verify that certain Bitcoin spends are valid and that signatures use the SIGHASH_ALL mode, which helps prevent funds from being frozen or held hostage by a malicious peer. By itself, this patch only stores more data; it does not yet implement the actual security checks.

Security candidateBlock RAA `ChannelMonitorUpdate`s on `PaymentClaimed` eventsby Matt Corallo · a80c855b · Aug 7, 2025 · 5 filesMessage 90 · StrongLow 47Details
Commit message · Matt Corallo

Block RAA `ChannelMonitorUpdate`s on `PaymentClaimed` events

We added the ability to block `ChannelMonitorUpdate`s on receipt of
an RAA in order to avoid dropping a payment preimage from a channel
that created a `PaymentSent` event in
9ede794e8e8559f1b2b386c1c57372094fc92fd4. We did not at the time
use the same infrastructure for `PaymentClaimed` events, but really
should have. While a `PaymentClaimed` event may seem a bit less
critical than a `PaymentSent` event (it doesn't contain a payment
preimage that the user needs to make sure they store for proof of
payment), its still important for users to ensure their payment
tracking logic is always correct.

Here we take the (relatively straightforward) action of setting a
`EventCompletionAction` to block RAA monitor updates on channels
which created a `PaymentClaimed` event. Note that we only block one
random channel from an MPP paymnet, not all of them, as any single
channel should provide enough information for us to recreate the
`PaymentClaimed` event on restart.

90/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
signing or wallet pathboot or update path
AI analysis · Low 47/100

This commit fixes a reliability issue in the Lightning Dev Kit where a 'payment received' event could be lost if the program restarted at the wrong moment. Previously, the code already protected the 'payment sent' event with a mechanism that blocks certain channel updates until the event is safely handled. This change extends the same protection to the 'payment claimed' (payment received) event, so users' payment records remain accurate even after crashes or restarts. It is a defensive correctness fix rather than a remote exploit.