Wiki / Concepts / Pay to Script Hash (P2SH)

Pay to Script Hash (P2SH)

From the Bitcoin Takeover Wiki · ✓ 7 sources · 0 podcast anchors · updated 2026-11-20
200820102012201420162018Hard fork vs soft foSegregated Witness▼ Pay to Script Hash · 2012-04-01
Timeline generated from the dates of this article and the articles it links to. Click a label to open it.

The 2012 soft fork (BIP-16) that let anyone pay to the hash of a script, giving multisig its “3…” addresses after a fight with two rival designs.

◆ Takeover vieweditorial · opinion, labelled

The wiki's angle: P2SH was the first soft fork fought in the open, with rival code and rival coinbase votes, and it set the template for every activation argument that followed.[1][4]

What it does

BIP-16 describes a new standard transaction type in which an output commits only to the hash of a script, and the spender later reveals the script and satisfies it; the BIP adds validation rules that apply only to these transactions[1]. BIP-13 defines the matching address format, an address that “represents the encoded hash of a script” so the sender does not need to know the receiver's spending conditions[2].

The 2012 fight

P2SH had rivals. Gavin Andresen's earlier BIP-12 proposed a new opcode, OP_EVAL, and is now Closed[3]. Luke DashjrLuke DashjrPersonBitcoin Knots maintainer; central figure of BIP-110 and the 2026 BLAKE2b fork. proposed OP_CHECKHASHVERIFY in BIP-17, which is also Closed, and a different hashScriptCheck design in BIP-18[4][5]. BIP-16's activation was a miner vote: if 550 or more of roughly 1,000 blocks in a week carried “/P2SH/” in their coinbase, about 55% of the network, the new rules would be enforced[1].

Outcome

The BIP now states that the new rules apply to blocks with timestamps from 1 April 2012[1]. Bitcoin Core lists BIP-16 as implemented since v0.6.0[6]. The BIP Atlas Drama Hall summarises the fight alongside later activation battles[7].

References

  1. primaryBIP 16, “Pay to Script Hash”, bitcoin/bips
  2. primaryBIP 13, “Address Format for pay-to-script-hash”, bitcoin/bips
  3. primaryBIP 12, “OP_EVAL”, bitcoin/bips
  4. primaryBIP 17, “OP_CHECKHASHVERIFY (CHV)”, bitcoin/bips
  5. primaryBIP 18, “hashScriptCheck”, bitcoin/bips
  6. primaryBitcoin Core, doc/bips.md — BIPs implemented by Bitcoin Core (master, read 20 Nov 2026)
  7. primarybitcoin/bips repository [archived]

Related articles

Categories: Concepts
Ask about this article: >_ terminal · Onion mirror: http://btctkvroa6xsq25wmpvvlpkcgss7724zk6fm765fvtuunfgxw74j2pyd.onion/wiki/p2sh/
>_ ask the wiki