Most transactions to p2sh address has the follwing scriptpubkey

HASH160 f45d94733d430261962932e0c847075195916a04 OP_EQUAL

As I understood, this transaction do not need to be signed. Is it true?

User just provide redeemscript which HASH160 equal to f45d94733d430261962932e0c847075195916a04

So, we know that the

HASH160(data1) = hash1
HASH160(data2) = hash2

So, the question is: If user do two transaction to p2sh with the scriptpubkey like

HASH160 f45d94733d430261962932e0c847075195916a04 OP_EQUAL

than scriptpubkey is static in this transactions, but why the redeemscript is always different?

HASH160(data1) = hash1
HASH160(data2) = hash1
....
????
  • 2
    Can you provide an example of two different redeem scripts with the same hash? – Mike D Nov 15 at 20:25

A P2SH transaction will execute whatever redeemScript you provide, which must be a standard transaction:

Transactions that redeem these pay-to-script outpoints are only considered standard if the serialized script - also referred to as the redeemScript - is, itself, one of the other standard transaction types. See BIP16

Those standard transactions, like a P2PKH does require a signature, so even though you provide the right redeemScript, if it doesn't execute successfully, the entire tx will become invalid.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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