LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

305security candidates264second-pass queue1614AI analyses
175commits · 30 days
273commits · 60 days
653commits · 180 days
1332commits · 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.

71/100 average clarity
726Strong · 80–100
857Adequate · 60–79
302Thin · 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.
Matt Corallo60181423876
Elias Rohrer15415153667
auto-pr-bot622025487
Jeffrey Czyz19645182169
Wilmer Paulino15945155169
Valentine Wallace15715145169
Leo Nash11613116162
Vincenzo Palazzo11311183
Joost Jager16324162069
elnosh401434059
shaavan22622069
wpaulino2059082
Analysis record

Published AI watches

Last scanned 15 minutes ago

Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix 32-bit spin in Vec<u8> deserialization on huge lengths' (#5102)

This commit fixes a bug in how rust-lightning reads variable-length byte blobs on 32-bit systems. A malicious message could claim a huge byte count; on 32-bit builds the old code would try to allocate an oversized buffer in tiny increments…

Integer truncation / cast-down bug in deserializationPotential memory exhaustion / denial-of-service on 32-bit targetsFix caps read chunk size before usize conversion
227b5256by Matt Corallo+1−11 file
No security note in commit
Moderate 62 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to sign messages that alias channel_announcement serializations' (#5727)

This change tightens a security guardrail in LDK's message-signing helper. Previously, the code refused to sign arbitrary text if the prefixed text happened to look like a 'node_announcement' gossip message, because an attacker could repla…

signature-replay hardeninggossip-message aliasing preventiondefensive signing policy expansion
6bc00947by Matt Corallo+69−143 files
Vendor flagged security relevance
High 76 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Refuse to sign messages that alias channel_announcement serializations

This commit fixes a security gap in how the Lightning Dev Kit signs arbitrary messages. Previously, the code refused to sign messages that could be mistaken for a 'node_announcement' gossip message, because such a signature could be replay…

Signature replay / cross-protocol forgery preventionExpansion of existing anti-aliasing guard to additional gossip message typesCommit message explicitly describes forged gossip signature risk
66c2acecby auto-pr-bot+69−143 files
Vendor flagged security relevance
Low 29 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Make Path and Route fields private' (#5068)

This commit makes the internal fields of two data structures, Path and Route, private and adds controlled constructors and read-only accessors. It also adds validation so that empty paths or routes are rejected. The change is primarily a d…

Encapsulation of previously public struct fieldsAddition of input validation in constructors (non-empty hops/paths)Deserialization now rejects invalid empty paths/routes
8f8f95a2by Matt Corallo+83−205 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Populate non-witness UTXOs in bump PSBTs' (#5471)

This change fixes how transaction fee-bumping PSBTs (Partially Signed Bitcoin Transactions) are built in LDK. Previously, when a non-witness UTXO (a non-SegWit coin) was used as an input, the PSBT only had a witness UTXO field populated fo…

PSBT input metadata correctness fixNon-witness UTXO now populated for legacy inputs in fee-bump transactionsAffects CPFP anchor and HTLC transaction signing paths
f1688ce6by Matt Corallo+4−21 file
No security note in commit
Moderate 66 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Track refused monitor updates as pending until persisted' (#5663)

This commit fixes a bug in the Lightning Dev Kit's handling of channel monitor updates that are refused because the channel's funding transaction was already spent on-chain. Previously, such refused updates were persisted as a full monitor…

Durability ordering bug: later MonitorEvent::Completed could imply earlier refused update was persistedRefused monitor update may carry forwarded HTLC preimage, creating risk of inconsistent state across restartAsynchronous persistence tracking gap for refused updates
ea277539by Matt Corallo+56−354 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Expand coverage of splices confirmed before tx_signatures complete' (#5691)

This commit only adds and modifies test code in rust-lightning. It expands test coverage for a specific edge case in Lightning channel splicing: when a splice transaction gets confirmed before both peers have finished exchanging signatures…

11a8e901by Val Wallace+102−411 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct FeeEstimator docs on the 253 sat/kW lower bound

This is a documentation-only edit. It corrects a misleading comment in the code that wrongly claimed all fee estimates returned to LDK are forced to be at least 253 satoshis per 1000 weight units. The new comment clarifies that this minimu…

ea2051feby auto-pr-bot+9−31 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Track splice confirmation while awaiting tx_signatures' (#5570)

This change fixes a bug in Lightning Dev Kit's splicing logic. During a splice, one side can broadcast the new funding transaction as soon as it has the other side's signatures. Previously, if that transaction confirmed on-chain before the…

State-machine inconsistency in channel funding lifecycleMissing chain-source watch for in-flight splice funding transactionPotential failure to send splice_locked after splice confirms during signature exchange
ca778e61by Matt Corallo+245−32 files
No security note in commit
Moderate 63 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Account for current HTLC fees in dust exposure' (#5690)

This change fixes how Lightning nodes calculate the financial risk from tiny ('dust') HTLCs when the current on-chain fee rate is higher than the node's own local fee estimate. Previously, the code only considered a buffered fee rate when …

Incorrect fee exposure accounting for dust HTLCsPotential to accept HTLCs whose commitment/HTLC-success fees exceed their value under current feerateEconomic griefing / forced-channel-closure cost manipulation
cc798f60by Matt Corallo+108−382 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Replace cloned array literal with slice::from_ref in reload test' (#5689)

This is a one-line code cleanup in a test file. It replaces a cloned array literal with a slice reference to silence a Rust compiler lint. There is no change to production code, no security fix, and no functional behavior change.

03ca832fby Matt Corallo+1−11 file
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Replace cloned array literal with slice::from_ref in reload test

This is a one-line change in a test file to satisfy a Rust linter warning. It replaces a needless clone of a funding transaction with a reference-based slice construction. There is no functional change, no user-facing behavior change, and …

93e0129cby auto-pr-bot+1−11 file
No security note in commit
Informational 12 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix CI: rebuild test coin-selection impl and rework reused-ID balance test' (#5684)

This commit is a test-only fix for a broken continuous integration (CI) build. It updates a test mock to match a new function signature and rewrites an existing test to use three nodes instead of two so the test scenario remains valid unde…

17bac68aby Matt Corallo+26−202 files
No security note in commit
Moderate 68 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Guard pending closing signatures before channel_ready' (#5681)

This change fixes a Lightning channel bug where a malicious peer could renegotiate the closing transaction fee while the local node was still waiting for its own signer to produce the final signature. If allowed, the local node might combi…

State-machine guard expansion to prevent fee renegotiation while a closing signature is pendingRisk of combining mismatched signatures across different closing feesRegression test demonstrates malicious peer renegotiation attempt and expected warning rejection
a01273a2by Matt Corallo+169−21 file
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Release wallet UTXOs when FundingBuilder rejects a coin selection' (#5634)

This change fixes a wallet bug in rust-lightning where a UTXO could be selected for a Lightning funding transaction, then rejected because its previous transaction was too large to fit in a Lightning peer message. Previously, that rejectio…

API change to CoinSelectionSource::select_confirmed_utxos adding max_input_prevtx_serialized_lenWalletSync filters UTXOs by prevtx serialized length before selectionFundingBuilder enforces Lightning tx_add_input message-size limit at selection time
56054190by Matt Corallo+148−155 files
No security note in commit
Low 48 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Refuse to pay BOLT 12 invoices with records above experimental range

This commit hardens LDK's BOLT 12 payment logic so it refuses to pay invoices containing very large unknown record types (4 billion and up). These records are legal under the Lightning spec, but LDK doesn't understand them, so the change t…

Defensive refusal to pay invoices with unknown high-numbered TLV recordsReuses existing UnknownRequiredFeatures failure path instead of adding a new oneAdds explicit checks before payment state insertion and route construction
2970372fby auto-pr-bot+106−177 files
No security note in commit
Moderate 64 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Read invoice TLV records above the experimental range

This commit fixes a backward-compatibility bug in LDK's BOLT 12 invoice parser. A previous change had capped the range of 'experimental' TLV record types at 4 billion, but the Lightning spec imposes no upper bound. As a result, invoices cr…

Backward-compatibility regression in deserialization of persisted channel monitorsDenial-of-service via unreadable monitor blocking all channel monitoringSpec compliance fix: TLV record types have no upper bound
9e28db58by auto-pr-bot+133−84 files
No security note in commit
High 74 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to sign messages that collide with gossip serializations' (#5677)

This change fixes a security issue where a signed text message could be crafted so that its prefixed form looks exactly like a Lightning 'node_announcement' gossip message. Because both use the same double-SHA256 hash and the same signing …

Signature replay / message confusion between signed messages and gossip announcementsForged `node_announcement` signatures via chosen-prefix message constructionNew validation rejects prefixed messages that deserialize as `UnsignedNodeAnnouncement`
ec40e097by Matt Corallo+74−148 files
Vendor flagged security relevance
Low 37 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Retry a single HTLC before abandoning an unfundable batch' (#5406)

This change fixes a corner case in how the Lightning node tries to claim multiple pending HTLCs (small Bitcoin payments locked in a channel) when the wallet cannot fund a single large batch transaction. Previously, if the multi-HTLC batch …

Funds-recovery robustness improvement: prevents premature abandonment of a single unbatched HTLCChange in error-handling arithmetic from checked_sub/saturating_sub with max(1)New unit tests covering both failed and successful singleton HTLC funding paths
643e8684by wpaulino+119−21 file
No security note in commit
Moderate 54 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Refuse to persist fresh monitors that alias archived monitors' (#5645)

This change prevents a Lightning node from accidentally overwriting an archived copy of a channel's security monitor with a brand-new one that happens to use the same identifier. In the old code, if a new channel reused the same identifier…

Data-loss prevention: stops archived ChannelMonitor from being overwritten by a later channel with the same keySafety guard added to both sync and async persistence pathsPersistence refusal surfaces as InProgress/UnrecoverableError rather than silent overwrite
3c606c11by Matt Corallo+298−332 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.

Lower-priorityUpdate Default Blinded Path constructor to use Dummy Hopsby shaavan · 988defb8 · Aug 28, 2025 · 1 fileMessage 73 · AdequateLow 40Details
Commit message · shaavan

Update Default Blinded Path constructor to use Dummy Hops

Applies dummy hops by default when constructing blinded paths via
`DefaultMessageRouter`, enhancing privacy by obscuring the true path length.

Uses a predefined `DUMMY_HOPS_COUNT` to apply dummy hops consistently
without requiring explicit user input.

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

This change improves privacy in Lightning onion messages by adding fake 'dummy hops' to blinded paths by default, making it harder for outside observers to guess how far the real recipient is from the sender. It is a defensive privacy hardening patch, not a fix for an active exploit.

Lower-priorityEmit DiscardFunding events for double spent splice transactionsby Wilmer Paulino · 51e342bb · Aug 27, 2025 · 4 filesMessage 85 · StrongLow 32Details
Commit message · Wilmer Paulino

Emit DiscardFunding events for double spent splice transactions

Once we see a splice transaction become locked, we want to emit a
`DiscardFunding` event for every alternative funding transaction
candidate that may have been negotiated due to RBFs, as they may contain
inputs the user has considered "locked" that do not exist in the
confirmed transaction. If the channel closes before the splice is
locked, we rely on the `ChannelMonitor` to produce these events for us
instead.

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

This change makes LDK tell users when alternative splice funding transactions are no longer needed, so they can safely reuse the bitcoin inputs. Previously, after a splice locked in, leftover RBF versions of the splice transaction might not have been reported as discardable, which could leave inputs stuck or accidentally double-spent by the user elsewhere. There is no direct exploit here; it is a correctness and usability fix in a splicing feature still behind a compile-time flag.

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.

AI review queuedRun fmt on `can_send_update_fee`by Leo Nash · 37e69dba · Aug 26, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Leo Nash

Run fmt on `can_send_update_fee`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit is purely a formatting cleanup. It removes a `#[rustfmt::skip]` directive and lets rustfmt reformat the `can_send_update_fee` function in the Lightning channel code. No logic, behavior, or security checks were changed.

AI review queuedRun fmt on `can_accept_incoming_htlc`by Leo Nash · b58d1d05 · Aug 26, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Leo Nash

Run fmt on `can_accept_incoming_htlc`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit is purely a code formatting cleanup. It removes a `#[rustfmt::skip]` annotation and lets rustfmt reformat the `can_accept_incoming_htlc` function in a single file. No logic, behavior, or security checks were changed.

AI review queuedRun fmt on `validate_update_fee`by Leo Nash · f67143a0 · Aug 26, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Leo Nash

Run fmt on `validate_update_fee`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
defensive validationsecond-pass: opaque commit message
AI analysis · Informational 15/100

This commit is purely a code-formatting cleanup. It removes a `#[rustfmt::skip]` directive and lets rustfmt reformat the `validate_update_fee` function. No logic, behavior, or security checks were changed.

AI review queuedRun fmt on `get_next_commitment_htlcs`by Leo Nash · 59ae9e2a · Aug 26, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Leo Nash

Run fmt on `get_next_commitment_htlcs`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit is purely a code formatting cleanup. It removes a `#[rustfmt::skip]` annotation and lets rustfmt reformat the `get_next_commitment_htlcs` function in the Lightning channel code. No logic, behavior, or security properties of the code were changed.

AI review queuedRun fmt on `validate_update_add_htlc`by Leo Nash · e3ab0ea4 · Aug 26, 2025 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Leo Nash

Run fmt on `validate_update_add_htlc`

35/100 · OpaqueMessage clarity
✓ Descriptive subject! No meaningful explanatory body
Why it was queued
defensive validationsecond-pass: opaque commit message
AI analysis · Informational 15/100

This commit is purely a code formatting cleanup. It removes a `#[rustfmt::skip]` annotation and lets rustfmt reformat the `validate_update_add_htlc` function in the Lightning channel code. No logic, behavior, or security checks were changed.

Lower-priorityRun fmt on `get_next_commitment_value_to_self_msat`by Leo Nash · d267d324 · Aug 26, 2025 · 1 fileMessage 40 · ThinInformational 15Details
Commit message · Leo Nash

Run fmt on `get_next_commitment_value_to_self_msat`

40/100 · ThinMessage clarity
✓ Specific, descriptive subject! No meaningful explanatory body
AI analysis · Informational 15/100

This commit is purely a formatting cleanup. It removes a `#[rustfmt::skip]` annotation and lets rustfmt reformat a single function. The code logic is unchanged; only whitespace, line breaks, and two local `use` imports were added to make the function easier to read.

AI review queuedRemove all `rustfmt::skip` in `tx_builder`by Leo Nash · 3f53f3ac · Aug 26, 2025 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Leo Nash

Remove all `rustfmt::skip` in `tx_builder`

45/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is purely a code cleanup: it removes formatting suppression markers (`#[rustfmt::skip]`) from one file and lets the Rust formatter reformat the code. The actual logic, calculations, and behavior of the transaction builder do not change.

Lower-priorityIntroduce parsing logic for DummyTlvsby shaavan · b8d62fc8 · Aug 26, 2025 · 1 fileMessage 45 · ThinLow 28Details
Commit message · shaavan

Introduce parsing logic for DummyTlvs

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

This commit adds code to handle 'dummy' hops in onion-routed Lightning messages. Previously, the code had a placeholder TODO noting that dummy hops were not fully supported. The change lets the messenger recognize a Dummy payload, verify its authentication, build the next onion packet, and continue peeling the onion. It also refactors repeated packet-building code into a helper. There is no direct evidence in the commit or supplied references that this fixes an active security vulnerability; it appears to be a feature completion that removes an unhandled edge case.

Lower-priorityIntroduce DummyTlv for blinded path privacyby shaavan · 224ef96a · Aug 26, 2025 · 2 filesMessage 68 · AdequateInformational 12Details
Commit message · shaavan

Introduce DummyTlv for blinded path privacy

DummyTlv represents an empty TLV inserted immediately before the
actual ReceiveTlvs in a blinded path. These dummy hops are recursively
authenticated like real ones, but carry no content.

By allowing arbitrary dummy hops before the final ReceiveTlvs, we can
obscure the true position of the recipient in the route. This makes it
harder for a malicious onlooker to infer the actual destination,
thereby strengthening recipient privacy.

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

This commit adds a privacy feature, not a security fix. It introduces a 'DummyTlv' mechanism that lets senders insert fake, empty hops at the end of a blinded onion route. The goal is to make it harder for an outside observer to guess where the real recipient is in the path, similar to adding decoy stops before your real destination. The change is defensive in nature and does not appear to patch an active vulnerability.

Lower-priorityIntroduce Dummy Hop support in Blinded Path Constructorby shaavan · 4f5b3676 · Aug 26, 2025 · 1 fileMessage 73 · AdequateInformational 19Details
Commit message · shaavan

Introduce Dummy Hop support in Blinded Path Constructor

Adds a new constructor for blinded paths that allows specifying
the number of dummy hops.
This enables users to insert arbitrary hops before the real destination,
enhancing privacy by making it harder to infer the sender–receiver
distance or identify the final destination.

Lays the groundwork for future use of dummy hops in blinded path construction.

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

This commit adds a new privacy feature to rust-lightning's blinded message paths. It lets callers insert up to 10 fake 'dummy hops' before the real destination, making it harder for outside observers to guess how far apart sender and receiver are or to identify the final recipient. The change is additive: the old constructor still exists and now delegates to the new one with zero dummy hops. There is no obvious security bug in the patch itself.

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.

Lower-priorityCorrect error types for outbound splice checking methodsby Matt Corallo · 2a6501a7 · Aug 26, 2025 · 1 fileMessage 73 · AdequateLow 34Details
Commit message · Matt Corallo

Correct error types for outbound splice checking methods

When doing an outbound splice, we check some of the instructions
first in utility methods, then convert errors to `APIError`s. These
utility methods should thus either return an `APIError` or more
generic (string or `()`) error type, but they currently return a
`ChannelError`, which is only approprite when the calling code will
do what the `ChannelError` instructs (including closing the
channel).

Here we fix that by returning `String`s instead.

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

This patch fixes a bug in how error types are used during Bitcoin Lightning channel 'splicing' operations. Splicing lets users add or remove funds from an open channel. Two internal helper functions were returning a 'ChannelError' type, which tells the caller to take specific actions such as warning or closing the channel. But the callers actually convert the result into a normal API error and do not follow those instructions. As a result, a splice that should simply fail with a clear message could instead be misinterpreted as a reason to close the channel or send a protocol warning. The fix changes the helpers to return plain text error strings instead, so the correct failure behavior happens.

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.

Lower-priorityFix empty witness filter in funding_transaction_signedby Wilmer Paulino · bbe590d3 · Aug 26, 2025 · 1 fileMessage 50 · ThinModerate 59Details
Commit message · Wilmer Paulino

Fix empty witness filter in funding_transaction_signed

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Moderate 59/100

This commit fixes a simple but significant logic bug in the code that handles signed funding transactions for Lightning channels. The original code accidentally kept only empty witnesses (filtering for witness.is_empty()) instead of keeping the actual non-empty signatures (filtering for !witness.is_empty()). As a result, when a peer sent valid signatures to finalize a channel, the local node would receive an empty list and likely fail to complete the channel setup or produce an invalid transaction. This could disrupt channel opens and, in the worst case, be used to stall or deny service to a node, but it does not directly steal funds because the signatures themselves are still validated elsewhere.

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

Lower-priorityOnly sign funding transaction on monitor update resumptionby Wilmer Paulino · a07eb854 · Aug 26, 2025 · 1 fileMessage 73 · AdequateModerate 57Details
Commit message · Wilmer Paulino

Only sign funding transaction on monitor update resumption

The `handle_channel_resumption` path is reachable from both channel
reestablish and monitor update completion. Since we only want to sign
once we know the monitor update has completed, it's possible we could
have unintentionally attempted to sign if we were still pending the
monitor update but had a channel reestablish occur.

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

This change fixes a timing issue in the Lightning Dev Kit where a funding transaction could be signed too early. Previously, the code that decides whether to sign a funding transaction could run both when a channel reconnects and when a pending monitor update finishes. The fix ensures signing only happens after the monitor update has actually completed, preventing a possible invalid or premature signature attempt if a channel reestablish happened while a monitor update was still pending.

Lower-priorityCorrect channel closed detection in payment state replayby Matt Corallo · 3239d671 · Aug 26, 2025 · 1 fileMessage 73 · AdequateModerate 55Details
Commit message · Matt Corallo

Correct channel closed detection in payment state replay

While the case of not having a per-peer-state for a peer that we
have a `ChannelMonitor` with should be unreachable by this point in
`ChannelManager` loading (we have to at least store the latest
update id of the monitor in the peer state), considering a channel
as still-live and not replaying its payment state when we don't
have a per-peer-state is wrong, so here we fix it.

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

This commit fixes a logic bug in the Lightning Dev Kit's channel manager. During startup, when the software replays the state of pending payments, it now assumes a channel is closed unless it finds live peer state proving otherwise. Previously it assumed the channel was open unless proven closed. The change prevents a situation where payments tied to a channel with no peer state would be treated as still active and never re-failed or re-claimed, potentially leaving funds stuck.

Lower-priority`rustfmt` and clean up `get_onchain_failed_outbound_htlcs`by Matt Corallo · 9186900a · Aug 26, 2025 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

`rustfmt` and clean up `get_onchain_failed_outbound_htlcs`

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
AI analysis · Informational 15/100

This commit is purely a code cleanup: it removes a `#[rustfmt::skip]` annotation and reformats a helper function, converting a macro into an equivalent closure. There is no functional change to how the software processes payments or channel data.

Lower-priorityRe-fail perm-failed HTLCs on startup in case of `MonitorEvent` lossby Matt Corallo · f809e6c8 · Aug 26, 2025 · 3 filesMessage 85 · StrongModerate 53Details
Commit message · Matt Corallo

Re-fail perm-failed HTLCs on startup in case of `MonitorEvent` loss

`MonitorEvent`s aren't delivered to the `ChannelManager` in a
durable fashion - if the `ChannelManager` fetches the pending
`MonitorEvent`s, then the `ChannelMonitor` gets persisted (i.e. due
to a block update) then the node crashes, prior to persisting the
`ChannelManager` again, the `MonitorEvent` and its effects on the
`ChannelManger` will be lost. This isn't likely in a sync persist
environment, but in an async one this could be an issue.

Note that this is only an issue for closed channels -
`MonitorEvent`s only inform the `ChannelManager` that a channel is
closed (which the `ChannelManager` will learn on startup or when it
next tries to advance the channel state), that
`ChannelMonitorUpdate` writes completed (which the `ChannelManager`
will detect on startup), or that HTLCs resolved on-chain post
closure. Of the three, only the last is problematic to lose prior
to a reload.

In a previous commit we handled the case of claimed HTLCs by
replaying payment preimages on startup to avoid `MonitorEvent` loss
causing us to miss an HTLC claim. Here we handle the HTLC-failed
case similarly.

Unlike with HTLC claims via preimage, we don't already have replay
logic in `ChannelManager` startup, but its easy enough to add one.
Luckily, we already track when an HTLC reaches permanently-failed
state in `ChannelMonitor` (i.e. it has `ANTI_REORG_DELAY`
confirmations on-chain on the failing transaction), so all we need
to do is add the ability to query for that and fail them on
`ChannelManager` startup.

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

This commit fixes a bug in rust-lightning where a Lightning node could permanently lose track of failed payments after a crash. If the node crashed at exactly the wrong moment, it might never report that a payment had failed, leaving funds in limbo and potentially causing the user or downstream nodes to wait forever. The fix makes the node re-check on startup whether any HTLCs (payment contracts) were already resolved as failed on-chain, and if so, properly fail them again in its internal state.

Lower-priorityRebuild pending payments list before replaying pending claims/failsby Matt Corallo · 8106dbfd · Aug 26, 2025 · 1 fileMessage 73 · AdequateLow 34Details
Commit message · Matt Corallo

Rebuild pending payments list before replaying pending claims/fails

On `ChannelManager` reload we rebuild the pending outbound payments
list by looking for any missing payments in `ChannelMonitor`s.
However, in the same loop over `ChannelMonitor`s, we also re-claim
any pending payments which we see we have a payment preimage for.

If we send an MPP payment across different chanels, the result may
be that we'll iterate the loop, and in each iteration add a
pending payment with only one known path, then claim/fail it and
remove the pending apyment (at least for the claim case). This may
result in spurious extra events, or even both a `PaymentFailed` and
`PaymentSent` event on startup for the same payment.

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

This patch fixes a startup bug in the Lightning Dev Kit's channel manager. When the software restarts, it scans past payment data to rebuild its list of pending payments and to finalize any that already have a result. Previously, these two steps were mixed together in one loop, which could cause a multi-path payment to be partially rebuilt and then finalized before all paths were seen. This could produce duplicate or contradictory events, such as reporting the same payment as both failed and sent. The fix separates the work into two loops: first rebuild all pending payments, then finalize them. There is no direct security exploit here, but the inconsistent state could confuse downstream software or users.

Lower-priorityStore preimages we learned on chain in case of `MonitorEvent` lossby Matt Corallo · 543cc85e · Aug 26, 2025 · 2 filesMessage 73 · AdequateModerate 57Details
Commit message · Matt Corallo

Store preimages we learned on chain in case of `MonitorEvent` loss

`MonitorEvent`s aren't delivered to the `ChannelManager` in a
durable fashion - if the `ChannelManager` fetches the pending
`MonitorEvent`s, then the `ChannelMonitor` gets persisted (i.e. due
to a block update) then the node crashes, prior to persisting the
`ChannelManager` again, the `MonitorEvent` and its effects on the
`ChannelManger` will be lost. This isn't likely in a sync persist
environment, but in an async one this could be an issue.

Note that this is only an issue for closed channels -
`MonitorEvent`s only inform the `ChannelManager` that a channel is
closed (which the `ChannelManager` will learn on startup or when it
next tries to advance the channel state), that
`ChannelMonitorUpdate` writes completed (which the `ChannelManager`
will detect on startup), or that HTLCs resolved on-chain post
closure. Of the three, only the last is problematic to lose prior
to a reload.

When we restart and, during `ChannelManager` load, see a
`ChannelMonitor` for a closed channel, we scan it for preimages
that we passed to it and re-apply those to any pending or forwarded
payments. However, we didn't scan it for preimages it learned from
transactions on-chain. In cases where a `MonitorEvent` is lost,
this can lead to a lost preimage. Here we fix it by simply tracking
preimages we learned on-chain the same way we track preimages
picked up during normal channel operation.

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

This commit fixes a bug in rust-lightning where a Lightning node could permanently lose a payment secret (preimage) if the node crashed at an unlucky moment after a channel was force-closed. Losing the preimage means the node cannot claim funds it is owed, effectively losing money. The fix makes the on-chain monitoring component remember preimages it learns from the blockchain, the same way it already remembers preimages learned during normal channel operation, so a restart can recover them even if an in-memory notification was lost.