LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

302security candidates261second-pass queue1608AI analyses
180commits · 30 days
266commits · 60 days
641commits · 180 days
1320commits · 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
710Strong · 80–100
856Adequate · 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 Corallo59080419876
Elias Rohrer15415153667
auto-pr-bot571823287
Jeffrey Czyz19645182169
Wilmer Paulino15945155169
Valentine Wallace15715145169
Leo Nash11613116162
Vincenzo Palazzo11311183
Joost Jager16324162069
elnosh401434059
shaavan22622069
wpaulino2059082
Analysis record

Published AI watches

Last scanned 55 minutes ago

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
Moderate 52 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Handle fee multiplication overflow when merging MPP paths' (#5288)

This change fixes a place in the Lightning payment routing code where adding up fees could overflow the maximum number a computer can store in a 64-bit integer. Previously, the code assumed this could never happen and would crash (panic) i…

Integer overflow in fee computationPreviously unreachable!() panic path reachableMPP path merge could trigger overflow
25f8a740by Matt Corallo+42−171 file
No security note in commit
Low 43 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Resume channels stuck awaiting a completed monitor persistence on reload' (#5610)

This commit fixes a bug where a Lightning node could get stuck after restarting. If the node crashed or restarted while it was still saving the initial channel monitor to disk, and that save later finished in another process, the restarted…

Fixes a state-machine stall on node reload that could leave channels non-functionalRemoves an overstrict assertion that would panic on a legitimate post-reload stateAdds explicit detection of monitor persistence completed in a prior process
11815ed1by Matt Corallo+334−74 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Correct KeysManager docs on spliced channels' remote_key derivation' (#5609)

This change only updates documentation and code comments in the Lightning Dev Kit library. It clarifies that a particular key-derivation setting is fixed when a channel is first opened and is not changed by splicing. No code behavior was a…

83a4d243by Matt Corallo+17−91 file
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix DelayedPaymentKey/HtlcKey from_basepoint docs and document justice tx witness script' (#5596)

This commit only changes documentation comments in two source files. It corrects the wording of how certain public keys are derived in the Lightning protocol and adds details about which witness script a signer must use when creating justi…

Documentation-only changeClarifies key derivation semantics for Lightning commitment transactionsClarifies justice transaction witness script requirements for signers
2f832195by Matt Corallo+44−62 files
No security note in commit
Informational 19 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Document that TokioSpawner requires all of LDK in a tokio context' (#5621)

This change only adds documentation comments to a Rust struct. It does not modify any executable code, so it cannot by itself introduce or fix a security vulnerability. The new text warns developers that using TokioSpawner incorrectly can …

Documentation-only changeNo code logic modifiedNo unsafe blocks added
6e555fa2by Matt Corallo+11−01 file
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-priorityln: make channel required in `MonitorUpdateCompletionAction`by Carla Kirk-Cohen · 103686d0 · Mar 9, 2026 · 1 fileMessage 73 · AdequateLow 27Details
Commit message · Carla Kirk-Cohen

ln: make channel required in `MonitorUpdateCompletionAction`

`downstream_counterparty_and_funding_outpoint` was added to LDK in
0.0.116. We do not allow direct upgrades with pending forwards to 0.1
from 0.0.123 and below, so we can now assume that this field will
always be present.

This change also makes it impossible to create a
`EmitEventOptionAndFreeOtherChannel` action with nothing in it (no
event or channel), which could have been possible now that we've made
the event optional).

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

This commit tightens an internal data structure in the Lightning Dev Kit so that a channel identifier is always required when releasing a blocked channel after a monitor update. Previously the channel field was optional, which could have allowed creating an action that neither emitted an event nor freed a channel—an empty no-op. The change removes that possibility and updates serialization to treat the field as required, reflecting that older versions without it are no longer supported for direct upgrades.

Lower-priorityln/refactor: rename EmitEventAndFreeOtherChannel to note optional eventby Carla Kirk-Cohen · 631cf882 · Mar 9, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Carla Kirk-Cohen

ln/refactor: rename EmitEventAndFreeOtherChannel to note optional event

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

This commit is a simple code cleanup: it renames an internal enum variant from EmitEventAndFreeOtherChannel to EmitEventOptionAndFreeOtherChannel to better reflect that the event field is optional. No behavior changes, no security fixes, and no bug fixes are present.

Lower-priorityln: make event optional in EmitEventAndFreeOtherChannelby Carla Kirk-Cohen · dd15359d · Mar 9, 2026 · 2 filesMessage 85 · StrongInformational 24Details
Commit message · Carla Kirk-Cohen

ln: make event optional in EmitEventAndFreeOtherChannel

In the commits that follow, we want to be able to free the other
channel without emitting an event so that we can emit a single event
for trampoline payments with multiple incoming HTLCs. We still want
to go through the full claim flow for each incoming HTLC (and persist
the EmitEventAndFreeOtherChannel event to be picked up on restart), but
do not want multiple events for the same trampoline forward.

Changing from upgradable_required to upgradable_option is forwards
compatible - old versions of the software will always have written this
field, newer versions don't require it to be there but will be able to
read it as-is.

This change is not backwards compatible, because older versions of the
software will expect the field to be present but newer versions may not
write it. An alternative would be to add a new event type, but that
would need to have an even TLV (because the event must be understood
and processed on restart to claim the incoming HTLC), so that option
isn't backwards compatible either.

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

This commit changes how Lightning Dev Kit stores an internal event record when a payment is forwarded, specifically for an upcoming feature called trampoline payments. It makes one field optional so that future code can avoid emitting duplicate events when multiple incoming payments are part of the same trampoline forward. The change is forward-compatible but not backward-compatible: older versions of LDK will expect the field to always be present, so downgrading while trampoline forwards are in progress is not supported. There is no direct security vulnerability in this patch; it is a data-format change to enable a future feature.

Security candidateln/events: multiple htlcs in/out for trampoline PaymentForwardedby Carla Kirk-Cohen · 607abaff · Mar 9, 2026 · 7 filesMessage 50 · ThinInformational 19Details
Commit message · Carla Kirk-Cohen

ln/events: multiple htlcs in/out for trampoline PaymentForwarded

50/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
boot or update path
AI analysis · Informational 19/100

This commit is a routine API refactor in the Lightning Dev Kit. It changes how a 'payment forwarded' event reports the incoming and outgoing payment channels, grouping them into lists so that future 'trampoline' routing can report multiple parts. There is no direct evidence in the commit that this fixes a security vulnerability; it appears to be a feature/structural improvement.

Lower-prioritySmall tweaks to CLAUDE.mdby Matt Corallo · 5574dbef · Mar 9, 2026 · 1 fileMessage 45 · ThinInformational 15Details
Commit message · Matt Corallo

Small tweaks to CLAUDE.md

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

This commit only edits a project documentation file (CLAUDE.md) that gives coding guidelines for AI assistants. It changes wording about when to run code formatting and adds a guideline about writing self-contained comments. No program code, build scripts, tests, or security-relevant configuration were modified.

Lower-priorityFix spurious `debug_assert` in UTXO gossip dedup checkby Elias Rohrer · 40bc82cf · Mar 6, 2026 · 1 fileMessage 85 · StrongLow 25Details
Commit message · Elias Rohrer

Fix spurious `debug_assert` in UTXO gossip dedup check

`check_replace_previous_entry` hit `debug_assert!(false)` when
`channel_announce` was `None` on a still-live `UtxoMessages`. The
comment claimed this was unreachable because `channel_announce` is set
under the same lock as the channel map entry. However, there is a
legitimate race:

1. A channel announcement arrives, an async UTXO lookup starts, and
`pending_channels[scid]` is set with a `Weak` to the
`UtxoMessages`.
2. The lookup resolves. `resolve_single_future` takes both
`channel_announce` and `complete` via `.take()`, but the
`Arc<Mutex<UtxoMessages>>` is still alive on the stack of
`check_resolved_futures`.
3. A duplicate announcement for the same SCID arrives during this
window. `check_replace_previous_entry` upgrades the `Weak`,
finds `channel_announce` is `None`, and hits the assert.

Replace the unconditional `debug_assert!(false)` with a targeted check
that `complete` has also been taken (confirming the future resolved),
which would catch a genuinely unexpected state where
`channel_announce` is `None` but `complete` is still pending.

Co-Authored-By: HAL 9000

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

This commit fixes a harmless but incorrect internal sanity check (a debug-only assertion) in the Lightning Dev Kit's code that handles duplicate routing announcements. The assertion could fire in a legitimate race condition even though nothing was wrong. The fix replaces the overly broad assertion with a more precise one that only complains if the program state is genuinely inconsistent. It is not a security vulnerability and cannot be exploited by an attacker.

Lower-priorityRefactor complete_interactive_funding_negotiation_for_bothby Jeffrey Czyz · 6c100549 · Mar 4, 2026 · 1 fileMessage 53 · ThinInformational 14Details
Commit message · Jeffrey Czyz

Refactor complete_interactive_funding_negotiation_for_both

Use a single get_and_clear_pending_msg_events() + match pattern for the
initiator's turn, matching the existing acceptor code path. Also add
assertions that all expected initiator inputs and outputs were sent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

53/100 · ThinMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context! Too few words to establish purpose
AI analysis · Informational 14/100

This commit is a test-only refactor. It rewrites a helper function in the splicing test suite to use a cleaner match statement and adds assertions that expected test inputs/outputs were actually sent. It does not change production code, cryptographic logic, network handling, or any behavior that could affect real users' funds or node security.

Security candidateContribute to splice as acceptorby Jeffrey Czyz · d964be91 · Mar 4, 2026 · 3 filesMessage 68 · AdequateLow 33Details
Commit message · Jeffrey Czyz

Contribute to splice as acceptor

When both nodes want to splice simultaneously, the quiescence
tie-breaker designates one as the initiator. Previously, the losing
node responded with zero contribution, requiring a second full splice
session after the first splice locked. This is wasteful, especially for
often-offline nodes that may connect and immediately want to splice.

Instead, the losing node contributes to the winner's splice as the
acceptor, merging both contributions into a single splice transaction.
Since the FundingContribution was originally built with initiator fees
(which include common fields and shared input/output weight), the fee is
adjusted to the acceptor rate before contributing, with the surplus
returned to the change output.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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

This commit changes how the Lightning Dev Kit handles a rare situation where both sides of a channel try to splice funds at the same time. Previously, the node that lost the tie-breaker would sit out and start a second splice later. Now, the loser contributes its funds to the winner's splice as an 'acceptor,' combining both into one transaction. The change also adjusts fees and change outputs when the winner's chosen fee rate differs from what the loser expected. This is a protocol optimization, not a clear security fix, but it touches fee accounting and transaction construction, which are sensitive areas.

Security candidateAdjust FundingContribution for acceptorby Jeffrey Czyz · 7942c745 · Mar 4, 2026 · 6 filesMessage 58 · ThinLow 44Details
Commit message · Jeffrey Czyz

Adjust FundingContribution for acceptor

When constructing a FundingContribution, it's always assumed the
estimated_fee is for when used as the initiator, who pays for the common
fields and shared inputs / outputs. However, when the contribution is
used as the acceptor, we'd be overpaying fees.

Additionally, the initiator's chosen fee rate may not be compatible with
the acceptors contributions. The selected UTXOs may not be enough to pay
for a higher feerate (i.e., the change output is not enough to pay or
there is no change output).

This change provides a method on FundingContribution for adjusting the
fee rate with the above concerns in mind. It also updates it to include
a max_feerate specified by the user when initiating a splice. This
ensures the acceptor isn't forced to pay an overly high fee rate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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

This commit fixes a fee-calculation bug in Lightning splicing. Previously, when both sides tried to splice at the same time, the loser of a tie-break (the 'acceptor') built their contribution as if they were going to pay for the whole shared transaction. That made them overpay fees, and a high fee rate chosen by the other side could drain more from their wallet than intended or even make the transaction invalid. The patch adds logic to re-estimate fees from the acceptor's perspective and lets users set a maximum fee rate they are willing to accept.

Security candidateInclude change output weight in estimate_transaction_feeby Jeffrey Czyz · d9327ba9 · Mar 4, 2026 · 2 filesMessage 73 · AdequateLow 37Details
Commit message · Jeffrey Czyz

Include change output weight in estimate_transaction_fee

Add a `change_output: Option<&TxOut>` parameter to
`estimate_transaction_fee` so the initial fee estimate accounts for the
change output's weight. Previously, the change output weight was omitted
from `estimated_fee` in `FundingContribution`, causing the estimate to
be slightly too low when a change output was present.

This also eliminates an unnecessary `Vec<TxOut>` allocation in
`compute_feerate_adjustment`, which previously cloned outputs into a
temporary Vec just to include the change output for the fee estimate.

A mock `TightBudgetWallet` is added to `splicing_tests` to demonstrate
that `validate()` correctly rejects contributions where the input value
is sufficient without the change output weight but insufficient with it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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

This commit fixes a fee-estimation bug in rust-lightning's channel funding and splicing code. When building a transaction that creates a change output, the code previously forgot to include the change output's size/weight when estimating the required transaction fee. That made the fee estimate slightly too low. The patch adds the missing weight and adds a test showing that a contribution with barely enough money would now be correctly rejected, whereas before it might have been accepted and later failed to broadcast or confirm reliably.

Lower-prioritySplit InteractiveTxConstructor::new into outbound/inbound variantsby Jeffrey Czyz · 77ce89bb · Mar 4, 2026 · 2 filesMessage 73 · AdequateLow 26Details
Commit message · Jeffrey Czyz

Split InteractiveTxConstructor::new into outbound/inbound variants

Replace the single public InteractiveTxConstructor::new() with separate
new_for_outbound() and new_for_inbound() constructors. This moves the
initiator's first message preparation out of the core constructor,
making it infallible and removing is_initiator from the args struct.

Callers no longer need to handle constructor errors, which avoids having
to generate SpliceFailed/DiscardFunding events after the QuiescentAction
has already been consumed during splice_init/splice_ack handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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

This commit refactors how an internal transaction-construction object is created in the Lightning Dev Kit. It splits one constructor into two separate ones for the party that starts the process versus the party that responds. The main practical effect is that callers no longer have to handle an error right after they have already committed to starting a splice, which avoids a tricky cleanup situation where they might otherwise have to emit a failure event after consuming internal state. It is a defensive code-quality change rather than a fix for a known active exploit.

Security candidateStop persisting QuiescentAction and remove legacy codeby Jeffrey Czyz · 3e9dff9c · Mar 4, 2026 · 5 filesMessage 73 · AdequateLow 35Details
Commit message · Jeffrey Czyz

Stop persisting QuiescentAction and remove legacy code

Now that the Splice variant (containing non-serializable
FundingContribution) is the only variant produced, and the previous
commit consumes the acceptor's quiescent_action in splice_init(),
there is no longer a need to persist it. This allows removing
LegacySplice, SpliceInstructions, ChangeStrategy, and related code
paths including calculate_change_output, calculate_change_output_value,
and the legacy send_splice_init method.

With ChangeStrategy removed, the only remaining path in
calculate_change_output was FromCoinSelection which always returned
Ok(None), making it dead code. The into_interactive_tx_constructor
method is simplified accordingly, and the signer_provider parameter
is removed from it and from splice_init/splice_ack since it was only
needed for the removed change output calculation.

On deserialization, quiescent_action (TLV 65) is still read for
backwards compatibility but discarded, and the awaiting_quiescence
channel state flag is cleared since it cannot be acted upon without
a quiescent_action.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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

This commit removes old, no-longer-used code paths for splicing (a way to resize a Lightning channel). It stops saving a 'quiescent action' to disk because the only remaining variant cannot be serialized, and it drops legacy change-output calculation logic. On loading old data, the stored action is read and then discarded, and the 'awaiting quiescence' flag is cleared so the node does not get stuck waiting for something it can no longer act upon. The change is mostly cleanup and hardening against stale persisted state.

Lower-prioritySkip non-key entries in list_paginatedby benthecarman · 1545ad54 · Mar 2, 2026 · 2 filesMessage 78 · AdequateLow 37Details
Commit message · benthecarman

Skip non-key entries in list_paginated

Use dir_entry_is_key in list_paginated_impl to skip .tmp files,
directories, and other non-key entries, to be the same as list_impl.

Claude added a test for this as well.

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

This commit fixes a consistency bug in a file-based storage component used by Lightning Dev Kit. A paginated listing function was including temporary files and stray directories as if they were real data keys, which could confuse callers, leak internal filenames, or cause errors when reading back data. The fix makes the paginated listing skip the same non-key entries that the non-paginated listing already skipped.

Lower-priorityClarify CLTV expiry delta for trampolines furtherby Matt Corallo · 4221afd2 · Feb 26, 2026 · 1 fileMessage 45 · ThinInformational 11Details
Commit message · Matt Corallo

Clarify CLTV expiry delta for trampolines further

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

This commit only updates documentation comments and tightens an internal consistency check for a special routing feature (Trampoline payments). It does not change any security-sensitive behavior or fix a vulnerability. The change makes the code's internal assertion stricter (requiring exact equality rather than 'not greater than') when trampoline hops are present, but this is a correctness/clarity improvement, not a security fix.

Lower-priorityUse the new `total_cltv_expiry_delta()` in place of explicit sumby Matt Corallo · 12eb3b6c · Feb 26, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · Matt Corallo

Use the new `total_cltv_expiry_delta()` in place of explicit sum

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

This is a tiny internal code cleanup: it replaces a manual loop that adds up CLTV expiry deltas with a new helper method that does the same thing. There is no functional change and no security relevance visible in the commit.

AI review queuedCheck that funder covers the fee spike buffer multiple after a spliceby Leo Nash · f784731e · Feb 25, 2026 · 5 filesMessage 73 · AdequateModerate 59Details
Commit message · Leo Nash

Check that funder covers the fee spike buffer multiple after a splice

We do this for HTLCs, so we should also do this for splices. This
only applies to channels with non-zero-fee HTLC transactions.

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

This commit fixes a balance-checking gap in the Lightning Dev Kit's channel splicing logic. When a channel is spliced, the code now verifies that the funder still has enough funds set aside to cover a sudden fee increase, mirroring a check already performed when adding HTLCs. Without this check, a funder could splice out too much money, leaving the channel unable to pay higher fees later and potentially making it unusable or forcing a closure. The change only affects channels that do not use zero-fee HTLC transactions.

Lower-priorityGet rid of unnecessary clone when constructing page tokenby benthecarman · 0723ffdf · Feb 25, 2026 · 1 fileMessage 50 · ThinInformational 15Details
Commit message · benthecarman

Get rid of unnecessary clone when constructing page token

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

This is a minor code cleanup that removes an unnecessary clone of string keys when building a paginated list response. It changes the order of operations so the same data is moved rather than duplicated, with no functional change to behavior or outputs.

Security candidatePropagate unexpected metadata errors when preserving mtime in fs_storeby benthecarman · 6a43a451 · Feb 25, 2026 · 1 fileMessage 73 · AdequateLow 35Details
Commit message · benthecarman

Propagate unexpected metadata errors when preserving mtime in fs_store

Previously, all fs::metadata errors were silently ignored via .ok(),
which could hide permission or I/O errors. Now error are properly
handled.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
credential or privilege state
AI analysis · Low 35/100

This change fixes a bug in the file storage component where errors from checking a file's metadata (such as permission denied or disk I/O problems) were silently ignored. Now, most unexpected errors are reported up the chain instead of being swallowed, so the software can react appropriately rather than silently losing information about file modification times.

AI review queuedCleanup unused codeby Elias Rohrer · 9a64a659 · Feb 25, 2026 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Elias Rohrer

Cleanup unused code

.. for which we got warnings

28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100

This commit removes unused code and silences compiler warnings. It does not change any active behavior, fix a bug, or alter security logic. There is no security relevance.

Lower-priorityDrop `chain_source` from `LSPS1ServiceHandler`by Elias Rohrer · 0d7408bf · Feb 25, 2026 · 2 filesMessage 58 · ThinInformational 15Details
Commit message · Elias Rohrer

Drop `chain_source` from `LSPS1ServiceHandler`

We previously considered tracking payment confirmations as part of the
handler. However, we can considerably simplify our logic if we stick
with the current approach of having the LSPs track the payment status
and update us when prompted through events.

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

This commit removes an unused `chain_source` field from a Lightning service handler. It is a straightforward internal cleanup that simplifies the code by no longer passing around a blockchain data source that was not actually being used. There is no indication this fixes or introduces a security issue.

Lower-priorityMove `PeerState` and related types to `peer_state.rs` moduleby Elias Rohrer · c6465f2f · Feb 25, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · Elias Rohrer

Move `PeerState` and related types to `peer_state.rs` module

We move the `PeerState` related types to a new module. In the following
commits we'll bit-by-bit drop the `pub(super)`s introduced here,
asserting better separation of state and logic going forward.

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

This commit is a pure code reorganization: it moves the PeerState type and related helper types from the service.rs file into a new peer_state.rs module. No behavior changes, security fixes, or vulnerability patches are present.

Lower-priorityDrop `Listen`/`Confirm`/etc from `LiquidityManager`by Elias Rohrer · 8ad5101b · Feb 25, 2026 · 6 filesMessage 73 · AdequateInformational 15Details
Commit message · Elias Rohrer

Drop `Listen`/`Confirm`/etc from `LiquidityManager`

Now that we don't do on-chain tracking in LSPS1, we can drop quite a few
`LiquidityManager` parameters and generics, which were only added in
anticipation of tracking on-chain state.

Signed-off-by: Elias Rohrer <dev@tnull.de>

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

This commit removes unused on-chain tracking code from the LiquidityManager component. It is a cleanup change that simplifies the API by removing parameters and traits that were added in anticipation of future LSPS1 on-chain tracking but are no longer needed. There is no indication this fixes a security vulnerability.

Lower-priorityDrop bogus channel state handlingby Elias Rohrer · fa867c27 · Feb 25, 2026 · 2 filesMessage 68 · AdequateInformational 18Details
Commit message · Elias Rohrer

Drop bogus channel state handling

.. we will re-add a proper state machine in a later commit, but for now
we can just drop all of this half-baked logic that doesn't actually do
anything.

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

This commit removes unused, half-implemented state tracking code from an experimental LSPS1 (Lightning Service Provider Specification 1) liquidity module. The deleted code tracked whether an outbound channel order was 'created' or 'awaiting payment', but the commit message says the logic 'doesn't actually do anything' and will be replaced later. There is no direct evidence this fixes an active security bug; it appears to be a cleanup/refactoring change.

Lower-priorityReplace `insert_outbound_channel` with `PeerState::new_order`by Elias Rohrer · 0c8e26a3 · Feb 25, 2026 · 2 filesMessage 50 · ThinInformational 15Details
Commit message · Elias Rohrer

Replace `insert_outbound_channel` with `PeerState::new_order`

.. requiring less access to internals

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

This is a small internal code cleanup in the LSPS1 (liquidity service) module. It replaces a two-step process—creating a channel object in one file and inserting it in another—with a single method call. There is no user-visible behavior change and no security fix.

Lower-priorityLSPS1: Add initial integration testby Martin Saposnic · a024a760 · Feb 25, 2026 · 1 fileMessage 86 · StrongInformational 15Details
Commit message · Martin Saposnic

LSPS1: Add initial integration test

We add the first LSPS1 integration test. This is based on the unfinished
work in https://github.com/lightningdevkit/rust-lightning/pull/3864, but
rebased to account for the new ways we now do integration test setup.

86/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 15/100

This commit adds a new automated integration test for the LSPS1 (Lightning Service Provider Specification 1) feature in the rust-lightning project. It does not change any production code, only test code. There is no security issue here.