transactions – Safety of spending – CoinNewsTrend

transactions – Safety of spending


For traditional pre-Segwit transaction patterns (e.g. P2PK,P2PKH,P2MS), the standard process is that Alice would signal a transaction template that features the brand new transaction’s actual output(s). For the signature to be verifiable, these outputs should be included as they’re. So Charlie’s new transaction with totally different outputs wouldn’t have a verifiable signature, and thus could be invalid.

There are methods to assemble signatures during which the outputs are left open, nevertheless. Which of the six doable configurations of inputs and outputs which might be signed might be set utilizing the hashTypeCode (a.ok.a SigHash flag). If Alice determined to make use of the SIGHASH_NONE flag, for instance, the outputs wouldn’t be signed and Charlie (or anybody) may spend the brand new outputs.

For Segwit transactions (e.g. P2WPKH) a refined model of the process is used. See BIP143.



Supply hyperlink