0

I am trying to understand the unlocking portion of the transactions inputs of this pay-to-public-key-hash transaction: https://www.blockchain.com/btc/tx/0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2

Pasting the following unlocking+locking portion into bitcoin IDE:

3045022100884d142d86652a3f47ba4746ec719bbfbd040a570b1deccbb6498c75c4ae24cb02204b9f039ff08df09cbe9f6addac960298cad530a863ea8f53982c09db8f6e381301
0484ecc0d46f1918b30928fa0e4ed99f16a0fb4fde0735e7ade8416ab9fe423cc5412336376789d172787ec3457eee41c04f4938de5cc17b4a10fa336a8d752adf
OP_DUP
OP_HASH160
7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8
OP_EQUALVERIFY
OP_CHECKSIG

Shows me the OP_HASH160 results in a public key hash of

0x6DF13DE1F1D824380834E0D42E49E5E451A647CF

But for this script to pass the OP_EQUALVERIFY it should be

7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8

This transaction is valid. What am I misunderstanding?

2
  • 1
    Whatever Bitcoin IDE you are using is simply hashing it incorrectly. Using other hashing tools results in the correct hash160.
    – Andrew Chow
    May 28 at 16:49
  • You're correct. The following command will produce the correct public key hash. > echo $PUB_KEY | xxd -r -p | openssl dgst -sha256 | openssl dgst -rmd160
    – poke
    May 28 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.