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 31 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-priorityExtract shared dummy_monitor helper in channelmonitor.rsby Joost Jager · 876449fe · Mar 18, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Joost Jager

Extract shared dummy_monitor helper in channelmonitor.rs

Extract the ChannelMonitor construction boilerplate that was
duplicated across channelmonitor test functions into a reusable
#[cfg(test)] pub(super) dummy_monitor helper, generic over the
signer type.

AI tools were used in preparing this commit.

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

This commit is a straightforward code cleanup inside the project's test suite. It pulls repeated setup code for creating a fake ChannelMonitor into a single shared helper function called dummy_monitor. There is no change to production behavior, no bug fix, and no security-sensitive logic added or altered.

Security candidateValidate all common fields in LSPS1 `is_valid` order checkby Elias Rohrer · 4bec6db5 · Mar 18, 2026 · 1 fileMessage 78 · AdequateLow 47Details
Commit message · Elias Rohrer

Validate all common fields in LSPS1 `is_valid` order check

Add missing cross-validation of `LSPS1OrderParams` against
`LSPS1Options` as required by bLIP-51:

- Check `required_channel_confirmations` >= `min_required_channel_confirmations`
- Check `funding_confirms_within_blocks` >= `min_funding_confirms_within_blocks`
- Check total channel balance (`lsp_balance_sat` + `client_balance_sat`)
is within [`min_channel_balance_sat`, `max_channel_balance_sat`],
using `checked_add` to guard against overflow

Co-Authored-By: HAL 9000

78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
memory safetydefensive validation
AI analysis · Low 47/100

This commit fixes validation checks in a Lightning service feature (LSPS1) that lets users place orders for liquidity. Previously, the code did not verify that an order's requested channel size and confirmation settings stayed within the service's advertised limits. The patch adds those missing checks and also protects against a rare integer overflow when adding two balance amounts together. A malicious or malformed order could have slipped through and caused the service to accept terms it never intended to offer.

Lower-priorityReject clients if request registration failed (e.g., duplicative Id)by Elias Rohrer · 15dbb217 · Mar 18, 2026 · 1 fileMessage 65 · AdequateLow 37Details
Commit message · Elias Rohrer

Reject clients if request registration failed (e.g., duplicative Id)

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

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 37/100

This small patch fixes a messaging bug in a Lightning liquidity service. Previously, if a client sent a duplicate request ID, the server would log an error but would not tell the client that the request was rejected, leaving the client waiting for a response. Now the server sends an explicit rejection message back to the client. The main risk is a mild denial-of-service or confusion from duplicate/lingering request IDs, not theft of funds or remote code execution.

Lower-priorityLimit pending requests and peers in LSPS1 serviceby Elias Rohrer · b2722357 · Mar 18, 2026 · 3 filesMessage 68 · AdequateModerate 55Details
Commit message · Elias Rohrer

Limit pending requests and peers in LSPS1 service

Add per-peer and global rate limiting to `LSPS1ServiceHandler` to
prevent resource exhaustion, mirroring the existing LSPS2 pattern.

Introduce `MAX_PENDING_REQUESTS_PER_PEER` (10),
`MAX_TOTAL_PENDING_REQUESTS` (1000), and `MAX_TOTAL_PEERS` (100000)
constants and enforce them in `handle_create_order_request`. Rejected
requests receive a `CreateOrderError` with
`LSPS0_CLIENT_REJECTED_ERROR_CODE`. A `total_pending_requests` atomic
counter tracks the global count, and a `verify_pending_request_counter`
debug assertion ensures it stays in sync.

Co-Authored-By: HAL 9000

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

This commit adds rate limits to the LSPS1 (a Lightning liquidity service protocol) server code. It caps how many unfinished order requests a single peer can have open, how many total unfinished requests can exist across all peers, and how many distinct peers can be tracked. Requests that exceed these limits are rejected with a standard error. This is a defensive hardening change to prevent a malicious or buggy peer from consuming excessive server memory or processing time.

Lower-priorityReset `persistence_in_flight` counter on error in LSPS1/LSPS2by Elias Rohrer · 47e5c04f · Mar 18, 2026 · 2 filesMessage 73 · AdequateModerate 60Details
Commit message · Elias Rohrer

Reset `persistence_in_flight` counter on error in LSPS1/LSPS2

Previously, if any `.await?` in the persist loop returned an error, the
`?` would propagate out of `persist()` before reaching the `fetch_sub`
at the end of the loop. This left the counter permanently > 0, causing
all subsequent `persist()` calls to early-return and effectively
disabling persistence for the lifetime of the handler.

Fix this by extracting the loop into `do_persist()` and unconditionally
resetting the counter via `store(0, Release)` in the outer `persist()`
after `do_persist()` returns, regardless of success or failure.

Co-Authored-By: HAL 9000

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

This commit fixes a bug in two Lightning liquidity service modules (LSPS1 and LSPS2). Previously, if saving data to disk failed partway through, an internal 'persistence in flight' counter would stay stuck above zero. Once stuck, the code would skip all future disk-saving attempts for the lifetime of the running service. This could silently stop important state from being saved, potentially leading to data loss or inconsistent service state after a restart. The fix wraps the save loop in a helper function and always resets the counter to zero afterward, whether the save succeeded or failed.

Lower-priorityAdd `onchain_payment_required` methodby Elias Rohrer · 98f71f5d · Mar 18, 2026 · 3 filesMessage 58 · ThinLow 32Details
Commit message · Elias Rohrer

Add `onchain_payment_required` method

We previously had no way to reject requests in case the LSP requires
onchain payment while the client not providing
`refund_onchain_address`. Here we add a method allowing to do so.

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
AI analysis · Low 32/100

This commit adds a new method so a Lightning Service Provider (LSP) can cleanly reject a customer's order when the LSP only accepts on-chain Bitcoin payments but the customer did not supply a refund address. Before this change, the code had no explicit way to reject such orders, which could have led to confused or stuck orders. The change is a defensive API improvement, not a fix for an active exploit.

Lower-priorityDrop unused `LSPS1ServiceEvent::Refund` eventby Elias Rohrer · c0cef54b · Mar 18, 2026 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Elias Rohrer

Drop unused `LSPS1ServiceEvent::Refund` event

Turns out this was another variant we didn't actually use anywhere. So
we're dropping it.

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

This commit simply removes an unused event variant called Refund from a Lightning Service Provider Specification (LSPS1) event enum. It is a cleanup change with no security relevance: the variant was never used in the code, so removing it cannot introduce or fix a vulnerability.

Lower-priorityRefactor `ChannelOrder` to use `ChannelOrderState` state machineby Elias Rohrer · c7db17de · Mar 18, 2026 · 2 filesMessage 73 · AdequateLow 26Details
Commit message · Elias Rohrer

Refactor `ChannelOrder` to use `ChannelOrderState` state machine

This refactors `ChannelOrder` to use an internal state machine enum
`ChannelOrderState` that:
- Encapsulates state-specific data in variants (e.g., `channel_info`
only available in `CompletedAndChannelOpened`)
- Provides type-safe state transitions
- Replaces the generic `update_order_status` API with specific
transition methods: `order_payment_received`, `order_channel_opened`,
and `order_failed_and_refunded`

The state machine has four states:
- `ExpectingPayment`: Initial state, awaiting payment
- `OrderPaid`: Payment received, awaiting channel open
- `CompletedAndChannelOpened`: Terminal state with channel info
- `FailedAndRefunded`: Terminal state for failed/refunded orders

Co-Authored-By: HAL 9000
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 · Low 26/100

This commit is a code-quality refactor, not a security patch. It replaces a loose 'update_order_status' call with a stricter state machine for tracking LSPS1 channel orders. The change makes invalid transitions explicit errors and keeps payment/channel data tied to the correct states, which reduces the chance of accidental misuse but does not by itself fix a known exploitable vulnerability.

Lower-priorityAdd integration tests for LSPS1 order state transition APIby Elias Rohrer · c5139d0f · Mar 18, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · Elias Rohrer

Add integration tests for LSPS1 order state transition API

Add two new integration tests to cover the new public API methods:

- `lsps1_order_state_transitions`: Tests the full flow of
`order_payment_received` followed by `order_channel_opened`,
verifying that payment states are updated correctly and channel
info is returned after the channel is opened.

- `lsps1_order_failed_and_refunded`: Tests the `order_failed_and_refunded`
method, verifying that payment states are set to Refunded.

Co-Authored-By: HAL 9000

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

This commit only adds new automated integration tests for an existing Lightning Service Provider Specification 1 (LSPS1) order state API. It does not change production code, fix bugs, or introduce new functionality. There is no security-relevant change.

Lower-priorityAdd integration test for expired order pruningby Elias Rohrer · 24848738 · Mar 18, 2026 · 1 fileMessage 78 · AdequateInformational 15Details
Commit message · Elias Rohrer

Add integration test for expired order pruning

Add `lsps1_expired_orders_are_pruned_and_not_persisted` test that verifies:

- Orders with expired payment details (expires_at in the past) are
accessible before persist() is called
- After persist() is called, expired orders in ExpectingPayment state
are pruned and no longer accessible
- Pruned orders are not recovered after restart, confirming that
the pruning also removes the persisted state

Co-Authored-By: HAL 9000

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

This commit only adds a new automated integration test. It does not change any production code. The test verifies that expired LSPS1 orders are removed from memory during persistence and are not restored after a restart. There is no security fix or vulnerability patch here.

Lower-priorityAdd `Hold` payment state per bLIP-51 specby Elias Rohrer · 36e11982 · Mar 18, 2026 · 3 filesMessage 78 · AdequateInformational 19Details
Commit message · Elias Rohrer

Add `Hold` payment state per bLIP-51 spec

The bLIP-51 specification defines a `HOLD` intermediate payment state:
- `EXPECT_PAYMENT` -> `HOLD` -> `PAID` (success path)
- `EXPECT_PAYMENT` -> `REFUNDED` (failure before payment)
- `HOLD` -> `REFUNDED` (failure after payment received)

This commit adds the `Hold` variant to `LSPS1PaymentState` and updates
the state machine transitions:

- `payment_received()` now sets payment state to `Hold` (not `Paid`)
- `channel_opened()` transitions payment state from `Hold` to `Paid`
- Tests updated to verify the correct state at each transition

This allows LSPs to properly communicate when a payment has been
received but the channel has not yet been opened (e.g., Lightning
HTLC held, or on-chain tx detected but channel funding not published).

Co-Authored-By: HAL 9000

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

This commit adds a new 'Hold' payment state to the LSPS1 (Lightning Service Provider Specification 1) implementation in rust-lightning. Previously, when a customer paid for a channel, the system immediately marked it as 'Paid' even though the channel had not been opened yet. The new 'Hold' state correctly reflects that the payment has been received but the channel opening is still pending. This is a protocol/specification compliance change that improves state accuracy and reduces the chance of misleading status reporting, but it does not fix a memory-safety bug or an active exploit.

AI review queuedDrop unused `LSPS1OnchainPayment` typeby Elias Rohrer · 029ad804 · Mar 18, 2026 · 1 fileMessage 35 · OpaqueInformational 15Details
Commit message · Elias Rohrer

Drop unused `LSPS1OnchainPayment` type

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 simply removes an unused data structure called LSPS1OnchainPayment from the rust-lightning codebase. There is no functional code change, no bug fix, and no security impact. It is a routine cleanup that deletes 12 lines of dead code.

Lower-priorityDrop `lsps1_service` cfg flagby Elias Rohrer · 23223851 · Mar 18, 2026 · 12 filesMessage 50 · ThinInformational 18Details
Commit message · Elias Rohrer

Drop `lsps1_service` cfg flag

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

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Informational 18/100

This commit removes a Rust compile-time feature flag named `lsps1_service` from the `lightning-liquidity` crate. Previously, LSPS1 server-side code was only included when that flag was set. Now it is always compiled in. This is a build and API cleanup change, not a security fix. There is no indication in the commit or supplied references that this addresses a vulnerability.

Lower-priorityAdd some checks on provided payment detailsby Elias Rohrer · 8304ebef · Mar 18, 2026 · 4 filesMessage 68 · AdequateLow 36Details
Commit message · Elias Rohrer

Add some checks on provided payment details

As per spec, we check that the user provides at least one payment detail
*and* that they don't provide onchain payment details if
`refund_onchain_address` is unset.

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

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

This commit adds validation checks in the LSPS1 (liquidity service) code to make sure a service provider cannot accidentally offer on-chain Bitcoin refunds when the customer never gave a refund address. It also requires at least one payment method and ensures each payment method starts in the correct initial state. The change is defensive: it prevents protocol non-compliance and reduces the risk of funds being sent to an unknown address if a channel opening fails.

Lower-priorityAdd test case asserting `LSPS1ServiceState` is persisted across restartsby Elias Rohrer · b7b2f7ef · Mar 18, 2026 · 1 fileMessage 60 · AdequateInformational 12Details
Commit message · Elias Rohrer

Add test case asserting `LSPS1ServiceState` is persisted across restarts

Co-authored by Claude AI

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

This commit adds a new automated test to verify that an LSPS1 service's order state survives a node restart. It does not change production code; it only adds a test case. There is no indication of a security bug being fixed or introduced.

Lower-priorityDon't hold write lock in `LSPS{1,2}ServiceHandler::peer_disconnected`by Elias Rohrer · d210b889 · Mar 18, 2026 · 2 filesMessage 50 · ThinLow 29Details
Commit message · Elias Rohrer

Don't hold write lock in `LSPS{1,2}ServiceHandler::peer_disconnected`

.. as there's no need to do so.

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

This commit changes two peer-disconnection handlers in the lightning-liquidity crate so they take a read lock instead of a write lock on shared peer state. The stated reason is simply that a write lock is unnecessary. The change reduces lock contention and may prevent a potential performance or liveness issue, but the diff alone does not show a concrete security vulnerability being fixed.

AI review queuedFix clippy lintsby Elias Rohrer · ed9a8672 · Mar 18, 2026 · 1 fileMessage 28 · OpaqueInformational 15Details
Commit message · Elias Rohrer

Fix clippy lints

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 is a routine code cleanup that fixes style warnings reported by the Clippy linter. It replaces three uses of `format!("static string")` with the equivalent `"static string".to_string()`. There is no functional change, no bug fix, and no security relevance.

Lower-priorityAdd `invalid_token_provided` API methodby Elias Rohrer · f043b2e1 · Mar 18, 2026 · 5 filesMessage 66 · AdequateInformational 18Details
Commit message · Elias Rohrer

Add `invalid_token_provided` API method

We add a method that allows the LSP to signal to the client the token
they used was invalid.

We use the `102` error code as proposed in
https://github.com/lightning/blips/pull/68.

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

66/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI analysis · Informational 18/100

This commit adds a new API method called invalid_token_provided to the LSPS1 (Liquidity Service Provider Specification 1) service handler in rust-lightning. It lets a Lightning Service Provider (LSP) tell a client that the token they used to request a channel is invalid or stale, using error code 102 as proposed in a community draft. The change also removes an unused token field from the service configuration struct. There is no direct security vulnerability here; it is a protocol/API improvement that makes error handling clearer and removes dead configuration.

Lower-priorityAdd test case for `invalid_token_provided` flowby Elias Rohrer · be5c2c1a · Mar 18, 2026 · 1 fileMessage 70 · AdequateInformational 15Details
Commit message · Elias Rohrer

Add test case for `invalid_token_provided` flow

We test the just-added API.

Co-authored by Claude AI

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

This commit only adds a new automated test for an existing feature. It does not change any production code, fix a bug, or introduce new behavior. There is no security issue here.

Lower-priorityRead persisted LSPS1ServiceHandler state on startupby Elias Rohrer · 58faa5e2 · Mar 18, 2026 · 5 filesMessage 65 · AdequateLow 34Details
Commit message · Elias Rohrer

Read persisted LSPS1ServiceHandler state on startup

.. we read the persisted state in `LiquidityManager::new`

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

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 34/100

This commit fixes a startup bug in the Lightning Dev Kit's liquidity service module. Previously, the LSPS1 service handler was created with an empty set of peer states, ignoring any previously saved data. Now it reads saved peer state from the key-value store during startup, matching how LSPS2 and LSPS5 already worked. This is a reliability/consistency fix rather than an active security vulnerability, but ignoring persisted state could previously lead to duplicate orders, lost channel state, or protocol confusion after a restart.

Lower-priorityImplement `LSPS1ServiceHandler` persistence and state pruningby Elias Rohrer · d33a701f · Mar 18, 2026 · 5 filesMessage 73 · AdequateLow 29Details
Commit message · Elias Rohrer

Implement `LSPS1ServiceHandler` persistence and state pruning

We follow the model already employed in LSPS2/LSPS5 and implement
state pruning and persistence for `LSPS1ServiceHandler` 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 · Low 29/100

This commit adds the ability for an LSPS1 (a Lightning service protocol) server to save its per-peer state to disk and to clean up old, expired state. It mirrors the persistence and pruning patterns already used for LSPS2/LSPS5. The change is defensive: it reduces the risk of losing order state across restarts and limits unbounded state growth. There is no direct evidence in the commit of a security vulnerability being fixed; it is a reliability and operational-hygiene improvement.

Lower-priorityAdd serialization logic for LSPS1 `PeerState` typesby Elias Rohrer · 38775f7c · Mar 18, 2026 · 3 filesMessage 65 · AdequateInformational 17Details
Commit message · Elias Rohrer

Add serialization logic for LSPS1 `PeerState` types

We add the serializations for all types that will be persisted as part
of the `PeerState`.

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 17/100

This commit adds code to save and load LSPS1 peer state data to disk. It is a routine feature addition for persistence. There is no direct evidence in the commit that it fixes a security vulnerability; it is more likely a correctness/robustness improvement for a new feature.

Lower-priority`LSPS1ServiceHandler`: Use `TimeProvider` when creating new ordersby Elias Rohrer · 5db2fcc2 · Mar 18, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · Elias Rohrer

`LSPS1ServiceHandler`: Use `TimeProvider` when creating new orders

Since we by now have the `TimeProvider` trait, we might as well use it
in `LSPS1ServiceHandler` instead of requiring the user to provide a
`created_at` manually.

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 is a routine internal refactoring of the Lightning Dev Kit's LSPS1 service handler. It replaces a manual user-provided timestamp parameter with an internal TimeProvider trait, so the code automatically fills in the creation time when a new order is created. There is no security bug being fixed here; it is purely a cleaner API design change.

Lower-priorityActually remember the order state in `ChannelOrder`by Elias Rohrer · eb21bfd4 · Mar 18, 2026 · 2 filesMessage 65 · AdequateLow 26Details
Commit message · Elias Rohrer

Actually remember the order state in `ChannelOrder`

We here remember and update the order state and channel details in
`ChannelOrder`

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 26/100

This commit fixes a bookkeeping bug in the LSPS1 (liquidity service) module. Previously, when a service updated an order's status (e.g., paid, channel opened), it did not actually store the new state or channel details in its internal record. The response was sent with the new state, but the internal `ChannelOrder` was left stale. This could cause the service to report inconsistent order information later, for example when a client later queries the order. The patch now stores and updates the order state and channel details correctly.

Lower-priorityUse `PeerState::{register,remove}_request` instead of map accessby Elias Rohrer · 15130047 · Mar 18, 2026 · 2 filesMessage 77 · AdequateLow 25Details
Commit message · Elias Rohrer

Use `PeerState::{register,remove}_request` instead of map access

We introduce two new methods on `PeerState` to avoid direct access to
the internal `pending_requests` map.

77/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Explains rationale or failure mode
AI analysis · Low 25/100

This commit refactors how LSPS1 (a liquidity service protocol) tracks pending requests. Previously, code directly inserted or removed entries from an internal map. Now it uses two controlled methods that check for duplicate request IDs and unknown request IDs, returning clear errors instead of silently overwriting or missing entries. This is a defensive hardening change that reduces the chance of request-state confusion, but the commit itself does not claim to fix a specific exploitable vulnerability.