You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PSET extraction leaves pegin flag in TxIn.previous_output.vout #292
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.
Activity
apoelstra commentedon Jul 30, 2026
I have an upcoming PR which will introduce an
OutpointWithFlagstype which should hopefully clean this whole codepath up.Meanwhile I guess we should just patch the bug ahead of the new release #291
delta1 commentedon Jul 31, 2026
Proposed fix in #293
Merge #293: pset: mask pegin/issuance flags out of the input outpoint