In P2PKH
transactions, the content after signing the transaction contains: <signature(with hash_flag)><public_key>
. However, since the signature can't sign itself, during the signature process the ScripSig
field is temporarily set to a certain value.
According to the accepted answer from How to redeem a basic Tx?, the field is temporarily set with the ScriptPubKey
field from the UTXO
we want to redeem (in this case a P2PKH ScriptPubKey
with the RIPEMD160
of the previous address). However, according to VButerin's pybitcointools, the field is set with a P2PKH ScriptPubKey
with the RIPEMD160
of your own address (the one you are using as a source, and which private key will be used to sign the transaction).
I used pybitcointools signing function several times, and the generated transactions are valid, but the answer from the aforementioned question has been well received, so at this point I'm quite confused about what the field should contain.