Can you create a valid p2sh transaction with the redeem script in the scriptsig alone?

0

From my understanding, for a p2sh transaction to be valid the redeem script must hash to the same value as the output script being used to fund the transaction.

So can't you just put the redeem script of your address in the scriptsig and the transaction will be valid?

Errol

Posted 2018-03-30T23:51:36.400

Reputation: 77

Answers

1

No, the BIP16 rules apply. They require that not only you provide a redeemscript whose hash matches that in the output (the address), but also that valid inputs for that script are provided (which will typically require at least valid signatures).

Pieter Wuille

Posted 2018-03-30T23:51:36.400

Reputation: 54 032