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

Remove input value fields from ConstructedTransaction

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

73/100 · Adequate
Remove input value fields from ConstructedTransaction

The local and remote input values are used to determine which node sends
tx_signatures first. Instead of persisting these values, compute them
only when needed from the input metadata. The spec states that the
entire shared input value is to be included for the node sending the
corresponding tx_add_input, so it isn't necessary to know the local and
remote balances which the metadata does not contain.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit refactors how a Lightning node decides which side sends transaction signatures first during an interactive funding transaction. Previously, the node stored separate running totals for local and remote input values inside a data structure called ConstructedTransaction. Now it computes those totals on demand from the input metadata. The change is intended to match the protocol specification, which says the entire shared input value should be counted toward whichever node proposed that input—not split into local and remote portions. There is no direct evidence in the commit that this fixes an active security bug, but it removes a place where stored and computed values could become inconsistent and affect the ordering rule.

Recommended action

Review whether any persisted ConstructedTransaction records from older versions need migration or compatibility handling, since the TLV serialization changed. Confirm that the new is_local classification matches the spec's definition of which node 'sent' a shared input. Otherwise treat as a normal correctness/refactoring patch.

Security signals we found

01

Removed persisted input-value totals that could diverge from input metadata

02

Ordering rule for tx_signatures now derived directly from canonical input metadata

03

Shared input value counted entirely for the contributing party, matching protocol spec

04

Serialization format changed (TLV fields 9 and 11 removed, field 13 renumbered to 9)

Risk score

Why this scored 26/100

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