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

Replace PSBT.tx with PSBT::GetUnsignedTx and PSBT::GetUniqueID

Public commit record

What the developer wrote

Authored by Ava Chow

85/100 · Strong
Replace PSBT.tx with PSBT::GetUnsignedTx and PSBT::GetUniqueID

The global unsigned tx is decomposed into separate fields inside of
PSBT, which mirrors what PSBTv2 will do. However, we still need to get
the global unsigned tx so PSBT::GetUnsignedTx is introduced to do that.
In order to also have a stable unique ID, we also introduce
PSBT::GetUniqueID to replace uses of PSBT.tx.GetHash().
✓ 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 refactors how Bitcoin Core handles Partially Signed Bitcoin Transactions (PSBTs). Previously, a PSBT stored a complete copy of the unsigned transaction. Now, the transaction is broken into separate fields and reconstructed on demand. The change also introduces a stable unique ID for each PSBT. This is primarily a code-cleanup and preparation step for a future PSBT version 2, not a direct fix for an active security bug.

Recommended action

Treat as a routine refactor with defensive hardening. Review that all former direct uses of `psbt.tx` are now safely handled via `GetUnsignedTx()` and that `GetUniqueID()` correctly identifies PSBTs for merge operations. No urgent action required unless downstream code still references the removed `tx` member.

Security signals we found

01

Refactor of PSBT internal representation to remove direct unsigned transaction member

02

Introduction of GetUnsignedTx() and GetUniqueID() accessors

03

Addition of optional/null checks when reconstructing the unsigned transaction

04

Alignment with PSBTv2 field decomposition

05

No explicit security bug or vulnerability described in commit message

Risk score

Why this scored 33/100

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