4

I'm checking the transaction signing as described here Redeeming a raw transaction step by step example required.

What is the reason for steps 5 and 6: temporarily filling scriptSig with scriptPubKey of the output we want to redeem?

Can't this just be skipped, as with txid and output index we uniquely specify the output thus scriptPubKey and we don't get any value with this filling?

1 Answer 1

4

There seem to be no reason: Ken Shirriff's blog explained it this way:

Then the signature is turned into code in the Script language, creating the scriptSig script that is embedded in the transaction. It appears that using the previous transaction's scriptPubKey during signing is for historical reasons rather than any logical reason.[17]

and the link points to a thread from 2013: https://bitcointalk.org/index.php?topic=102487.msg1123257#msg1123257

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.