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

lightningd: use BIP86 derivation for P2TR in HTLC rebroadcast change outputs

Public commit record

What the developer wrote

Authored by Sangbida Chaudhuri

50/100 · Thin
lightningd: use BIP86 derivation for P2TR in HTLC rebroadcast change outputs
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This change fixes how Core Lightning derives the public key used for 'change' outputs when rebroadcasting on-chain HTLC (Hashed Time-Locked Contract) transactions that pay to a Taproot (P2TR) address. Previously, the code always used the older BIP32 derivation even when the wallet was configured for the newer BIP86 Taproot-specific derivation. Using the wrong derivation path could produce a change output that the wallet does not recognize or cannot spend later, potentially locking up funds. The patch checks whether BIP86 is available and uses it for P2TR change outputs, falling back to BIP32 otherwise.

Recommended action

Apply the patch. After applying, verify that wallets using BIP86/Taproot can correctly identify and spend change outputs from HTLC rebroadcast transactions. Consider adding regression tests that exercise both BIP32-only and BIP86-enabled wallets for P2TR change outputs in the HTLC rebroadcast path.

Security signals we found

01

Key derivation mismatch between BIP32 and BIP86 for Taproot outputs

02

Potential fund lockup or unspendable change outputs

03

HTLC rebroadcast change output handling

04

Taproot (P2TR) output construction

Risk score

Why this scored 42/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/15
Affected reach 7/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.