Pay-to-script-hash (P2SH) is a Bitcoin transaction-output form that commits to the hash of a spending script rather than asking a sender to reproduce that script. The recipient supplies the script, and the data satisfying it, when spending the output. Gavin Andresen's BIP 16 introduced the additional consensus checks in April 2012; BIP 13 separately defined the familiar Base58Check addresses beginning with 3. BIP 16 — protocol specification · BIP 13 — address specification
Why a script hash mattered
Early Bitcoin output forms such as pay-to-public-key and pay-to-public-key-hash let a sender specify simple spending conditions. More complex arrangements, particularly multisignature custody, were awkward as payment destinations: senders needed to know the entire recipient script, including its keys and threshold, before creating the output. Bitcoin address follows the separate story of how wallet software represented destinations to humans.
BIP 11 had already proposed making small bare multisignature scripts standard for relay. It did not supply a short address hiding the keys and threshold: senders still needed the whole output script. BIP 11's policy and the later P2SH consensus rule were separate improvements, though Bitcoin-Qt 0.6.0 released support for both. See Bitcoin multisignature for the original opcode and merge history. BIP 11 — 2011 standard multisig proposal · Bitcoin-Qt 0.6.0 release
P2SH moved the script-construction responsibility to the recipient. A person making a payment could use a fixed-size hash and leave the recipient to disclose the actual redemption conditions at spending time. The script hash does not itself identify the recipient, guarantee that the script can be satisfied, or permanently conceal the script once it is revealed. BIP 16's own rationale discusses escrow and multisignature as motivations, not proven usage figures. BIP 16 — motivation and rationale
2011–2012: an argument about how to get there
BIP 12, assigned 18 October 2011 and authored by Gavin Andresen, proposed OP_EVAL, which would evaluate a script supplied on the stack. Its specification openly discussed the extra complexity and security risk of evaluating data as code. The proposal is now marked Closed; it was not the P2SH mechanism Bitcoin deployed. BIP 12 — OP_EVAL
BIP 13, also assigned 18 October 2011, supplied the wallet-facing address format: version byte 5 on mainnet, followed by a 20-byte script hash and a Base58Check checksum. This produces the conventional 3... address. An address is an encoding for constructing a destination; it is not an independent on-chain account. BIP 13 — address format
BIP 16, assigned 3 January 2012, chose special validation of the existing OP_HASH160/OP_EQUAL output form rather than adding the more general OP_EVAL. The document acknowledges that recognizing one special script pattern is inelegant, but its author considered the alternatives harder to deploy safely through existing payment infrastructure. BIP 16 — specification and rationale
BIP 17, assigned 18 January 2012, offered another route: Luke Dashjr's OP_CHECKHASHVERIFY (CHV), proposed as a reinterpretation of OP_NOP2 with a different script layout. It is marked Closed, and its proposed CHV semantics were not activated. BIP 17 is evidence of a contemporary design alternative, not a description of how present-day P2SH works. BIP 17 — alternative design
What BIP 16 validates
A traditional P2SH output locks value to:
OP_HASH160 <20-byte script hash> OP_EQUAL
The spender places the required stack arguments and the serialized redeem script in the transaction input's scriptSig. BIP 16 adds three steps: the scriptSig must contain push operations only; the normal script evaluation must match the hash committed by the output; and the redeem script is then executed using the remaining supplied stack items. The hash match alone is insufficient. These are consensus conditions for affected spends after activation, not merely relay preferences. BIP 16 — validation rules
Compatibility imposes limits. The redeem script is itself pushed as a stack item, so the maximum pushed-element size of 520 bytes constrains the size of a legacy P2SH redeem script. BIP 16 also specifies counting signature operations appearing inside redeem scripts toward a block's signature-operation limit. Ordinary transaction standardness can impose additional relay and mining limits beyond consensus. BIP 16 — size limit and signature counting · Transaction standardness
The rule is a soft fork: an old validating node can accept a transaction because its outer hash-equality check succeeds, while an upgraded node can reject the same spend because the inner redeem script fails. That mismatch is why miner readiness and rollout timing mattered. BIP 16's backwards-compatibility discussion explicitly describes a possible one-confirmation attack against older clients. BIP 16 — backwards compatibility
February–April 2012: a postponed switchover
BIP 16's deployment plan asked miners to include /P2SH/ in a coinbase input so support could be estimated from recently mined blocks. The surviving BIP retains earlier proposed dates as part of its historical text; these are proposal stages, not all actual network activations. BIP 16 — deployment plan
On 27 February 2012, Andresen publicly reported that mining support remained below 50% and the planned 1 March switchover could not proceed. He announced a new support-evaluation date of 15 March and a target switchover of 1 April. The same day, his Bitcoin source commit 46aa2a6b changed the mainnet -paytoscripthashtime default from 1330578000 (1 March) to 1333238400 (1 April). The forum post and code change independently establish the postponement. Andresen — contemporary announcement, 27 February 2012 · Bitcoin source — switchover commit
Andresen warned solo miners and pool operators to upgrade. In a 28 February follow-up he explained that old miners might include a spend that they considered valid but upgraded nodes rejected, producing blocks the upgraded majority would orphan. This is a contemporaneous developer's description of a concrete failure mode, not a count of how many miners actually suffered losses. BitcoinTalk — 27–28 February discussion
On 21 March 2012, source commit 8f188ece removed the configurable BIP 16 switch and hardcoded the mainnet timestamp threshold at 1333238400, while retaining 1329264000 (15 February) for testnet. The comparison in ConnectBlock() was against the '''candidate block's timestamp**. Bitcoin-Qt 0.6.0, released 30 March 2012, reported support for BIP 13/16 short multisignature addresses and preliminary multisignature transactions. Shipping code and the date its consensus checks became applicable are separate milestones. Bitcoin source — hardcoded activation · Bitcoin-Qt 0.6.0 release announcement, 30 March 2012
The rule became applicable on mainnet for blocks timestamped 1 April 2012 or later. Later chain chronologies identify *block 173,805' as the first affected block, but the original specification itself defines a timestamp condition, not a height activation rule. This article has not independently replayed the early chain to reproduce that identification or quantify the reported temporary splits around the abandoned earlier date. BIP 16 — timestamp rule · Bitcoin Wiki — later chain chronology
Was /P2SH/ a vote?
The term *miner voting'' is convenient but imperfect here. In a 24 January 2012 BitcoinTalk discussion, participants distinguished a miner's software signaling readiness from a population-wide vote. EclipseMC operator Inaba said that a software upgrade had inserted P2SH signals into his pool's blocks without his intending to signal support; he said he subsequently removed them. That is his contemporary first-person account, not independent measurement of the network's total intentions. BitcoinTalk — miners debate P2SH signaling, 24 January 2012
The BIP's threshold helped developers gauge miner willingness to enforce a stricter rule. It could not, by itself, prove wallet adoption, universal agreement or the absence of old software still accepting a looser interpretation.
Later use: wrapping SegWit
When Segregated Witness activated on 24 August 2017, BIP 141 allowed a witness program to be placed inside a P2SH redeem script. A P2SH-wrapped witness output looked like an ordinary P2SH output to older wallet infrastructure, while updated validators imposed the corresponding witness rules when it was spent. Native witness outputs, and later Taproot outputs, use different output forms. This is another deployment use of P2SH, not a retroactive change to BIP 16's April 2012 origin. BIP 141 — P2SH witness programs · Segregated Witness
Evidence and limits
BIPs 12, 13, 16 and 17 are first-party protocol texts; their currently hosted versions contain later editorial maintenance, so their present metadata is not by itself a frozen 2012 snapshot. The February and March Bitcoin commits are direct dated implementation records. The February forum exchange is contemporary first-party testimony about miner coordination, not an independent census. Bitcoin-Qt's 30 March release note establishes distribution of functionality, not the number of active users.
Open research
Reconstruct P2SH's early mainnet activation from raw block headers and spends, including the first consensus-validated P2SH redemption. Keep the earlier P2SH-looking funding outputs separate from the first spend actually checked under BIP 16.
Recover dated wallet and exchange release records showing the uptake of P2SH receive addresses and multisignature spending after April 2012.
Reconstruct the reported early-March 2012 disagreement between clients that retained the abandoned March 1 switch and clients that postponed it, from original block hashes, node logs and contemporaneous reports.