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 46 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-prioritySwitch to ldk-fuzzing-corpus repo rather than CI cacheby Matt Corallo · efa95b49 · May 4, 2026 · 2 filesMessage 73 · AdequateInformational 14Details
Commit message · Matt Corallo

Switch to ldk-fuzzing-corpus repo rather than CI cache

Rather than storing our fuzzing corpus in the CI cache, move it to
a new repo which anyone can use for their own local fuzzing and
can be updated outside of CI with additional seeds.

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
fuzzing or regression evidencedocumentation-only discount
AI analysis · Informational 14/100

This change only moves the project's fuzzing test data from a GitHub Actions cache into a separate public repository. It updates CI scripts to clone that repository, copy files into place, and open pull requests with any newly discovered fuzz inputs. There is no change to the actual Lightning Dev Kit code that users run, and nothing in the diff suggests a security vulnerability or fix.

Lower-priorityFix typo in `_encode_tlv` leading to confused encodingby Matt Corallo · 05135aec · May 1, 2026 · 1 fileMessage 50 · ThinModerate 61Details
Commit message · Matt Corallo

Fix typo in `_encode_tlv` leading to confused encoding

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

This commit fixes a small but meaningful typo in a Rust macro used to encode Lightning protocol data. The misplaced parenthesis could cause the macro to match the wrong pattern when encoding optional fields that use a custom encoding. That could lead to messages being serialized incorrectly, which in a Lightning node might cause peers to reject messages, fail to parse state, or potentially behave in unexpected ways during channel operations. The fix is one character moving a closing parenthesis.

Lower-priority`as_ref()` before wrapping encoded types in writing `option` TLVsby Matt Corallo · 8b1c7710 · Apr 30, 2026 · 4 filesMessage 73 · AdequateLow 35Details
Commit message · Matt Corallo

`as_ref()` before wrapping encoded types in writing `option` TLVs

We almost certainly don't want to be moving `option` TLVs during
serialization, and while we had logic elsewhere to work around this
previously its nice not to have to in the future.

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

This commit changes how optional data fields are serialized in Lightning Dev Kit. Previously, the code could move (consume) values when wrapping them for encoding. Now it borrows them via `.as_ref()` first. The change is framed as a cleanup to avoid future bugs, but the prior workaround suggests there was a real risk of incorrect serialization or use-after-move behavior. There is no direct evidence of an exploitable vulnerability in the diff itself.

Lower-priorityCheck fuzz workspace formatting in CIby Joost Jager · 2294480e · Apr 30, 2026 · 2 filesMessage 78 · AdequateInformational 15Details
Commit message · Joost Jager

Check fuzz workspace formatting in CI

Extend the rustfmt CI job to check the fuzz workspace.

This covers fuzz alongside the root workspace and lightning-tests.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidence
AI analysis · Informational 15/100

This commit only adds a code-formatting check for the fuzz testing workspace in the project's continuous integration (CI). It also reformats a few lines in one fuzz test file to satisfy the new check. There is no functional code change and no security impact.

Security candidateSkip pre-splice announcement_signatures on reestablishby Jeffrey Czyz · 21fed17c · Apr 28, 2026 · 2 filesMessage 88 · StrongModerate 57Details
Commit message · Jeffrey Czyz

Skip pre-splice announcement_signatures on reestablish

When a splice transaction confirms on both sides while peers are
disconnected, each peer's `channel_reestablish` carries
`my_current_funding_locked` with the splice txid. In the reestablish
handler, `get_announcement_sigs` was called before the inferred
`splice_locked` was processed and the splice was promoted, so
`self.funding` still pointed to the pre-splice scope. If
`announcement_sigs_state` was `NotSent`, the generated
`announcement_signatures` carried the pre-splice `short_channel_id`
and bitcoin key — which the peer (having already promoted via its own
inferred `splice_locked`) would verify against the post-splice
`UnsignedChannelAnnouncement`, failing the signature check and
force-closing.

Skip the pre-promotion call when `my_current_funding_locked` matches
the splice we've already confirmed — i.e. `pending_splice.sent_funding_txid`
is set and equals the peer's locked txid. `maybe_promote_splice_funding`
emits correct post-splice signatures after the inferred `splice_locked`
is processed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Moderate 57/100

This commit fixes a bug in the Lightning Dev Kit where reconnecting after a channel 'splice' (a funding update) could cause one peer to send outdated channel announcement signatures. The peer receiving those stale signatures would reject them and force-close the channel. The fix skips generating announcement signatures until the splice has been promoted to the new funding, so both sides agree on the current channel state.

Security candidateIgnore stale announcement_signatures instead of force-closingby Jeffrey Czyz · 80528b15 · Apr 28, 2026 · 2 filesMessage 86 · StrongModerate 62Details
Commit message · Jeffrey Czyz

Ignore stale announcement_signatures instead of force-closing

A peer may transmit `announcement_signatures` signed over a stale
`short_channel_id` — most plausibly a retransmission or a peer
implementation whose view hasn't caught up to our post-splice
promotion. Verifying such sigs against the current
`UnsignedChannelAnnouncement` (built from `self.funding`) always fails
the hash check, which previously produced a force-close.

BOLT #7 does not require closing in this situation; the mismatch is
expected across splice handoffs. Short-circuit with
`ChannelError::Ignore` when `msg.short_channel_id` doesn't match the
current funding's scid, leaving the genuine invalid-signature paths
in place for sigs that actually target our current scid.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Moderate 62/100

This change fixes a bug where a Lightning node would unnecessarily force-close a payment channel if its peer sent an outdated 'announcement_signatures' message referencing the old channel identifier after a splice (a channel funding update). The node now simply ignores these stale messages, keeping the channel open. The bug was not a direct theft of funds, but it could cause unwanted channel closures and disruption.

Lower-priorityModel RBF splice tx replacement in chanmon_consistencyby Jeffrey Czyz · e82d36e4 · Apr 24, 2026 · 1 fileMessage 73 · AdequateInformational 17Details
Commit message · Jeffrey Czyz

Model RBF splice tx replacement in chanmon_consistency

The SplicePending event handler was immediately confirming splice
transactions, which caused force-closes when RBF splice replacements
were also confirmed for the same channel. Since both transactions spend
the same funding UTXO, only one can exist on a real chain.

Model this properly by adding a mempool-like pending pool to ChainState.
Splice transactions are added to the pool instead of being confirmed
immediately. At chain-sync time, pending transactions are sorted by
txid and confirmed together in one block; candidates that double-spend
an already-confirmed outpoint or another candidate earlier in the sort
are dropped.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

This commit fixes a bug in a fuzzing test harness, not in the production Lightning Dev Kit code. The test was incorrectly treating splice transactions as confirmed immediately, which could cause simulated force-closes when multiple RBF (fee-bump) replacements existed. The fix adds a fake mempool so the test models real Bitcoin behavior: only one transaction spending the same funding output can be confirmed. End users running real Lightning nodes are not directly affected.

Security candidateRename `BestBlock` to `BlockLocator`by Matt Corallo · dcba68d2 · Apr 24, 2026 · 22 filesMessage 58 · ThinInformational 20Details
Commit message · Matt Corallo

Rename `BestBlock` to `BlockLocator`

`BestBlock` is now really a pointer to a block rather than just a
block itself, so its weird to still call it `BestBlock`. Here we
rename it to `BlockLocator`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
boot or update path
AI analysis · Informational 20/100

This commit is a straightforward rename of the Rust type `BestBlock` to `BlockLocator` across the rust-lightning codebase. The struct's fields, serialization format, and behavior are unchanged; only identifiers, comments, and documentation are updated to reflect that the value now also carries recent ancestor block hashes (a 'block locator') rather than just a single best block. There is no security-relevant code change.

Lower-priorityUse `bitreq::Url` for LSPS5 webhook URLsby Elias Rohrer · 5237c9a9 · Apr 24, 2026 · 4 filesMessage 68 · AdequateLow 35Details
Commit message · Elias Rohrer

Use `bitreq::Url` for LSPS5 webhook URLs

Replace the custom LSPS5 URL parser with `bitreq::Url` while keeping the
LSPS5-specific HTTPS and length checks. This reduces bespoke parsing
logic and aligns accepted webhook URLs with the HTTP client's URL
handling.

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

This commit swaps a custom-built URL parser for a well-known library (bitreq::Url) when handling LSPS5 webhook URLs. The goal is to reduce home-grown parsing bugs and make accepted URLs match what the HTTP client actually understands. It keeps the rule that only HTTPS URLs are allowed and still enforces a length limit elsewhere. The change is a hardening/refactoring move rather than a fix for a known active vulnerability, though it could close gaps between the old parser and the real HTTP client.

Lower-priorityHandle DiscardFunding with FundingInfo::Tx variant in chanmon_consistencyby Jeffrey Czyz · 64c5182b · Apr 23, 2026 · 1 fileMessage 73 · AdequateInformational 16Details
Commit message · Jeffrey Czyz

Handle DiscardFunding with FundingInfo::Tx variant in chanmon_consistency

The process_events! macro only handled DiscardFunding events with
FundingInfo::Contribution, but splice RBF replacements can produce
DiscardFunding with FundingInfo::Tx when the original splice transaction
is discarded.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

This is a small fix to a fuzz-testing harness (a tool that automatically feeds random inputs to software to find crashes). The change teaches the test harness to recognize one more type of internal event, `DiscardFunding` carrying a full transaction, so the harness does not panic and abort the fuzzing run. It is not a fix in the production Lightning protocol code itself, and there is no indication it can be exploited by an attacker on a real network.

Security candidateClear disconnect timer when exiting quiescenceby Jeffrey Czyz · d2f422bf · Apr 23, 2026 · 2 filesMessage 68 · AdequateLow 44Details
Commit message · Jeffrey Czyz

Clear disconnect timer when exiting quiescence

Several code paths exit quiescence by calling `clear_quiescent()` directly
without also clearing the disconnect timer via `mark_response_received()`.
This causes the timer to fire after the splice completes or is aborted,
spuriously disconnecting the peer.

Replace `clear_quiescent()` with `exit_quiescence()` in
`on_tx_signatures_exchange`, `reset_pending_splice_state`, and
`peer_connected_get_handshake`, which clears both the quiescent state and
the disconnect timer.

Co-Authored-By: Claude Opus 4.6 (1M context) <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 44/100

This commit fixes a bug in the Lightning Dev Kit where a timer meant to disconnect unresponsive peers could fire by mistake after a splice operation completed, was aborted, or after reconnecting. The fix makes sure the timer is cleared whenever the protocol leaves its 'quiet' (quiescent) state, preventing unnecessary peer disconnections.

Lower-priorityReturn InteractiveTxMsgError from splice_init and tx_init_rbfby Jeffrey Czyz · 98ec3e48 · Apr 23, 2026 · 3 filesMessage 73 · AdequateLow 33Details
Commit message · Jeffrey Czyz

Return InteractiveTxMsgError from splice_init and tx_init_rbf

The prior two commits manually intercepted ChannelError::Abort in the
channelmanager handlers for splice_init and tx_init_rbf to exit
quiescence before returning, since the channel methods didn't signal
this themselves. The interactive TX message handlers already solved this
by returning InteractiveTxMsgError which bundles exited_quiescence into
the error type.

Apply the same pattern: change splice_init and tx_init_rbf to return
InteractiveTxMsgError, adding a quiescent_negotiation_err helper on
FundedChannel that exits quiescence for Abort errors and passes through
other variants unchanged. Extract handle_interactive_tx_msg_err in
channelmanager to deduplicate the error handling across internal_tx_msg,
internal_splice_init, internal_tx_init_rbf, and internal_tx_complete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

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

This commit is a code-quality and correctness refactor for the Lightning Dev Kit's handling of splicing and RBF (fee-bump) negotiations. It makes error handling more consistent so that when a channel negotiation fails, the channel properly exits 'quiescence' (a paused state used during splicing) instead of getting stuck. The commit also adds tests confirming that misbehaving peers who send splice or RBF messages before quiescence are established receive a warning and are disconnected. There is no direct evidence this fixes an active exploit, but it removes a class of state-consistency bugs that could lead to stuck channels or incorrect behavior.

Lower-priorityRemove exited_quiescence from error handlingby Jeffrey Czyz · c9292488 · Apr 23, 2026 · 2 filesMessage 68 · AdequateLow 28Details
Commit message · Jeffrey Czyz

Remove exited_quiescence from error handling

The `exited_quiescence` field on `MsgHandleErrInternal` and
`InteractiveTxMsgError` is a leaky abstraction -- the channelmanager
error handling shouldn't know about quiescence, only whether the holding
cell needs to be released.

Infer this from the presence of a `tx_abort` instead, since exiting
quiescence via an error always produces one. Remove `exited_quiescence`
from `InteractiveTxMsgError`, `MsgHandleErrInternal`, and the return
type of `Channel::tx_abort`, along with the `with_exited_quiescence`
builder.

For unfunded v2 channels, `tx_abort` may be present without quiescence
having been exited, but the holding cell release is a no-op since an
unfunded channel won't have any HTLCs. Similarly, the unreachable
`debug_assert!(false)` branch in `fail_interactive_tx_negotiation` for
funded channels produces a `tx_abort` without exiting quiescence, but
the holding cell release is a no-op since the channel is still quiescent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

This commit is a code-cleanup refactor in a Lightning network library. It removes a redundant flag called `exited_quiescence` and instead decides whether to release queued payments by checking whether a `tx_abort` message was produced. The change is described by the authors as fixing a 'leaky abstraction' where error-handling code knew too much about channel quiescence. It is not a security patch for an exploitable vulnerability, but it touches logic that controls when HTLCs (payments) held during channel quiescence are released, so a bug here could theoretically affect payment liveness or state consistency.

Lower-priorityExit quiescence when tx_init_rbf is rejected with Abortby Jeffrey Czyz · adf87326 · Apr 23, 2026 · 3 filesMessage 95 · StrongModerate 60Details
Commit message · Jeffrey Czyz

Exit quiescence when tx_init_rbf is rejected with Abort

When tx_init_rbf is rejected with ChannelError::Abort (e.g.,
insufficient RBF feerate, negotiation in progress, feerate too high),
the error is converted to a tx_abort message but quiescence is never
exited and holding cells are never freed. This leaves the channel stuck
in a quiescent state.

Fix this by intercepting ChannelError::Abort before try_channel_entry!
in internal_tx_init_rbf, calling exit_quiescence on the channel, and
returning the error with exited_quiescence set so that handle_error
frees holding cells. Also make exit_quiescence available in non-test
builds by removing its cfg gate.

Update tests to use the proper RBF initiation flow (with tampered
feerates) so that handle_tx_abort correctly echoes the abort and exits
quiescence, rather than manually crafting tx_init_rbf messages that
leave node 0 without proper negotiation state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
AI analysis · Moderate 60/100

This commit fixes a bug in the Lightning Dev Kit where a channel could get stuck in a 'quiet' state after a fee-bump (RBF) attempt is rejected. Normally, when an RBF request is rejected, the channel should resume normal operation and release any held payments. The bug left the channel frozen, which could delay or block payments. The fix ensures the channel exits the quiet state and frees held payments when an RBF rejection occurs.

Lower-priorityExit quiescence when splice_init is rejected with Abortby Jeffrey Czyz · bd5b04dc · Apr 23, 2026 · 2 filesMessage 73 · AdequateModerate 53Details
Commit message · Jeffrey Czyz

Exit quiescence when splice_init is rejected with Abort

The same bug fixed in the prior commit for tx_init_rbf also exists in
internal_splice_init: when splice_init triggers FeeRateTooHigh in
resolve_queued_contribution, the ChannelError::Abort goes through
try_channel_entry! without exiting quiescence.

Apply the same fix: intercept ChannelError::Abort before
try_channel_entry!, call exit_quiescence, and return the error with
exited_quiescence set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

This commit fixes a state-handling bug in the Lightning Dev Kit's splicing feature. When a splice attempt is rejected because the proposed transaction fee rate is too high, the code now properly exits 'quiescence' (a temporary pause in normal channel activity) before returning the error. Previously, the channel could remain stuck in quiescence, which might disrupt normal channel operation and message flow.

Lower-priorityAdd FilesystemStoreV2Error for v1 data detectionby benthecarman · 61125214 · Apr 21, 2026 · 1 fileMessage 68 · AdequateInformational 19Details
Commit message · benthecarman

Add FilesystemStoreV2Error for v1 data detection

FilesystemStoreV2::new previously returned io::Error with
ErrorKind::InvalidData when the data directory contained top-level
files left behind by FilesystemStore (v1). That forced us to
match on an error that could potentially be given by our normal io
calls. This adds a dedicated FilesystemStoreV2Error enum with a
V1DataDetected(PathBuf) so we can distinguish between normal io
errors and an old V1 fs store.

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

This commit is a code-quality improvement, not a security fix. It changes how a new version of a file-storage component reports that it has found leftover data from the older version. Previously it returned a generic I/O error; now it returns a dedicated, clearly typed error so callers can tell the two situations apart. No vulnerability is patched and no exploit is prevented.

Lower-priorityReplace FundingTemplate contribution methods with FundingBuilderby Wilmer Paulino · 9f9fe58b · Apr 20, 2026 · 2 filesMessage 73 · AdequateLow 27Details
Commit message · Wilmer Paulino

Replace FundingTemplate contribution methods with FundingBuilder

This results in a slight change of behavior: now these methods reuse and
amend the prior contribution, as opposed to always starting from a fresh
contribution, which would be the desired expected behavior by users.

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

This commit refactors how users build funding contributions for Lightning channel splicing and RBF (fee-bumping). It replaces several convenience methods with a builder-style API and changes the behavior so that, when a prior splice request exists, new calls amend (add to) the prior request instead of silently replacing it. The commit also removes the ability to start an RBF attempt when there is no prior contribution, and adds tests showing that prior contributions can be amended. There is no explicit security bug in the diff, but the behavioral change could affect how wallets construct splice transactions and could, if callers misunderstand the new semantics, lead to unintended transaction shapes or fee handling.

Lower-priorityIntroduce FundingBuilder for splice requestsby Wilmer Paulino · b1c3e29a · Apr 20, 2026 · 2 filesMessage 68 · AdequateLow 32Details
Commit message · Wilmer Paulino

Introduce FundingBuilder for splice requests

This lets callers easily amend a prior contribution in place and only
re-run coin selection when the new request cannot be satisfied with the
existing inputs.

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

This commit refactors how Bitcoin Lightning channel 'splice' funding requests are built. It introduces a FundingBuilder API that lets callers amend an earlier contribution (for example, changing the amount or adding a withdrawal output) without re-running wallet coin selection when the existing inputs can still cover the new request. The change also moves prevtx-size validation into the builder and adds explicit error variants for missing coin-selection sources and oversized previous transactions. There is no direct evidence in the commit or supplied references that this fixes a known security vulnerability; it reads as a feature/refactoring change with defensive hardening.

Lower-priorityDisallow net-negative contributions when adding valueby Wilmer Paulino · 58f226e1 · Apr 20, 2026 · 3 filesMessage 73 · AdequateModerate 59Details
Commit message · Wilmer Paulino

Disallow net-negative contributions when adding value

When a user requests to add value via coin-selected inputs, we should
strive to fulfill their request. Allowing them to remove value from the
channel is undesired as it goes against their request. While we still
allow adding outputs to enabled mixed contributions, their funds must
now always come from the set of coin-selected inputs, and must never
draw from the channel balance resulting in a smaller added value.

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

This commit fixes a logic bug in Lightning channel 'splicing'—a way to add or remove funds from an existing channel. Previously, when a user tried to add funds to a channel while also requesting some money be sent elsewhere, the software could silently reduce the channel balance instead of increasing it. The change now ensures that when wallet inputs are provided to add value, the added value truly goes into the channel and any side payments come only from those wallet inputs, not from the existing channel funds.

Lower-priorityFix chanmon_consistency for real hashesby Joost Jager · c26f3c72 · Apr 15, 2026 · 1 fileMessage 68 · AdequateInformational 14Details
Commit message · Joost Jager

Fix chanmon_consistency for real hashes

Store real payment preimages in `chanmon_consistency` and use
them when claiming funds, so the real-hashes runner does not
treat `payment_hash` bytes as a stand-in preimage.

AI tools were used in preparing this commit.

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

This change fixes a fuzz-testing harness so it generates and stores real payment preimages instead of reusing payment hash bytes as fake preimages. It only affects internal test code, not the production Lightning library, so it has no direct security impact on real users.

Security candidateSplit fuzz runners by hash modeby Joost Jager · bfc7c7bb · Apr 15, 2026 · 88 filesMessage 78 · AdequateInformational 15Details
Commit message · Joost Jager

Split fuzz runners by hash mode

Move shared fuzz logic into the root fuzz crate and generate
fake-hashes and real-hashes runner crates.

Keep `chanmon_consistency_target` on the real-hashes side, remove
the fuzz-local Cargo config, and update scripts, CI, coverage,
and docs to use explicit flags for each runner.

Generate the hash-mode compile checks in the wrapper bins
without a synthetic Cargo feature, while keeping the wrapper
template close to its original shape.

AI tools were used in preparing this commit.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidenceseed or entropy pathsigning or wallet pathboot or update pathauthentication pathparser or protocol path
AI analysis · Informational 15/100

This commit is a build-system and test-infrastructure refactor for the project's fuzzing (automated randomized testing) harness. It splits fuzz test runners into two groups based on whether they use fake or real cryptographic hashes, moves shared code into a common crate, and updates CI scripts, coverage tooling, and documentation accordingly. There is no change to the actual Lightning protocol library or to how production nodes behave, and no security vulnerability is introduced or fixed.

Lower-priorityDerive FundingContribution::net_value implicitlyby Wilmer Paulino · 11610af9 · Apr 15, 2026 · 3 filesMessage 58 · ThinLow 32Details
Commit message · Wilmer Paulino

Derive FundingContribution::net_value implicitly

This commit removes `FundingContribution::value_added` as tracking it is
unnecessary -- it can just be derived from the total amount in minus
total amount out minus fees.

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

This commit refactors how a Lightning channel funding contribution calculates the amount being added to or removed from a channel. Instead of storing a separate 'value_added' field, the code now derives it from the inputs, outputs, change, and fees. The change removes an explicit input-sufficiency check and rewrites fee-buffer logic. It appears to be a code-cleanup and correctness refactor rather than a clear security fix, but it alters validation boundaries around fees and change in splicing transactions.

Lower-priorityMake PriorContribution::holder_balance non-optionalby Wilmer Paulino · 41a2baac · Apr 15, 2026 · 2 filesMessage 85 · StrongLow 29Details
Commit message · Wilmer Paulino

Make PriorContribution::holder_balance non-optional

The `holder_balance` is computed by
`FundedChannel::get_holder_counterparty_balances_floor_incl_fee`, which
may unexpectedly fail due to the balance either being too high or too
low. These cases are highly unlikely to happen given we have validation
to ensure we never enter such a state to begin with. If they were to
happen, something has gone wrong with the channel and it doesn't make
sense to allow splicing anyway. Therefore, we opt to make
`PriorContribution::holder_balance` non-optional and return an error
that the channel cannot be spliced at the moment.

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

This commit tightens error handling during Bitcoin Lightning channel splicing. Previously, if the software could not compute the user's current channel balance, it would silently skip a fee-rate optimization and re-run coin selection. Now it treats that balance-computation failure as a hard error and refuses to splice. This prevents the code from proceeding with potentially incorrect fee calculations when the channel is in an unexpected state, but it is a defensive hardening change rather than a fix for a known exploitable bug.

Lower-priorityUse floor division for the spec's 25/24 RBF feerate ruleby Jeffrey Czyz · 154f06bd · Apr 15, 2026 · 2 filesMessage 73 · AdequateLow 49Details
Commit message · Jeffrey Czyz

Use floor division for the spec's 25/24 RBF feerate rule

The spec says the 25/24 multiplicative feerate is "rounded down", but
min_rbf_feerate used ceiling division. This made the computed minimum 1
sat/kwu too high when prev * 25 is not evenly divisible by 24, which
could reject valid counterparty feerates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

This commit fixes a tiny but real arithmetic bug in how Lightning splicing/RBF transactions decide the minimum acceptable fee rate. The code was using ceiling division (rounding up) when the Lightning specification says to round down. That made the minimum fee 1 satoshi per kiloweight-unit too high in some cases, which could cause a node to wrongly reject a counterparty's valid fee-bump attempt. The fix changes one division operation from 'round up' to 'round down' and updates the related tests.

Lower-priorityEnforce minimum RBF feerate from counterpartyby Jeffrey Czyz · 85bfc146 · Apr 15, 2026 · 4 filesMessage 68 · AdequateModerate 60Details
Commit message · Jeffrey Czyz

Enforce minimum RBF feerate from counterparty

The spec's tx_init_rbf recipient requirements now mandate rejecting a
feerate below max(prev + 25 sat/kwu, ceil(prev * 25/24)), matching the
sender requirement. Previously we only enforced the 25/24 rule on
counterparties. Reuse the existing min_rbf_feerate function for both
our own and counterparty validation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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

This commit tightens the rules a Lightning node uses when a peer tries to speed up or replace a funding transaction (an RBF attempt). Previously, the node accepted any feerate that was at least 25/24 of the previous one, even if that increase was tiny in absolute terms. The new code also requires the new feerate to be at least 25 sat/kwu higher than the previous one, matching what the protocol spec now says. This prevents a peer from getting a transaction stuck or delayed by bumping the fee by only a fraction when the absolute bump is too small to be relayed by the Bitcoin network.