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

contractcourt: integrate production taproot support in nursery

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

73/100 · Adequate
contractcourt: integrate production taproot support in nursery

This commit completes the production taproot integration by updating the
UTXO nursery to properly handle production taproot channels. The nursery
is responsible for incubating time-locked outputs from commitment transactions
and must use the correct witness types for successful sweeping operations.

The witness type selection logic has been updated in three key areas within
the IncubateOutputs function: incoming HTLC resolution handling, outgoing
HTLC resolution handling, and baby output creation through makeBabyOutput.
Each location now uses a consistent three-way selection pattern that chooses
production taproot witness types for final channels, staging types for
development channels, and legacy types for traditional channels.

A new helper method isProdTaprootResolution has been added to determine
production taproot channels by examining the presence of a ResolutionBlob,
which indicates auxiliary channel information used by production taproot
implementations. The makeBabyOutput function has been converted to a method
to access this helper function.

The NurseryReport function has been updated to include all new Final witness
types in its switch statements, ensuring that production taproot outputs are
properly categorized and reported. This maintains consistency in the nursery's
reporting system while supporting the new witness types.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit finishes adding support for a new kind of Bitcoin taproot channel in LND's 'UTXO nursery' — the component that looks after time-locked funds after a channel is force-closed. It makes sure the nursery picks the correct transaction-signature format (called a witness type) for production taproot channels, instead of accidentally using the older or staging taproot formats. The change is mostly about completing a feature and preventing sweep failures for the new channel type, not about fixing an obvious exploitable bug.

Recommended action

Treat as a feature-completion/maintenance patch. Reviewers should verify that every call site that should pass WithChanType does so, and that the new Final witness types are handled consistently across sweeping, reporting, and any downstream wallet/rescue code not shown in this diff. Run the new tests and existing contractcourt tests.

Security signals we found

01

Witness-type selection now distinguishes production taproot (Final), staging taproot, and legacy channels

02

New helper relies on channel type bit IsTaprootFinal rather than only script shape (IsPayToTaproot)

03

NurseryReport extended so new Final witness types are categorized correctly

04

Functional-option API change propagates through ChainArbitratorConfig, server.go, and test mocks

05

No explicit bug, CVE, or security disclosure referenced in commit message or diff

Risk score

Why this scored 33/100

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