• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

Walking through a transaction script

Started by Bitcoin, Apr 20, 2022, 01:11 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

Walking through a transaction script

As an example, I would like to consider this transaction: https://blockchain.info/tx/6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516



I have three questions:



1) The first two entries in the stack are <sig> and <pubKey> for each input. However, the inputs are just giant strings. For the first of the two inputs, it is



3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01


Where are the two separate items, the signature and the public key?



2) I understand that OP_DUP duplicates the top item on the stack i.e. the publick key and then OP_HASH160 computes the hash. Assuming I have the <pubKey>, I'd like to actually run OP_HASH160 and see that I get the result 12ab8dc588ca9d5787dde7eb29569da63c3a238c using a tool like this http://bitcoinvalued.com/tools.php. Where exactly is the <pubKey> that yields this hash?



3) Finally, there is the OP_CHECKSIG which should take ,  and  and return true or false. Where exactly are these items in this transaction?


Source: Walking through a transaction script