LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

1497 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 candidates209second-pass queue1479AI analyses
64commits · 30 days
198commits · 60 days
656commits · 180 days
1472commits · 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
359Strong · 80–100
790Adequate · 60–79
288Thin · 40–59
60Opaque · 0–39
3security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
Elias Rohrer15315153667
Matt Corallo35847356473
Jeffrey Czyz17741177168
Wilmer Paulino14939149169
Leo Nash11613116162
Valentine Wallace13710135169
Vincenzo Palazzo10210184
Joost Jager16224162069
elnosh301330056
shaavan22622069
Carla Kirk-Cohen78366068
benthecarman18318071
Analysis record

Published AI watches

Last scanned 46 minutes ago

Low 32 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Only fetch TXIDs instead of entire block during gossip verification' (#4846)

This commit changes how the Lightning Dev Kit's block-sync module verifies Lightning network gossip announcements. Instead of downloading entire Bitcoin blocks (which can be large), it now downloads only the list of transaction IDs for a b…

API surface change in UtxoSource traitReduced data exposure: no longer fetches full blocks for gossip verificationNew JSON parsing for txid lists and TxOut values
ebe7a447by Matt Corallo+275−1025 files
No security note in commit
Low 35 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Allow filtered block rescans at the current tip' (#4847)

This commit changes how the Lightning Dev Kit (LDK) node software handles receiving the same block twice through its filtered-block interface. Previously, calling filtered_block_connected with the current tip again would trigger an asserti…

Assertion relaxation in block connection pathPotential denial-of-service vector removed: previously a malicious or buggy filter provider could crash the node by replaying the current tipNew test coverage for same-block filtered rescan
54ddbd0bby Matt Corallo+177−486 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add test framework coverage of `Listen` block connection replays

This commit only adds a new test mode to the project's internal testing framework. It lets developers simulate a specific way blocks are delivered to the Lightning node (a 'replay' through the Listen interface) so that behavior is covered …

bf6ad23eby Matt Corallo+18−32 files
No security note in commit
Informational 15 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Update functional test block connection to detect block replays

This commit changes only internal test helper code in the Lightning Dev Kit repository. It makes the functional test framework smarter about 'block replays'—situations where the same block is fed to a test node more than once—so the fake b…

No production code modifiedNo cryptographic, consensus, or networking changesCommit message frames change as test-framework correctness, not security
477facb4by Matt Corallo+41−333 files
No security note in commit
Moderate 66 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Correct HTLC confusion on unrevoked counterparty commitment txs

This patch fixes a bug in the Lightning Dev Kit where the software could confuse HTLCs (payment contracts) on live, unrevoked counterparty commitment transactions with ones from old, revoked transactions. Previously, it relied only on whet…

Incorrect revocation state detection for counterparty commitment transactionsHTLC direction not previously checked when matching against pending HTLCsPromotion of debug assertions to full assertions for HTLC claim path consistency
f06a08a6by Matt Corallo+26−192 files
Vendor flagged security relevance
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
Moderate 62 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid panicking when attempting to send an oversized message

This commit fixes a crash bug in the Lightning Dev Kit's peer message handling. Previously, if a message grew too large to be sent over the encrypted peer connection, the code would panic (abruptly terminate the whole program). The patch m…

Replaces a `.expect()` panic path with a fallible `Result` in peer message encryptionAdds graceful peer disconnection when a critical message cannot be sentIncludes a regression test for oversized-message handling
c5fdc3bfby Matt Corallo+148−901 file
Vendor flagged security relevance
High 74 AI analysisMessage 78 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid oversized relayed failure messages

This patch fixes a crash bug in the Lightning Dev Kit's handling of HTLC failure messages. A downstream peer could send a maximally-sized failure message without attribution data. When the node added its own attribution data while relaying…

Denial-of-service via remote-triggered panic in message encryptionOversized message exceeding Noise/Lightning wire framing limitMissing length validation before adding attribution data during relay
6b1dfb1aby Matt Corallo+64−191 file
Vendor flagged security relevance
Moderate 64 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Reject attempts to advance one-hop blinded forward paths

This commit fixes a denial-of-service bug in rust-lightning where a maliciously crafted one-hop blinded reply path could cause the node to panic when it tried to respond. The fix rejects paths with too few hops before advancing them, and a…

Denial-of-service vector via malformed blinded pathPanic in onion construction due to zero-hop pathUntrusted reply path input validation gap
969a40cfby Matt Corallo+49−14 files
Vendor flagged security relevance
High 72 AI analysisMessage 96 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

lightning-types: replace Zl/Zp separators in `PrintableString`

This commit fixes a log-forgery risk in a Rust Lightning library helper called PrintableString. That helper is meant to make untrusted text safe to print by replacing dangerous characters with a placeholder. It already caught most control …

log injection / log forgery via U+2028/U+2029 line separatorsincomplete input sanitisation in PrintableStringpeer-controlled strings (node alias, BOLT 12 description/issuer/payer_note, peer_msg) as attack surface
75defa9cby Vincenzo Palazzo+63−83 files
Vendor flagged security relevance
Moderate 69 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Apply the unfunded channel peer limit to all unaccepted channels

This commit fixes a rate-limiting bug in the Lightning Dev Kit (LDK) that let a single peer bypass the cap on how many different peers can have unfunded (not-yet-funded) channels open. Previously, if a peer sent multiple channel requests q…

Denial-of-service resource exhaustion via rapid inbound channel open requestsLogic error in rate-limiting conditionRegression test added for the bypass scenario
56a4ee43by Matt Corallo+87−62 files
Vendor flagged security relevance
Moderate 60 AI analysisMessage 88 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Allow filtered block rescans at the current tip

This commit fixes a bug where replaying the current blockchain block through a normal listener callback could crash two core Lightning components (ChannelManager and OutputSweeper) with a panic. The fix recognizes a same-block replay as a …

panic in chain listener callbacksame-block replay/rescan mishandlingassertion failure on valid chain input
686f9860by Elias Rohrer+118−123 files
Vendor flagged security relevance
Moderate 57 AI analysisMessage 78 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Avoid panic when reorged claims cannot merge

This commit fixes a crash bug in the Lightning Dev Kit's on-chain transaction handler. During a deep blockchain reorganization, a previously settled HTLC claim could be 'resurrected' at a block height where it could no longer be combined w…

Assertion/panic in reorg handling pathDeep blockchain reorg as trigger conditionHTLC claim resurrection after reorg
f1dc8487by Matt Corallo+219−52 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
Low 45 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Account for message type prefix len in prevtx length enforcement

This commit fixes a small but real accounting bug in how rust-lightning checks whether a previous transaction (prevtx) attached to a funding input will make the resulting Lightning wire message too large. The code previously compared the m…

Off-by-constant length check in protocol message size enforcementPotential acceptance of a prevtx that produces an oversized Lightning wire messageDenial-of-service / protocol-interop risk from peer message rejection
d29e1415by Wilmer Paulino+21−41 file
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 37 AI analysisMessage 83 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

bolt12: add pay_for_bolt12_invoice for externally-sourced invoices

This commit adds a new API, pay_for_bolt12_invoice, that lets users pay a BOLT 12 invoice even if LDK did not originally request it. It is intended for advanced use cases like multi-sender payments and replaces an older, more restrictive A…

New API removes internal invoice-origin verification, shifting trust boundary to callerDocumentation explicitly warns caller to verify invoice via Bolt12Invoice::verify_using_metadata and to ensure unique payment_id to avoid duplicate paymentsInput validation added for zero amount, overpay, and partial-amount-without-MPP
5b80fe9cby Alkamal01+550−156 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 16 AI analysisMessage 35 · Opaque
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

ln/refactor: remove BlindedTrampolineEntrypoint

This commit is a small internal code cleanup in the Lightning Dev Kit's Trampoline routing code. It removes a separate 'BlindedTrampolineEntrypoint' payload variant and folds an optional blinding point into the existing 'Forward' variant. …

Refactor-only change with no added bounds checks or validationNo mention of vulnerability, CVE, security fix, or bug in commit messageTLV field changed from required to optional, but only for a newly unified variant used in internal construction
3e0c2697by Carla Kirk-Cohen+8−263 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-prioritySet funding_locked_txid TLVs in channel_reestablishby Jeffrey Czyz · d8f421ef · Aug 28, 2025 · 1 fileMessage 73 · AdequateLow 33Details
Commit message · Jeffrey Czyz

Set funding_locked_txid TLVs in channel_reestablish

The previous commit extended the channel_reestablish message with
your_last_funding_locked_txid and my_current_funding_locked_txid for use
as described there. This commit sets those fields to the funding txid
most recently sent/received accordingly.

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

This commit fills in two previously-empty fields in a Lightning channel recovery message. These fields tell each side which funding transaction the other side last confirmed as locked. Setting them correctly helps nodes resume a channel after a disconnect without disagreeing about which funds are active. The change is a follow-up to a prior commit that added the message fields but left them unset.

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.

Lower-priorityAdd features for splicingby Jeffrey Czyz · 3f4356ac · Aug 28, 2025 · 1 fileMessage 58 · ThinInformational 18Details
Commit message · Jeffrey Czyz

Add features for splicing

While splicing is not yet fully supported, checking if the feature has
been negotiated is needed for changes to the channel_reestablish logic.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Informational 18/100

This commit adds support for advertising a new Lightning protocol feature called 'Splicing' in the feature-bit flags that nodes exchange when connecting. It does not implement splicing itself and does not change any security-sensitive logic. It is a routine protocol-compatibility change.

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.

Lower-priorityAdd test for dummy hop insertionby shaavan · fdf352b7 · Aug 28, 2025 · 3 filesMessage 78 · AdequateInformational 13Details
Commit message · shaavan

Add test for dummy hop insertion

Introduces a test to verify correct handling of dummy hops
in constructed blinded paths.
Ensures that the added dummy hops are properly included and
do not interfere with the real path.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI analysis · Informational 13/100

This commit only adds new tests and updates an existing test helper. It does not change production code behavior. The tests verify that dummy hops can be inserted into blinded paths and that padded versus compact path formats behave as expected. There is no security fix or vulnerability patch here.

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

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

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.

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