LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

252security candidates228second-pass queue1525AI analyses
82commits · 30 days
182commits · 60 days
554commits · 180 days
1256commits · 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.

70/100 average clarity
474Strong · 80–100
836Adequate · 60–79
295Thin · 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.
Elias Rohrer15315153667
Matt Corallo43553371574
Jeffrey Czyz19545182169
Wilmer Paulino15945155169
Leo Nash11613116162
Valentine Wallace14511138169
Vincenzo Palazzo11311183
Joost Jager16224162069
elnosh391333058
auto-pr-bot2478087
shaavan22622069
Carla Kirk-Cohen78366068
Analysis record

Published AI watches

Last scanned 47 minutes ago

Moderate 55 AI analysisMessage 76 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Persistent `MonitorEvent`s' (#4491)

This commit makes on-chain 'MonitorEvent' notifications durable and replay-safe. Previously, if a node crashed after a ChannelMonitor persisted a block update but before the ChannelManager processed the resulting event, the event could be …

Durability/atomicity fix for async persistence: prevents lost MonitorEvents across crashesNew ack-based event lifecycle with random event IDsArchival gating on unacknowledged events to avoid losing preimage/timeout information
9a324e72by wpaulino+467−45912 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Fix payment attribution edge cases and simplify claiming' (#5021)

This commit refactors how LDK nodes claim incoming Lightning payments. It replaces a separate 'claim with known custom TLVs' method with an options struct passed to the normal claim call, and fixes two edge cases in payment attribution dat…

API change: claim_funds now takes ClaimFundsOptions, consolidating TLV-known behavior into one pathFailure-packet length bound added to prevent oversized onion error messagesIncoming failure packet truncated at 32 KiB before processing
ee7c61c2by Matt Corallo+256−17322 files
No security note in commit
Low 47 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'release utxos from failed splices' (#4973)

This change fixes a wallet bookkeeping problem in rust-lightning's built-in coin-selection wrappers. Previously, when a splice attempt failed or coin selection errored after picking UTXOs, those UTXOs stayed marked as 'reserved' in memory …

Resource exhaustion / denial-of-service via permanent in-memory UTXO reservationIncorrect state tracking in coin-selection wrapperNew API method required for correct lifecycle management (release_utxos)
7220a6fdby jkczyz+295−383 files
No security note in commit
Low 49 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Restore `Wallet` UTXO locks when coin selection fails afterwards

This commit fixes a bug in the wallet's coin-selection code. When the wallet picked UTXOs to spend, it locked them immediately so they couldn't be reused. But if a later step—fetching the change address or the previous transaction—failed, …

Resource lock leak on error pathUTXO lock state inconsistency between selection and confirmationDenial-of-service/funds-unavailability risk from persistent UTXO locks
81afd9caby elnosh+146−331 file
No security note in commit
Informational 19 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'tx-sync: Parallelize esplora status queries' (#4913)

This commit rewrites how a Lightning wallet talks to Esplora block-explorer servers so that many status checks happen in parallel instead of one at a time. It is a performance/refactoring change. There is no direct evidence in the commit t…

Concurrency/timing change in transaction confirmation logicNew inconsistency check preserved when a previously-confirmed tx is reported unconfirmedAdded defensive error path for missing pre-fetched block status
c303f515by Matt Corallo+140−371 file
No security note in commit
Low 30 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Skip Electrum creator transaction downloads' (#4992)

This change stops the Electrum-based transaction sync client from downloading the very transaction that created an output it is watching. Previously, the client could request that transaction from Electrum, even though a transaction can ne…

Avoids unnecessary Electrum transaction.get requests for watched outputsReduces information disclosure to Electrum server about watched outpointsAdds regression test verifying request suppression
c36e50cbby Matt Corallo+142−02 files
No security note in commit
Low 44 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Use preferred sPK of watched txn in electrum, not rand ones' (#4867)

This change improves how the Lightning Dev Kit's Electrum and Esplora transaction-sync clients track watched Bitcoin transactions. Previously, the code ignored the script pubkey (the 'address' associated with a transaction) supplied when r…

Previously ignored `script_pubkey` argument in `register_tx` for transaction watchersElectrum script-history queries previously used an arbitrary transaction output, which could be OP_RETURN and therefore unindexed by some Electrum serversNew logic prefers caller-supplied script pubkey and falls back to non-OP_RETURN outputs
bfe5ca89by tnull+52−243 files
No security note in commit
Low 33 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Serialize transient Event variants; move persist decision into ChannelManager' (#4791)

This commit changes how LDK stores pending event notifications. It adds serialization support for several event types that previously were not fully saved to disk, and introduces a helper method so the code can decide which events are wort…

Data-loss prevention: previously non-round-trippable event variants are now fully serialized, avoiding accidental event loss when users serialize Event queues themselvesState-consistency hardening: ChannelManager now explicitly skips events that describe non-surviving restart state, preventing replay of stale eventsDefensive assertion: debug builds assert that every persisted event round-trips to Some(event), catching serialization mismatches
a0d4632eby Matt Corallo+694−818 files
No security note in commit
Informational 15 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Document that funding signing events can go stale' (#4960)

This commit only adds documentation comments to two source files. It explains that certain funding-signing events can become stale if the underlying negotiation fails, and that callers may see specific harmless errors as a result. No code …

26eecf2dby Matt Corallo+15−02 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Add `Wallet::release_utxos` to free UTXOs from abandoned transactions

This commit fixes a design flaw in LDK's built-in wallet helper where coins selected for a splice-in (or other unclaimed funding) were permanently reserved in memory if the transaction was abandoned. Over repeated failed splices, all spend…

Denial-of-service via UTXO exhaustion from repeated failed splice negotiationsRisk of inability to broadcast fee-bumping/claim transactions due to lack of available UTXOsNew API surface (release_utxos) introduced to mitigate resource leak
52ab13fdby elnosh+148−43 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop the honggfuzz version pin from the CI fuzz job

This commit removes a fixed-version pin for the honggfuzz fuzzing tool in a continuous-integration script. The project now uses the current release of honggfuzz instead of an older pinned version. There is no change to the actual Lightning…

4a1635efby auto-pr-bot+1−51 file
No security note in commit
Informational 15 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Run the CI fuzz job on the stable toolchain

This commit changes the Rust toolchain used in the continuous integration (CI) fuzzing job from a fixed older version (1.75) to the latest stable release. It is purely a build/test infrastructure change to fix a dependency compatibility is…

21c4ed2bby auto-pr-bot+3−32 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Expose the dummy-hop tail constructor publicly

This commit makes a previously internal helper function public so that outside developers can build dummy-hop tails for blinded payment paths without recreating the logic themselves. It is an API usability change, not a fix for a known sec…

No security-relevant behavior change in the diffAPI visibility broadened from crate-public to publicCLTV expiry overflow check already present and unchanged
c5443353by auto-pr-bot+14−71 file
No security note in commit
Moderate 54 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Fail commitment sig verification without counterparty params

This change adds a safety check in a Bitcoin Lightning Network library (LDK). Previously, if the software tried to verify a peer's commitment signature before it had learned the peer's channel parameters, it could crash with a panic. Now i…

Defensive check added on peer-driven code path to prevent panicMissing counterparty_parameters could previously cause panic during commitment transaction constructionChannel closure returned instead of panic
de7ecc2fby auto-pr-bot+24−01 file
Vendor flagged security relevance
Informational 15 AI analysisMessage 100 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Clarify the commitment validation failure message

This commit only changes the wording of an error message sent to peers when a commitment transaction fails validation. It replaces the vague phrase 'Failed to validate our commitment' with the clearer 'Received commitment failed validation…

3284a006by auto-pr-bot+11−114 files
No security note in commit
Moderate 61 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Move holder commit sig checks to `InMemorySigner`' (#4885)

This commit moves the checks that validate a counterparty's signatures on the holder's commitment and HTLC transactions out of the general channel code and into the signer module (InMemorySigner). Previously, these signature checks were do…

Moved signature validation from channel state machine into signer moduleAdded new tests that corrupt signatures and verify rejectionChanged error message from 'Invalid commitment tx signature from peer' / 'Invalid funding_created signature from peer' to 'Failed to validate our commitment'
83f5ba55by Matt Corallo+626−31024 files
No security note in commit
Low 42 AI analysisMessage 86 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'Drop stale splice signature on disconnect' (#4954)

This change fixes a Lightning channel splicing bug: when two peers temporarily disconnect during a splice, any half-finished signature the other side already sent is now discarded. Before the fix, that stale signature could be reused after…

State-invalidation bug in multi-step protocol (splice negotiation)Stale cryptographic signature not cleared on disconnectPotential reuse of old commitment state after reconnect
c9a77251by Matt Corallo+22−12 files
No security note in commit
Moderate 58 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Drop stale splice signature on disconnect

This fix prevents a Lightning channel from being accidentally force-closed. During a splice (a way to resize a payment channel), one side's initial signature could be kept in memory after the peers disconnected. If the peers later reconnec…

State inconsistency: in-memory buffered message not cleared on disconnectDuplicate message processing after reconnectionForce-close consequence for active Lightning channel
71405b4bby Wilmer Paulino+22−12 files
Vendor flagged security relevance
Informational 20 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice' (#4942)

This commit is a simple rename of a public function from `matches_invoice_signing_pubkey` to `key_can_sign_invoice`, plus matching updates to its documentation, callers, tests, and changelog. No behavior changed. It is not a security fix.

a476cf92by Matt Corallo+13−133 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

offers: rename matches_invoice_signing_pubkey to key_can_sign_invoice

This commit is a simple rename of a function and its documentation from matches_invoice_signing_pubkey to key_can_sign_invoice. No logic, behavior, or security properties changed. It is a follow-up code-review naming cleanup.

388187caby Vincenzo Palazzo+13−133 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-priorityDrop unnecessary `Arc`s around `KVStoreWrapper`by Matt Corallo · 603f9018 · Sep 24, 2025 · 4 filesMessage 45 · ThinInformational 15Details
Commit message · Matt Corallo

Drop unnecessary `Arc`s around `KVStoreWrapper`

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

This commit is a routine internal cleanup: it removes unnecessary Arc (reference-counting pointer) wrappers around a KVStoreSyncWrapper type and adds a Clone derive so the wrapper can still be duplicated when needed. There is no user-visible behavior change, no bug fix, and no security relevance in the diff itself.

Lower-priorityDrop unnecessary Arcs in Sweeper and LiquidityManager sync wrappersby Matt Corallo · f53c5e9f · Sep 24, 2025 · 3 filesMessage 83 · StrongInformational 15Details
Commit message · Matt Corallo

Drop unnecessary Arcs in Sweeper and LiquidityManager sync wrappers

Both `OutputSweeperSync` and `LiquidityManagerSync` added `Arc`s to
their internal state to allow returning a reference to that
internal state in testing. While this is required to get a
forever-lifetime reference to that state, we don't actually need
that in testing.

Instead, we turn off the borrow checker in the
`lightning-background-processor` async tests where required,
avoiding the extra heap indirection.

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 internal code cleanup. It removes unnecessary Arc (reference-counted pointer) wrappers around internal objects in two sync-wrapper types, replacing them with direct ownership. To keep existing tests compiling, the tests use a small unsafe block to create a static reference. There is no user-facing behavior change and no security fix.

Lower-priorityDrop unnecessary 'static bounds on BP async methodsby Matt Corallo · d665bef3 · Sep 24, 2025 · 1 fileMessage 73 · AdequateInformational 15Details
Commit message · Matt Corallo

Drop unnecessary 'static bounds on BP async methods

Given the future returned from async BP methods will be concrete on
whatever types get used, there's not much reason to require that
the arguments be `'static`, we can let Rust figure out if they're
`'static` (and thus the returned future is `'static`).

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

This commit relaxes Rust lifetime requirements ('static bounds) on generic arguments in two background-processor async functions. It is a code-quality and API-ergonomics change: it makes the functions easier to call with non-static data, but does not change runtime behavior, fix a crash, or address a security vulnerability.

Lower-priorityInvoice server: treat forwarded invreqs as OM forwardsby Valentine Wallace · 2460c465 · Sep 24, 2025 · 5 filesMessage 73 · AdequateModerate 62Details
Commit message · Valentine Wallace

Invoice server: treat forwarded invreqs as OM forwards

Previously, when a static invoice server forwarded an invoice request to an
often-offline recipient, they would treat the outbound message like any other
outbound onion message initiated by their own node. That means they would
buffer the onion message internally in the onion messenger and generate a
ConnectionNeeded event if the next-hop node was offline.

Buffering the onion message in this case poses a DoS risk for the invoice
server node, since they do not control the quantity of invoice requests they
receive on behalf of often-offline recipients. Instead, we should treat these
forwarded invoice requests like any other onion message that needs to be
forwarded -- if the next-hop node is offline, either drop the message or
generate an OnionMessageIntercepted event for it (pushing the DoS management
onto the handler of the interception event).

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

This change fixes a denial-of-service (DoS) risk in the Lightning Dev Kit's 'static invoice server' feature. Previously, when an invoice server forwarded a request to an often-offline recipient, it would internally buffer those messages and try to connect to the offline node, which could pile up and overwhelm the server. Now these forwarded requests are handled like normal onion message forwards: if the next hop is offline, the message is either dropped or handed off to the user via an interception event, pushing the DoS management burden onto the user instead of the server node.

Lower-priorityExtract util to forward onion messagesby Valentine Wallace · 912f3c21 · Sep 24, 2025 · 2 filesMessage 68 · AdequateInformational 18Details
Commit message · Valentine Wallace

Extract util to forward onion messages

In an upcoming commit, we will need to repurpose this logic when, as a static
invoice server node, we update our support for forwarding invoice requests from
payers to often-offline recipients. We currently treat these forwarded invreqs
as outbound onion messages that are initiated by our node, when they should
really be treated as forwarded onion messages.

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

This commit is a code cleanup: it pulls out the logic for forwarding onion messages into a reusable helper function. The behavior is essentially unchanged, except log messages now include the original sender's node ID for better debugging. There is no indication this fixes or introduces a security vulnerability.

Lower-priorityConstruct outbound OMs before enqueueing themby Valentine Wallace · 332b3e59 · Sep 24, 2025 · 1 fileMessage 68 · AdequateInformational 12Details
Commit message · Valentine Wallace

Construct outbound OMs before enqueueing them

Makes the next commit cleaner when we add support for forwarding onion messages
within send_onion_message_internal. Also rename enqueue_onion_message to
specify that it is used for outbound onion messages.

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

This commit is a straightforward internal code reorganization in the onion messaging module. It moves the construction of outbound onion messages to happen before they are placed in a send queue, and renames a helper function to clarify it handles outbound traffic. There is no indication of a security fix or behavior change.

Lower-priorityMention `user_channel_id` uniqueness in `invoice_params_generated` docsby Elias Rohrer · 454f0e62 · Sep 24, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Elias Rohrer

Mention `user_channel_id` uniqueness in `invoice_params_generated` docs

We update the docs of `invoice_params_generated` and mention that
`user_channel_id` needs to be unique value.

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

This commit only changes documentation comments in a Rust source file. It adds a note reminding developers that a user-supplied identifier (user_channel_id) must be unique and that channel creation should be idempotent based on it. No code behavior was changed, so there is no direct security vulnerability or fix in the commit itself.

Lower-priorityAdd test asserting LSPS2 service state is persisted across restartsby Elias Rohrer · 2983178c · Sep 24, 2025 · 2 filesMessage 83 · StrongInformational 15Details
Commit message · Elias Rohrer

Add test asserting LSPS2 service state is persisted across restarts

We add a simple test that runs the LSPS2 flow, persists, and ensures we
recover the service state after reinitializing from our `KVStore`.

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 a new automated test to verify that LSPS2 service state survives a restart when stored in a key-value store. It does not change production code behavior, fix a bug, or introduce any security-relevant change. There is no indication of a vulnerability or security issue in the commit itself.

Lower-priorityLog `PublicKey`s as `Display`, not `Debug`by Elias Rohrer · adc8a876 · Sep 24, 2025 · 7 filesMessage 45 · ThinInformational 19Details
Commit message · Elias Rohrer

Log `PublicKey`s as `Display`, not `Debug`

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

This commit changes how public keys appear in log and error messages. Previously they were logged using Rust's Debug format, which prints raw byte arrays. Now they use the Display format, which prints the standard readable string form of a public key. This is a code-quality and readability improvement; it does not fix a security vulnerability and does not change program behavior beyond log formatting.

Lower-prioritySkip `LSPS5ServiceHandler` persistence if unnecessaryby Elias Rohrer · 86523057 · Sep 24, 2025 · 1 fileMessage 65 · AdequateInformational 19Details
Commit message · Elias Rohrer

Skip `LSPS5ServiceHandler` persistence if unnecessary

.. we only persist the service handler if necessary.

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

This commit is a performance and robustness improvement for the LSPS5 service handler in rust-lightning. It adds a 'needs_persist' flag so that peer state is only written to disk when something has actually changed, rather than on every persistence call. It also handles the case where a peer's state has already been dropped, returning success instead of an error. There is no direct evidence in the commit or supplied references that this fixes an active security vulnerability.

Lower-priorityAdd test asserting LSPS5 service state is persisted across restartsby Elias Rohrer · 52aa2864 · Sep 24, 2025 · 1 fileMessage 83 · StrongInformational 14Details
Commit message · Elias Rohrer

Add test asserting LSPS5 service state is persisted across restarts

We add a simple test that runs the LSPS5 flow, persists, and ensures we
recover the service state after reinitializing from our `KVStore`.

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

This commit only adds a new automated test to the project. It checks that a service's webhook registration state survives a restart when using a persistent key-value store. There are no changes to production code, no bug fixes, and no security-related behavior changes.

Lower-priorityRemove pruned LSPS2/LSPS5 peer state entries from the `KVStore`by Elias Rohrer · f70a9021 · Sep 24, 2025 · 3 filesMessage 73 · AdequateLow 35Details
Commit message · Elias Rohrer

Remove pruned LSPS2/LSPS5 peer state entries from the `KVStore`

Previously, we'd persist peer states to the `KVStore`, but, while we
pruned them eventually from our in-memory state, we wouldn't remove it
from the `KVStore`.

Here, we change this and regularly prune and delete peer state entries
from the `KVStore`.
Note we still prune the state-internal data on peer disconnection, but
leave removal to our (BP-driven) async `persist` calls.

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

This change fixes a cleanup bug in a Lightning liquidity service. Previously, when peer state was pruned from memory, the corresponding saved data was left behind in the persistent key-value store. Over time this could accumulate stale entries and potentially allow old or expired peer data to be reloaded after a restart. The patch now deletes those stale store entries during regular persistence cycles.

Lower-priorityAdd inline persistence with async `LSPS2ServiceHandler` API methodsby Elias Rohrer · a72bbeec · Sep 24, 2025 · 1 fileMessage 65 · AdequateLow 32Details
Commit message · Elias Rohrer

Add inline persistence with async `LSPS2ServiceHandler` API methods

.. and wrap them accordingly for the `LSPS2ServiceHandlerSync` variant.

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

This commit changes several LSPS2 (a Lightning service protocol) API methods from synchronous to asynchronous so they can save peer state to disk inline, right when state changes. It also adds synchronous wrapper methods that immediately poll the new async versions. The change is a reliability improvement: it makes sure state is persisted before returning, reducing the chance of losing track of a payment or channel if the program crashes. There is no direct evidence in the commit that this fixes a security vulnerability, but inconsistent persistence can lead to loss-of-funds or state-confusion bugs in Lightning nodes.

Lower-priorityRead persisted LSPS2 service state in `LiquidityManager::new`by Elias Rohrer · 651d4df9 · Sep 24, 2025 · 6 filesMessage 65 · AdequateLow 30Details
Commit message · Elias Rohrer

Read persisted LSPS2 service state in `LiquidityManager::new`

We read any previously-persisted state upon construction of
`LiquidityManager`.

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

This commit changes how the Lightning Dev Kit liquidity manager starts up: it now reads previously saved LSPS2 service state from disk when created. Previously, the manager started with empty in-memory state even if data had been saved, which could cause it to lose track of active liquidity requests and routing information after a restart. The change also makes the constructors return errors if the saved data is corrupt or inconsistent, rather than silently starting fresh. This is a reliability and data-integrity improvement, not a typical remote-exploitable vulnerability.

Lower-priorityAdd `EventQueue` persistenceby Elias Rohrer · 88a3cf5b · Sep 24, 2025 · 16 filesMessage 50 · ThinLow 34Details
Commit message · Elias Rohrer

Add `EventQueue` persistence

We add simple `persist` call to `EventQueue` that persists it under a
`event_queue` key.

50/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides an explanatory body
AI analysis · Low 34/100

This commit adds the ability to save (persist) the LiquidityManager's event queue to disk so events survive application restarts. It is a feature commit, not a security patch. Most event types are explicitly documented as not persisted, while LSPS2 'OpenChannel' and LSPS5 'SendWebhookNotification' events are now saved and replayed after restart. The code includes safety notes warning callers to make their channel-opening logic idempotent because persisted events may be replayed.

Lower-priorityAdd `LSPS2ServiceHandler` persistenceby Elias Rohrer · bf6d4084 · Sep 24, 2025 · 4 filesMessage 58 · ThinInformational 24Details
Commit message · Elias Rohrer

Add `LSPS2ServiceHandler` persistence

We add simple `persist` call to `LSPS2ServiceHandler` that sequentially
persist all the peer states under a key that encodes their node id.

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

This commit adds a new save-to-disk feature for the LSPS2 service handler in the Lightning Dev Kit's liquidity module. It makes the handler remember peer state across restarts by writing it to a key-value store. There is no direct security bug visible in the diff, but the change introduces new code paths that handle locks, serialization, and storage, and it removes the kv_store field from the top-level LiquidityManager in favor of embedding it inside the handler. A small typo in a doc comment was also introduced.

Lower-priorityAdd `LSPS5ServiceHandler` persistenceby Elias Rohrer · d0760a29 · Sep 24, 2025 · 3 filesMessage 58 · ThinInformational 19Details
Commit message · Elias Rohrer

Add `LSPS5ServiceHandler` persistence

We add simple `persist` call to `LSPS5ServiceHandler` that sequentially
persist all the peer states under a key that encodes their node id.

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

This commit adds a save-to-disk feature for a new Lightning service protocol (LSPS5) so that webhook registration state is not lost when the program restarts. It is a routine reliability improvement, not a security fix, and does not change any access controls or cryptographic behavior.

Lower-priorityRead persisted LSPS5 service state in `LiquidityManager::new`by Elias Rohrer · aceb3c1f · Sep 24, 2025 · 3 filesMessage 65 · AdequateLow 25Details
Commit message · Elias Rohrer

Read persisted LSPS5 service state in `LiquidityManager::new`

We read any previously-persisted state upon construction of
`LiquidityManager`.

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

This commit fixes a bug where the LSPS5 service (a liquidity service feature) was not reloading previously saved peer state when the LiquidityManager was restarted. Previously, after a restart, any stored webhook or peer settings could be forgotten, potentially causing service inconsistencies. Now the code reads saved state from disk during startup, similar to how LSPS2 state was already being handled.

Lower-priorityRead persisted event queue state in `LiquidityManager::new`by Elias Rohrer · 6a01d75d · Sep 24, 2025 · 6 filesMessage 65 · AdequateLow 31Details
Commit message · Elias Rohrer

Read persisted event queue state in `LiquidityManager::new`

We read any previously-persisted state upon construction of
`LiquidityManager`.

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

This commit fixes a bug where the LiquidityManager would start with an empty event queue after a restart, even if important events had been saved to disk before shutdown. Now it reads the saved queue when it starts up, so no events are lost. This is a reliability/correctness fix rather than a typical security vulnerability.

Lower-priorityHave background processor task drive `LiquidityManger` persistenceby Elias Rohrer · 5fb21bdf · Sep 24, 2025 · 6 filesMessage 73 · AdequateLow 27Details
Commit message · Elias Rohrer

Have background processor task drive `LiquidityManger` persistence

We let the background processor task regularly call
`LiquidityManger::persist`. We also change the semantics of the `Future`
for waking the background processor to also be used when we need
repersisting (which we'll do in the next commit).

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

This commit changes how the background processor saves the LiquidityManager's state to disk. Previously, the LiquidityManager's persistence was not driven by the regular background task, which could lead to state not being saved promptly. The patch adds a new background persistence call and changes the wake-up signal so it also fires when the LiquidityManager needs to be repersisted. This is a reliability improvement that reduces the risk of losing or getting inconsistent LiquidityManager state after a crash or restart.

Lower-prioritySkip `EventQueue` persistence if unnecessaryby Elias Rohrer · 179420c0 · Sep 24, 2025 · 4 filesMessage 60 · AdequateInformational 17Details
Commit message · Elias Rohrer

Skip `EventQueue` persistence if unnecessary

.. we only persist the event queue if necessary and wake the BP to do so
when something changes.

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

This change is a performance and reliability optimization, not a security fix. It teaches the liquidity service's event queue to skip writing to disk when nothing has changed, and to wake the background persister only when a save is actually needed. Previously, the queue may have been persisted repeatedly even when unchanged. The patch also ensures that if a persistence write fails, the system marks the queue as needing to be saved again so it won't lose data.

Lower-prioritySkip `LSPS2ServiceHandler` persistence if unnecessaryby Elias Rohrer · 631d3f01 · Sep 24, 2025 · 1 fileMessage 65 · AdequateInformational 20Details
Commit message · Elias Rohrer

Skip `LSPS2ServiceHandler` persistence if unnecessary

.. we only persist the service handler if necessary.

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

This commit is a performance and reliability optimization for the LSPS2 (Lightning Service Provider Specification 2) service handler in rust-lightning. It adds a flag so the code only writes peer state to disk when something has actually changed, instead of writing it every time. If a write fails, it marks the state as needing to be saved again later. There is no direct security vulnerability being fixed here; it is mainly about avoiding unnecessary disk writes and making sure failed writes are retried.

Lower-priorityAdd `LSPS2ServiceHandlerSync` wrapperby Elias Rohrer · 01a94e68 · Sep 24, 2025 · 2 filesMessage 50 · ThinInformational 18Details
Commit message · Elias Rohrer

Add `LSPS2ServiceHandlerSync` wrapper

.. to allow access in a non-async context

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

This commit adds a thin synchronous wrapper around an existing asynchronous LSPS2 service handler in the Lightning Dev Kit's liquidity module. It does not change any security logic, cryptography, or network behavior; it only exposes the same methods in a non-async API style. There is no indication this fixes or introduces a vulnerability.

Lower-priorityImplement serialization for LSPS2 state typesby Elias Rohrer · 53ebf780 · Sep 24, 2025 · 5 filesMessage 45 · ThinInformational 15Details
Commit message · Elias Rohrer

Implement serialization for LSPS2 state types

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

This commit adds data-saving (serialization) support for internal LSPS2 state types in the lightning-liquidity crate. It does not change network behavior, fix a bug, or alter security checks. It is a routine feature addition that enables these objects to be written to disk or restored later.

Lower-priorityLet `LiquidityManager` take a `KVStore` and add `Sync` wrapperby Elias Rohrer · 0f4db0da · Sep 24, 2025 · 7 filesMessage 85 · StrongInformational 15Details
Commit message · Elias Rohrer

Let `LiquidityManager` take a `KVStore` and add `Sync` wrapper

We add `KVStore` to `LiquidityManager`, which will be used in the next
commits. We also add a `LiquidityManagerSync` wrapper that wraps a the
`LiquidityManager` interface which will soon become async due to usage
of the async `KVStore`.

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

This commit is a routine internal refactor for the rust-lightning project. It adds a key-value store parameter to the LiquidityManager component and introduces a synchronous wrapper (LiquidityManagerSync) so existing code can keep using the manager while the underlying implementation becomes asynchronous. There is no indication of a security fix or vulnerability being addressed.