LDK
← All projectsLightning Dev Kit

rust-lightning

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

BitcoinCryptographic librariesLightning NetworkNormal
Repository coverage

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

249security candidates223second-pass queue1517AI analyses
88commits · 30 days
195commits · 60 days
565commits · 180 days
1307commits · 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
470Strong · 80–100
830Adequate · 60–79
293Thin · 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 Corallo43452370574
Jeffrey Czyz19545182169
Wilmer Paulino15945155169
Leo Nash11613116162
Valentine Wallace14010135169
Vincenzo Palazzo11311183
Joost Jager16224162069
elnosh371331057
auto-pr-bot2478087
shaavan22622069
Carla Kirk-Cohen78366068
Analysis record

Published AI watches

Last scanned 29 minutes ago

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
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
Informational 18 AI analysisMessage 81 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Merge PR 'offers: add Offer::permits_invoice_signed_by' (#4884)

This commit adds a new public helper method, Offer::matches_invoice_signed_by (later renamed matches_invoice_signing_pubkey), that lets callers check whether an invoice signing key belongs to the recipient named by a BOLT 12 offer. It also…

Refactors existing BOLT 12 invoice-signing-pubkey validation into a reusable helperAdds public API to bind an invoice signing key to an offer recipientAdds unit tests for issuer-id vs. path-last-hop matching behavior
016af8f9by Matt Corallo+81−135 files
No security note in commit
Low 29 AI analysisMessage 85 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Support retired TLV fields in object-constructing macros

This commit is a feature enhancement for LDK's internal serialization macros. It allows developers to mark old protocol fields as 'retired' (reserved but no longer used) in more places, so those type numbers cannot be accidentally reused. …

TLV type-number reservation mechanism extended to more macro-generated code pathsPrevents accidental reuse of retired protocol field type numbersAvoids UnknownRequiredFeature decode failures for obsolete even-type fields
6d7c2bdaby Jeffrey Czyz+120−222 files
No security note in commit
Informational 17 AI analysisMessage 91 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Replace splice failure wire tests with a 0.2 downgrade test

This commit is a test-only cleanup in the Lightning Dev Kit (LDK) Rust codebase. It removes low-level byte-level tests for splice failure events and replaces them with a single cross-version test that actually loads a 0.2 node with seriali…

Cross-version serialization compatibility test addedRemoval of byte-level tests that could not detect real 0.2 mismatchesNo production code changes
80f2b44fby auto-pr-bot+95−2663 files
No security note in commit
Low 28 AI analysisMessage 98 · Strong
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Document duplicate HTLC handling on revoked commitments

This commit only adds a code comment explaining an existing quirk: if a revoked old channel transaction contains two identical-looking payment forwards and the other side claims both, the software may only claim one upstream while letting …

Behavioral quirk in revoked-commitment HTLC resolution documentedDuplicate (payment_hash, amount) HTLCs can map to the same upstream sourcePotential missed upstream preimage claim on second identical HTLC
c5bd8b11by auto-pr-bot+19−01 file
Vendor flagged security relevance
Moderate 60 AI analysisMessage 73 · Adequate
LDK Lightning Dev Kitrust-lightning BitcoinCryptographic librariesLightning Network

Abort active splice RBF when prior candidate confirms

This commit fixes a state-handling bug in Lightning Dev Kit's splicing feature. When a user tries to speed up or replace a pending splice (an 'RBF' attempt) and the older splice transaction unexpectedly gets confirmed on-chain, the softwar…

State-conflict handling between confirmed splice candidate and active RBF negotiationStructured abort propagation through chain-event pathConditional abort based on holder signature progress to avoid unsafe cancellation
7587d2cdby Wilmer Paulino+623−424 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-priorityMatch renamed RBF-after-confirmation error in fuzz allow-listby auto-pr-bot · 5c5e21c4 · Aug 29, 2026 · 1 fileMessage 91 · StrongTriage 5Details
Commit message · auto-pr-bot

Match renamed RBF-after-confirmation error in fuzz allow-list

@matt said on the diff:

> @auto-pr-bot can you fix this? @wpaulino says it looks like it should be
> this string now -
> https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/src/branch/main/lightning/src/ln/channel.rs#L13405
> and was broken in 274d09f1f71cdd6f272a03760755d86f39b0e7aa.

@matt said on the diff:

> @auto-pr-bot try again - base your change on the main branch as it
> should be an issue on main as well.

@matt asked on the diff:

> @auto-pr-bot try again.

`assert_disconnect_action` panics on any disconnect warning whose text it
doesn't recognize, matching each permitted case by substring. One entry
still carries the wording used before "Disallow splice RBF after candidate
confirmation" reworded `can_initiate_rbf`'s error to "A negotiated splice
transaction has already confirmed, cannot RBF", so it can no longer match
the message it was meant to permit. That rename only touched `channel.rs`,
leaving nothing to tie it back to the fuzz-side copy of the string.

Use the current wording so the entry describes a warning the code can
actually produce.

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

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4937#issuecomment-443717

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
fuzzing or regression evidence
Lower-prioritySay "confirmed" where splice RBF docs meant chain inclusionby auto-pr-bot · 9027ae10 · Aug 28, 2026 · 4 filesMessage 81 · StrongTriage 0Details
Commit message · auto-pr-bot

Say "confirmed" where splice RBF docs meant chain inclusion

A splice candidate stops being replaceable at its first confirmation,
while "locked" refers to the `splice_locked` exchange that promotes a
candidate to the channel's funding. Several docs described RBF
eligibility as lasting until the splice is "locked", which now reads as
allowing an RBF during the window between confirmation and promotion.

Reserve "locked" for the `splice_locked` markers and use "confirmed" for
chain inclusion. Wording about a queued contribution that genuinely waits
for the pending candidate to lock (and be promoted) is left as is.

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

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4936#issuecomment-443322

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Lower-priorityMerge PR 'Fix silent merge conflict' (#4938)by Matt Corallo · fb8c8f9f · Aug 27, 2026 · 1 fileMessage 76 · AdequateTriage 0Details
Commit message · Matt Corallo

Merge PR 'Fix silent merge conflict' (#4938)

from 2026-08-merge-conflict into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4938
Reviewed-by: wpaulino <wpaulino@noreply.git.rust-bitcoin.org>

76/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-priorityFix silent merge conflictby Matt Corallo · 0dfe4c37 · Aug 27, 2026 · 1 fileMessage 60 · AdequateTriage 0Details
Commit message · Matt Corallo

Fix silent merge conflict

We had a silent merge conflict between some new splice tests and a
change to the splice events API.

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides an explanatory body✓ Mentions testing or verification
Lower-priorityMerge PR 'resource manager implementation' (#4409)by Matt Corallo · 544faef3 · Aug 27, 2026 · 6 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'resource manager implementation' (#4409)

from elnosh/resource-mgr into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4409
Reviewed-by: carlakc <carlakc@noreply.git.rust-bitcoin.org>
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-priorityMerge PR 'Disallow/abort splice RBF after splice candidate initial confirmation' (#4926)by Matt Corallo · e0303263 · Aug 27, 2026 · 6 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Disallow/abort splice RBF after splice candidate initial confirmation' (#4926)

from discard-ongoing-negotiation-on-splice-locked into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4926
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
AI review queuedSupport retired TLV fields in object-constructing macrosby Jeffrey Czyz · 6d7c2bda · Aug 26, 2026 · 2 filesMessage 85 · StrongLow 29Details
Commit message · Jeffrey Czyz

Support retired TLV fields in object-constructing macros

The retired field type was initially limited to manual
`write_tlv_fields!`/`read_tlv_fields!`-style implementations because the
macros which construct the deserialized object (`impl_ser_tlv_based!`,
the enum macros, and `impl_writeable_msg!`) emit a struct literal or
match pattern naming every field, and a retired field has no backing
struct field to name.

Extend the `lightning-macros` filters that already drop `legacy` fields
from those positions to also drop `retired` fields, and route
`impl_writeable_msg!`'s constructed literal through the same filter,
which it previously bypassed. This lets any TLV field list mark a
retired type number rather than falling back to a manual implementation
just to reserve one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Low 29/100

This commit is a feature enhancement for LDK's internal serialization macros. It allows developers to mark old protocol fields as 'retired' (reserved but no longer used) in more places, so those type numbers cannot be accidentally reused. The change itself is not a security bug fix; it is infrastructure that makes it easier to safely reserve obsolete TLV type numbers. There is no direct exploit here, but it helps prevent future protocol-versioning mistakes.

Lower-priorityFold queued splice failures into on_restart_splice_failuresby auto-pr-bot · dedd918c · Aug 26, 2026 · 2 filesMessage 81 · StrongTriage 0Details
Commit message · auto-pr-bot

Fold queued splice failures into on_restart_splice_failures

The reload path in `ChannelManager::write` had to know that a splice can
be dropped by a restart in two independent ways - an unpersisted funding
negotiation and a contribution queued waiting on quiescence - and chain
the two channel accessors itself. Collect both in a single channel
method instead, mirroring `maybe_fail_splice_negotiation` on the
force-close path, and name it after when the failures are surfaced
rather than after either individual source.

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

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4918#issuecomment-442777

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Lower-priorityMerge PR 'Fail queued splice contributions on reload and force-close' (#4918)by Matt Corallo · 2a72541e · Aug 26, 2026 · 4 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Fail queued splice contributions on reload and force-close' (#4918)

from 2026-08-quiescent-action-persistence into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4918
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Security candidateReplace splice failure wire tests with a 0.2 downgrade testby auto-pr-bot · 80f2b44f · Aug 26, 2026 · 3 filesMessage 91 · StrongInformational 17Details
Commit message · auto-pr-bot

Replace splice failure wire tests with a 0.2 downgrade test

@matt said:

> Feel free to squash.

@jkczyz said:

> Squashed

@matt asked:

> This is at least straightforward now. There's a lot of tests checking
> low-level serialization which I don't really buy as a way to test the
> 0.2 deserialization logic - if we want to test the 0.2 deserialization
> logic we need to actually use the 0.2 deserialization logic, not a copy
> of it using 0.3 types. Gonna go ahead and land this since the code is
> right and we need to get it over the line, but @auto-pr-bot can you
> replace the tests in events/mod.rs with tests in `lightning-tests` that
> use the 0.2 code to check the events? There's already some tests that do
> this in the PR so check that you're not duplicating coverage first.

@matt asked on the diff:

> I don't see the point of any of these tests. They feel like tests for
> tests sake rather than actually testing something meaningful.
> @auto-pr-bot

@matt asked on the diff:

> Same here. If we want to test upgrade/downgrade semantics the correct
> way is a `lightning-tests` multi-version test, not a test that checks
> the "wire" encoding of an `Event`.
>
> @auto-pr-bot

@matt asked on the diff:

> Yes, this is implied by the lack of implementation lol there's no need
> to document this @auto-pr-bot.

The `events` tests removed here built an `Event` by hand, wrote it, and
asserted on the bytes, or read bytes assembled to look like something
0.2 would have written. Either way they only ever exercised current
code's reader and writer, so they could not have caught a mismatch with
what 0.2 actually does -- the thing the encoding changes were about.
Checking that requires running 0.2's serialization, which is what
`lightning-tests` is for.

The reloads there already cover a splice failure releasing its whole
contribution, both for a negotiation aborted in flight and for one still
queued on quiescence, along with the `DiscardFunding` event type 0.2 has
to skip. What none of them cover is a contribution which reuses inputs
or outputs already committed to a pending splice: that is refused with
only the parts unique to it released, and those are what a downgraded
0.2 node has to learn about via `SpliceFailed`, since the
`DiscardFunding` carrying them is written under an event type it
ignores. Add a reload of a manager written with such a partial failure
pending, asserting 0.2 surfaces exactly the released output.

`FundingContribution::new_for_test` existed only to build contributions
for the removed tests, so it goes with them, as does the
`FailedSpliceContribution` note about having no serialization of its
own -- that is implied by the lack of any `Writeable`/`Readable`
implementation, so it tells callers nothing they need.

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

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4920#issuecomment-442672
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4920#issuecomment-442657
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4920#issuecomment-442658
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4920#issuecomment-442669

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
update trust
AI analysis · Informational 17/100

This commit is a test-only cleanup in the Lightning Dev Kit (LDK) Rust codebase. It removes low-level byte-level tests for splice failure events and replaces them with a single cross-version test that actually loads a 0.2 node with serialized state from current code. There is no change to production logic, no fix for an active vulnerability, and no new attack surface. The work is defensive testing to ensure future serialization changes stay compatible with older LDK versions.

Lower-priorityMerge PR 'Fix cross-version serialization of splice failure events' (#4920)by Matt Corallo · 56d7e35b · Aug 26, 2026 · 8 filesMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Fix cross-version serialization of splice failure events' (#4920)

from 2026-08-splice-event-tlv-compat into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4920
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-priorityMerge PR 'Document duplicate HTLC handling on revoked commitments' (#4927)by Matt Corallo · df02ee07 · Aug 25, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Document duplicate HTLC handling on revoked commitments' (#4927)

from bot/4904-claim-both-sides-of-a-duplicate-263584 into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4927
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Security candidateDocument duplicate HTLC handling on revoked commitmentsby auto-pr-bot · c5bd8b11 · Aug 25, 2026 · 1 fileMessage 98 · StrongLow 28Details
Commit message · auto-pr-bot

Document duplicate HTLC handling on revoked commitments

@matt said:

> Bitcoin red team flagged that if there's two HTLCs with identical
> `(payment_hash, amount)`s on a channel and the counterparty broadcasts a
> revoked commitment tx and then claims both we will only propagate the
> claim backwards on one of the two. This is, of course, not a
> "vulnerability" because we'll still get our money by taking our
> counterparty's funds via the revocation path, but it might be nice to
> claim both HTLCs cause, why not, free money.
>
> @auto-pr-bot can you do this? try to keep the code change small and
> contained, if its too big I'll respond in review and we'll switch to
> just leaving a comment instead.

@matt said:

> @auto-pr-bot try again.

@matt asked:

> Turned out to be way too much code. @auto-pr-bot can you instead just
> add a comment?

HTLC outputs on a revoked counterparty commitment transaction don't come
with an `HTLCSource`, so when one is spent we search the counterparty's
non-revoked commitment transactions for an HTLC with a matching
direction, payment hash and value. If a channel had two HTLCs which
share both a payment hash and a value, spends of either output match the
same first source.

Thus, if the counterparty claims both outputs with the preimage, we
propagate only one fulfillment upstream and fail the second upstream
HTLC, even though each matching upstream HTLC is independently claimable
once we have the preimage. Because the counterparty broadcasted a
revoked commitment we still recover the channel balance via the
revocation path, so this doesn't leave us out of pocket, but it does
give up an upstream claim we were entitled to.

Resolving the outputs against distinct sources means resolving every
matching source when a spend reveals a preimage and deterministically
matching duplicate outputs to sources otherwise, which is more than the
lookup here can do. Describe the behavior in a comment instead so the
next reader doesn't have to rediscover it.

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

Fixes #4904

Requested-by: @matt
Link: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/issues/4904#issuecomment-442538

98/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
explicit security language
AI analysis · Low 28/100

This commit only adds a code comment explaining an existing quirk: if a revoked old channel transaction contains two identical-looking payment forwards and the other side claims both, the software may only claim one upstream while letting the other fail. The commit itself does not change behavior, and the comment notes the user still recovers funds through the revocation penalty path, so no money is lost. It is a documentation-only change for a known, low-consequence edge case.

Lower-priorityMerge PR 'Redact ExpandedKey secret material from its Debug output' (#4900)by Matt Corallo · 568f5b06 · Aug 25, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Redact ExpandedKey secret material from its Debug output' (#4900)

from bot/4899-redact-expandedkey-secret-materi-f1613b into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4900
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Lower-priorityPrune expired HTLCs prior to holding cell release on aborted splice RBFby Wilmer Paulino · da8ae593 · Aug 25, 2026 · 3 filesMessage 85 · StrongTriage 0Details
Commit message · Wilmer Paulino

Prune expired HTLCs prior to holding cell release on aborted splice RBF

Aborting an RBF from `transactions_confirmed` can release outbound
holding-cell updates immediately. Unlike the best-block path, this
callback did not first remove HTLCs which had become too close to
expiry, so an unsafe HTLC could be sent after the confirmation which
ended quiescence.

Extract holding-cell expiry pruning into a channel helper and call it
from both best-block and transaction-confirmation processing. Use the
greater of the callback height and current best-block height for
out-of-order callbacks, fail expired HTLCs backward before releasing the
holding cell, and only perform that release after startup background
events have been processed. Otherwise channel reestablishment will
release it once the channel is live.

85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Security candidateAbort active splice RBF when prior candidate confirmsby Wilmer Paulino · 7587d2cd · Aug 25, 2026 · 4 filesMessage 73 · AdequateModerate 60Details
Commit message · Wilmer Paulino

Abort active splice RBF when prior candidate confirms

Rejecting new RBF attempts after confirmation does not cover an RBF
negotiation which began while the prior candidate was still unconfirmed.
When an earlier candidate confirms, inspect any active RBF and reset it
if is still safe and holder funding signatures have not been provided.
Propagate a structured abort through the chain-event path so
ChannelManager can notify a connected peer, fail any local contribution,
and release holding-cell updates. If signing has advanced too far,
retain the RBF until it completes, as splice promotion is blocked on its
completion.

Co-Authored-By: Codex <noreply@openai.com>

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

This commit fixes a state-handling bug in Lightning Dev Kit's splicing feature. When a user tries to speed up or replace a pending splice (an 'RBF' attempt) and the older splice transaction unexpectedly gets confirmed on-chain, the software could get stuck with two conflicting splice attempts active. The patch detects that situation, safely cancels the newer RBF attempt, tells the peer, returns any locked-up funds, and resumes normal channel operation. If signing has already progressed too far, it keeps the RBF alive until it finishes to avoid unsafe cancellation.

Lower-priorityDisallow splice RBF after candidate confirmationby Wilmer Paulino · 274d09f1 · Aug 25, 2026 · 5 filesMessage 68 · AdequateTriage 0Details
Commit message · Wilmer Paulino

Disallow splice RBF after candidate confirmation

A splice candidate becomes non-replaceable at its first confirmation,
before `splice_locked` send or receive markers are necessarily set.
Using those later markers to decide RBF eligibility can allow outbound,
inbound, or queued RBF attempts to target a transaction which has
already confirmed. It can also cause a fresh splice requested during
this window to reuse the confirmed candidate as an RBF base.

Detect confirmation directly from the negotiated candidates and use that
state for local RBF initiation, queued-contribution eligibility, and
inbound `tx_init_rbf` validation. Return a fresh template without
prior-contribution or minimum-RBF metadata after confirmation so a new
splice waits behind the confirmed candidate instead of trying to replace
it.

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Security candidateClear pending signer state when aborting splice RBFby Wilmer Paulino · cb81afaa · Aug 25, 2026 · 2 filesMessage 78 · AdequateLow 44Details
Commit message · Wilmer Paulino

Clear pending signer state when aborting splice RBF

If an asynchronous signer blocks the initial commitment signature for an
RBF, aborting the `AwaitingSignatures` negotiation discards its signing
session but previously left `signer_pending_funding` set. A later
`signer_unblocked` callback would then retry signing funding state which
no longer exists.

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
signing boundary
AI analysis · Low 44/100

This commit fixes a state-cleanup bug in Lightning Dev Kit's splice RBF (fee-bump) flow. When a user aborts a splice while waiting for an asynchronous hardware signer, the code now properly clears an internal 'signer still has pending funding work' flag. Before the fix, that flag could remain set, causing a later 'signer is ready' callback to try to continue signing a funding transaction that no longer exists. The patch is small and defensive; the main risk is a confused internal state leading to unexpected retries or errors, not direct theft of funds.

Security candidateIgnore messages from aborted splice negotiationsby Wilmer Paulino · 76791c85 · Aug 25, 2026 · 2 filesMessage 73 · AdequateLow 37Details
Commit message · Wilmer Paulino

Ignore messages from aborted splice negotiations

An aborted splice negotiation exits quiescence before the `tx_abort`
exchange has fully completed. An in-flight `interactive-tx` or
`commitment_signed` message for the discarded negotiation may therefore
arrive after the splice state has been removed, and treating them as
active-protocol violations can disconnect unnecessarily.

Ignore `interactive-tx` messages once the channel is no longer
quiescent, while retaining a warning disconnect for unexpected messages
received during quiescence. Check a single `commitment_signed` message's
funding txid before enforcing batch delivery so a signature for
discarded funding is ignored.

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 37/100

This patch fixes a bug where a Lightning node could unnecessarily disconnect from a peer after a splice negotiation was aborted. When both sides agree to stop a splice, some related messages can still be in flight. Previously, those late messages were treated as protocol violations and caused a disconnect. Now the node ignores the stale messages instead, keeping the channel open. There is no direct evidence this was exploitable to steal funds, but unnecessary disconnects can hurt reliability.

Security candidateDisconnect on overlapping splice RBF negotiationby Wilmer Paulino · d6e24380 · Aug 25, 2026 · 3 filesMessage 78 · AdequateLow 45Details
Commit message · Wilmer Paulino

Disconnect on overlapping splice RBF negotiation

An inbound `tx_init_rbf` cannot identify a separate negotiation while
another funding negotiation is active. Sending `tx_abort` would
ambiguously abort the active negotiation and exit quiescence while
retaining its protocol state.

Return `WarnAndDisconnect` instead, preserving an `AwaitingSignatures`
negotiation for resumption across the disconnect rather than treating
the duplicate request as an abort. Remove the now-unused
NegotiationInProgress abort reason and update the existing
simultaneous-RBF regression coverage accordingly.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundary
AI analysis · Low 45/100

This change fixes a protocol edge case in Lightning splicing where receiving a second overlapping RBF (fee-bump) request during an active funding negotiation could accidentally abort the wrong negotiation. Instead of sending tx_abort, which would ambiguously cancel the ongoing negotiation, the node now disconnects with a warning and keeps the existing negotiation state so it can resume after reconnecting. This prevents a remote peer from potentially disrupting an in-progress splice/RBF by sending a conflicting request.

Lower-priorityFix tx_abort delivery in reconnect test helperby Wilmer Paulino · 798430bb · Aug 25, 2026 · 1 fileMessage 78 · AdequateTriage 0Details
Commit message · Wilmer Paulino

Fix tx_abort delivery in reconnect test helper

The second half of reconnect_nodes handles messages sent by node A to
node B, but tx_abort was delivered back to node A with node B as the
sender. This exercised the wrong state machine and could leave reconnect
tests with an incomplete abort exchange.

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-priorityFail queued splice contribution on force-closeby Jeffrey Czyz · 0dd4ed46 · Aug 24, 2026 · 3 filesMessage 68 · AdequateTriage 0Details
Commit message · Jeffrey Czyz

Fail queued splice contribution on force-close

A splice contribution committed via `funding_contributed` while a
counterparty-initiated funding negotiation is in progress is queued in
`quiescent_action` until the next quiescence session. If the channel
was force-closed in this state, the queued contribution was dropped
without emitting SpliceNegotiationFailed/DiscardFunding events, leaving
the user's contributed UTXOs locked with no signal to release them:
failing the active negotiation round and abandoning the queued action
were mutually exclusive on force-close.

Both may need reporting at once, e.g., a contribution folded into the
counterparty's round as the acceptor plus a second contribution queued
behind it, so ShutdownResult now carries any number of splice failures
and failure events are emitted for each.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-priorityMerge PR 'Drop `Arc<Self>` receiver in `read_all_channel_monitors_with_updates_parallel`' (#4921)by Matt Corallo · 81caf9f3 · Aug 24, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Matt Corallo

Merge PR 'Drop `Arc<Self>` receiver in `read_all_channel_monitors_with_updates_parallel`' (#4921)

from parallel-updates-arc into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/4921
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discount
Security candidateAdd cross-version tests for queued splice failure eventsby Jeffrey Czyz · 04252a94 · Aug 24, 2026 · 1 fileMessage 83 · StrongInformational 22Details
Commit message · Jeffrey Czyz

Add cross-version tests for queued splice failure events

A ChannelManager written with a splice contribution still queued
waiting on quiescence embeds synthesized failure events. Verify that a
downgraded 0.2 node reads such a manager and surfaces the failure as
its own SpliceFailed event carrying the contributed outputs, and that
a manager written by 0.2 with a queued splice -- which 0.2 persisted
in a legacy form current versions do not read -- loads with the queued
intent dropped and no events.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
update trust
AI analysis · Informational 22/100

This commit only adds new regression tests for upgrading and downgrading Lightning node state across software versions. It does not change any production code. The tests verify that a splice contribution stuck waiting for network quietness is handled safely when moving between LDK 0.2 and current versions: an older 0.2 node reading newer state gets a failure event so the user can reclaim funds, while a newer node reading an older 0.2 state simply drops the stale queued splice with no harmful effects. There is no vulnerability being introduced or fixed here.

Lower-priorityFail queued splice contributions on ChannelManager reloadby Jeffrey Czyz · 018d08b9 · Aug 24, 2026 · 3 filesMessage 73 · AdequateTriage 0Details
Commit message · Jeffrey Czyz

Fail queued splice contributions on ChannelManager reload

A splice contribution committed via `funding_contributed` sits queued
in the channel until quiescence is reached. Queued contributions are
not persisted, so restarting the node before then silently dropped
them, leaving the user unaware that their contributed UTXOs would
never be spent by a splice and could be reused.

`ChannelManager::write` already synthesizes `SpliceNegotiationFailed`
and `DiscardFunding` events for active negotiations in unpersisted
states. Synthesize them for queued contributions too, so a reloaded
node surfaces the failure and the user can reclaim the contributed
UTXOs and retry the splice.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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