Update 8_1_Understanding_the_Foundation_of_P2SH.md

This commit is contained in:
Shannon Appelcline 2017-06-02 13:23:47 -07:00 committed by GitHub
parent 2d45d607f4
commit 5fd47a187a

View File

@ -76,6 +76,8 @@ The trick to redeeming a P2SH transaction is that the recipient must have saved
An unlocking `scriptSig` for a P2SH transaction is formed as: `... data ... <redeemScript>`. The `data` must _solely_ be data that is pushed onto the stack, not operators. ([BIP 16](https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki) calls them signatures, but that's not an actual requirement.) An unlocking `scriptSig` for a P2SH transaction is formed as: `... data ... <redeemScript>`. The `data` must _solely_ be data that is pushed onto the stack, not operators. ([BIP 16](https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki) calls them signatures, but that's not an actual requirement.)
> **WARNING:** Though signatures are not a requirement, a P2SH script actually isn't very secure if it doesn't require at least one signature in inputs. The reasons for this are described in [§11.1: Writing Puzzle Scripts](11_1_Writing_Puzzle_Scripts.md).
When a UTXO is redeemed, it runs in two rounds of verification: When a UTXO is redeemed, it runs in two rounds of verification:
1. First, the redeemScript in the `scriptSig` is hashed and compared to the hashed script in the `scriptPubKey`. 1. First, the redeemScript in the `scriptSig` is hashed and compared to the hashed script in the `scriptPubKey`.