AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 58 Bitcoin

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

Public commit record

What the developer wrote

Authored by elnosh

73/100 · Adequate
Add `Wallet::release_utxos` to free UTXOs from abandoned transactions

`Wallet` reserves every UTXO it selects and, for selections made without
a `ClaimId` such as splice contributions, refuses to offer them to any
later selection. Since a reservation is never dropped, inputs from a
splice that failed to negotiate stayed reserved for the life of the
process, and repeated failures could leave no UTXOs available for anchor
or HTLC claims.

Add `release_utxos` to `Wallet` and `WalletSync` so users can free the
inputs reported in `Event::DiscardFunding`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a design flaw in LDK's built-in wallet helper where coins selected for a splice-in (or other unclaimed funding) were permanently reserved in memory if the transaction was abandoned. Over repeated failed splices, all spendable coins could become locked, preventing the node from paying on-chain fees for time-critical Lightning transactions such as HTLC or anchor claims. The patch adds a new release_utxos method that callers must invoke using the inputs reported by Event::DiscardFunding.

Recommended action

Users of Wallet/WalletSync should upgrade and call release_utxos with Event::DiscardFunding inputs whenever a funded transaction is abandoned. Review existing integrations to ensure the new method is wired into event handling.

Security signals we found

01

Denial-of-service via UTXO exhaustion from repeated failed splice negotiations

02

Risk of inability to broadcast fee-bumping/claim transactions due to lack of available UTXOs

03

New API surface (release_utxos) introduced to mitigate resource leak

04

Regression test demonstrates UTXO re-selection after DiscardFunding

Risk score

Why this scored 58/100

Our methodology →
Potential impact 18/30
Exploitability 10/25
Stealth signal 8/15
Affected reach 10/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.