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

Use CoinSelection::change_output when splicing

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

68/100 · Adequate
Use CoinSelection::change_output when splicing

Now that CoinSelection is used to fund a splice funding transaction, use
that for determining of a change output should be used. Previously, the
initiator could either provide a change script upfront or let LDK
generate one using SignerProvider::get_destination_script.

Since older versions may have serialized a SpliceInstruction without a
change script while waiting on quiescence, LDK must still generate a
change output in this case.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit changes how Lightning Dev Kit handles 'change' money during Bitcoin channel splicing. Previously, the user could provide a change address or LDK would generate one itself. Now, the wallet's coin-selection logic decides whether a change output is needed and what it looks like. The commit keeps a fallback for older stored data that may not include a change script. It is a code-quality and consistency improvement rather than a clear security fix, though it reduces the chance of fee or change-output mistakes during splicing.

Recommended action

Treat as a normal refactor/API change. Reviewers should verify that CoinSelection::change_output correctly accounts for dust limits and fees in all splicing paths, and that the legacy ChangeStrategy::LegacyUserProvided fallback is only triggered for legitimately old serialized state. No immediate security response is indicated by the commit itself.

Security signals we found

01

Change output handling moved from caller-provided/generated script to wallet coin-selection result

02

Legacy fallback retained for older serialized SpliceInstruction without change script

03

Serialization format changed: FundingContribution TLV field 9 now stores change_output (TxOut) instead of change_script (ScriptBuf)

04

No explicit security framing, CVE, or advisory referenced in commit message or diff

Risk score

Why this scored 32/100

Our methodology →
Potential impact 8/30
Exploitability 5/25
Stealth signal 4/15
Affected reach 6/15
Confidence 6/10
Evidence quality 3/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.