Skip to content

PSET extraction leaves pegin flag in TxIn.previous_output.vout #292

Description

@RCasatta

In elements-rust, PartiallySignedTransaction::extract_tx() copies the flagged PSET previous_output_index directly into TxIn.previous_output.vout, while also setting TxIn::is_pegin.

Elements Core removes the pegin/issuance flag bits from the in-memory outpoint and represents them separately. Consequently, SighashCache hashes the flagged outpoint, producing a different SegWit v0 sighash than Elements Core. Signatures created from an extracted pegin PSET are therefore rejected by Elements.

extract_tx() should mask the pegin and issuance bits from previous_output_index when constructing TxIn.previous_output, while retaining is_pegin and issuance state separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions