mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-02-16 17:42:06 +00:00
parent
db678d15c0
commit
6661b9cbec
@ -100,7 +100,7 @@ P2SH was developed to resolve these practical difficulties and to make the use o
|
||||
.Complex script without P2SH
|
||||
|=======
|
||||
| Locking Script | 2 PubKey1 PubKey2 PubKey3 PubKey4 PubKey5 5 CHECKMULTISIG
|
||||
| Unlocking Script | Sig1 Sig2
|
||||
| Unlocking Script | 0 Sig1 Sig2
|
||||
|=======
|
||||
|
||||
[[with_p2sh]]
|
||||
@ -108,7 +108,7 @@ P2SH was developed to resolve these practical difficulties and to make the use o
|
||||
|=======
|
||||
| Redeem Script | 2 PubKey1 PubKey2 PubKey3 PubKey4 PubKey5 5 CHECKMULTISIG
|
||||
| Locking Script | HASH160 <20-byte hash of redeem script> EQUAL
|
||||
| Unlocking Script | Sig1 Sig2 <redeem script>
|
||||
| Unlocking Script | 0 Sig1 Sig2 <redeem script>
|
||||
|=======
|
||||
|
||||
As you can see from the tables, with P2SH the complex script that details the conditions for spending the output (redeem script) is not presented in the locking script. Instead, only a hash of it is in the locking script and the redeem script itself is presented later, as part of the unlocking script when the output is spent. This shifts the burden in fees and complexity from the sender (who creates the transaction) to the recipient (who unlocks and spends the transaction).
|
||||
|
Loading…
Reference in New Issue
Block a user