Bitcoin Forum
May 03, 2024, 11:35:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [INFO - DISCUSSION] Pay-to-script-hash (P2SH) (BIP13)  (Read 59 times)
cygan (OP)
Legendary
*
Online Online

Activity: 3150
Merit: 7738


Crypto Swap Exchange


View Profile WWW
September 12, 2023, 01:45:51 PM
Merited by BlackHatCoiner (4), pooya87 (2), vapourminer (1)
 #1

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 <gavinandresen@gmail.com>
  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

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
1714736119
Hero Member
*
Offline Offline

Posts: 1714736119

View Profile Personal Message (Offline)

Ignore
1714736119
Reply with quote  #2

1714736119
Report to moderator
1714736119
Hero Member
*
Offline Offline

Posts: 1714736119

View Profile Personal Message (Offline)

Ignore
1714736119
Reply with quote  #2

1714736119
Report to moderator
1714736119
Hero Member
*
Offline Offline

Posts: 1714736119

View Profile Personal Message (Offline)

Ignore
1714736119
Reply with quote  #2

1714736119
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714736119
Hero Member
*
Offline Offline

Posts: 1714736119

View Profile Personal Message (Offline)

Ignore
1714736119
Reply with quote  #2

1714736119
Report to moderator
1714736119
Hero Member
*
Offline Offline

Posts: 1714736119

View Profile Personal Message (Offline)

Ignore
1714736119
Reply with quote  #2

1714736119
Report to moderator
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10535



View Profile
September 12, 2023, 02:10:31 PM
Merited by BlackHatCoiner (4), vapourminer (1)
 #2

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 <data> pattern, the code has to execute the branch related to SegWit where some OP codes like OP_CHECKSIG are acting differently.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!