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

Store shared output index in ConstructedTransaction

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

85/100 · Strong
Store shared output index in ConstructedTransaction

Currently, only the shared input index is stored in
ConstructedTransaction. This will be used later to filter out the shared
input when constructing an error during interactive tx negotiation.
Store the shared output index as well so that the shared output can be
filtered out as well.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit is a small internal cleanup in the code that builds Bitcoin funding transactions for the Lightning interactive-tx protocol. It records the position of the shared funding output inside a data structure, just as the shared input position was already recorded. The immediate change only refactors how the code checks that the shared output exists, and it adds serialization for the new field. There is no direct security fix here, but it prepares the ground for later error-handling logic that will need to ignore the shared output when building protocol error messages.

Recommended action

Treat as a routine refactor/preparatory commit. Review the follow-up commit that uses shared_output_index to ensure the shared output is correctly excluded from any protocol error transaction, because omitting it could leak the shared output or produce an invalid error message. Verify that adding a required TLV field does not break compatibility with older serialized states.

Security signals we found

01

Refactors shared-output presence check but preserves the same MissingFundingOutput abort behavior

02

Adds required TLV field shared_output_index, which may affect backward/forward serialization compatibility

03

Commit message references future interactive-tx error-path filtering of shared inputs/outputs

04

No bounds or validation logic change beyond the existing u16::MAX sentinel

Risk score

Why this scored 20/100

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