Author

Topic: [INFO - DISCUSSION] Pay-to-script-hash (P2SH) (BIP13) (Read 77 times)

legendary
Activity: 3472
Merit: 10611
BIP-16 (Pay to Script Hash) was the first time complexity was added into the simple FORTH like Bitcoin script system. Before BIP16 you'd just read each "command" from left to right and execute them using a stack. After BIP16 you first have to analyze the output-script to see if it matches the predefined patterns which will then tell you if you need to take "extra steps" before doing what you were doing before.
Today more complexity is added, for example if the output-script matches the OP_N pattern, the code has to execute the branch related to SegWit where some OP codes like OP_CHECKSIG are acting differently.
legendary
Activity: 3304
Merit: 8633
icarus-cards.eu
with these 4 slides i would like to present you one of the first bips. this script which was created by Gavin Andresen in october 2011 was standardized in april 2012.
this method is the most difficult to understand in contrast to p2pk, p2pkh, or p2wpk. it helps to keep in mind that payments in themselves do not have a recipient, but only define a rule how the sent coins can be spent.
here, the receiver defines a rule (the script) and forms the hash from it. the sender can simply pay to a hash, and the receiver can spend the coins when he submits the script from which the specified hash is derived.
p2sh was introduced primarily to enable multisignature transactions, transactions that require not just one party to sign, but multiple parties.

Quote
BIP: 13
  Layer: Applications
  Title: Address Format for pay-to-script-hash
  Author: Gavin Andresen <[email protected]>
  Comments-Summary: No comments yet.
  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0013
  Status: Final
  Type: Standards Track
  Created: 2011-10-18
https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki



https://twitter.com/BTCillustrated
Jump to: