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

psbt: Use PSBTInput and PSBTOutput fields instead of accessing global tx

Public commit record

What the developer wrote

Authored by Ava Chow

73/100 · Adequate
psbt: Use PSBTInput and PSBTOutput fields instead of accessing global tx

PSBTInput now has the previous txid and output index, and PSBTOutput has
the amount and script. We no longer need to access the global unsigned
tx for these fields.

Additionally, we can change iterating tx.vin and tx.vout to psbtx.inputs
and psbtx.outputs.

This is in prepration for use with PSBTv2 where the global unsigned tx
will not exist.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit is a code cleanup in Bitcoin Core's Partially Signed Bitcoin Transaction (PSBT) handling. It changes internal code to read input and output details from the PSBT data structures themselves rather than from the global unsigned transaction. The stated goal is to prepare for a future PSBT version (PSBTv2) where the global unsigned transaction may not exist. There is no direct security fix here, but any inconsistency between the PSBT fields and the global transaction could, in principle, lead to wrong analysis or signing behavior. The patch appears to keep behavior equivalent by using the same data through a different path.

Recommended action

Treat as a routine refactor. Reviewers should verify that PSBTInput.prev_txid/prev_out and PSBTOutput.amount/script are always kept in sync with the global unsigned transaction during serialization/deserialization, especially for PSBTv1, so that behavior does not change. No immediate security patch or user action is required.

Security signals we found

01

Refactor only: switches data source from global unsigned tx to PSBT input/output fields

02

No new input validation or bounds checks introduced

03

No explicit security bug fixed in commit message or diff

04

Potential consistency risk if PSBTInput/PSBTOutput fields diverge from global tx, but no evidence of exploitable divergence in this commit

05

Preparation for PSBTv2, a future protocol change

Risk score

Why this scored 19/100

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