Skip to main content
£0.00 0

Basket

No products in the basket.

ASIC mining articles and advice

BIP 17 OP_CHECKHASHVERIFY Explained: The Closed P2SH Alternative

BIP 17 OP_CHECKHASHVERIFY explained as a closed P2SH alternative, including script hashing, activation risk and why Bitcoin adopted BIP 16.

BIP 17 OP_CHECKHASHVERIFY (CHV) guide cover

This guide explains BIP 17 OP_CHECKHASHVERIFY (CHV) in plain English. It covers the problem behind the BIP, why it matters and whether the proposal is part of Bitcoin today.

TL;DR

  • What it is: BIP 17 OP_CHECKHASHVERIFY, abbreviated CHV, proposed reassigning OP_NOP2 so a compact output could commit to a script supplied by the spender. It pursued the same payment-to-script-hash goal as BIP 16 through different execution semantics.
  • Why it matters: BIP 17 is a useful record of the contest to make script-hash payments practical, but Bitcoin adopted BIP 16 instead. CHV is closed, and its proposed opcode slot now has a different deployed meaning under CHECKLOCKTIMEVERIFY.
  • Current position: The proposal is closed and OP_NOP2 later became CHECKLOCKTIMEVERIFY, so BIP 17 must be treated as historical design evidence rather than a usable Bitcoin feature.

BIP 17 OP_CHECKHASHVERIFY (CHV) in simple English

BIP 17 OP_CHECKHASHVERIFY (CHV): A receiver could choose a complex spending condition while the sender paid a fixed 20-byte hash. The full policy would be supplied on spending, reducing payer complexity and fitting existing address-oriented infrastructure.

Simple example

A node operator is checking BIP 17 OP_CHECKHASHVERIFY (CHV). Operational documentation should cite BIP 16 for deployed legacy P2SH and identify BIP 17 only when examining the historical alternatives.

Key terms in plain English

BIP:
Bitcoin Improvement Proposal: a document describing a proposed rule, standard or process. Its status must be checked separately.
Consensus:
The shared rules full nodes use to decide whether blocks and transactions are valid.
Soft fork:
A proposed tightening of Bitcoin rules that old nodes may not enforce themselves.
Node:
A computer running Bitcoin software that checks data and communicates with other peers.

What CHV tried to achieve

A receiver could choose a complex spending condition while the sender paid a fixed 20-byte hash. The full policy would be supplied on spending, reducing payer complexity and fitting existing address-oriented infrastructure. This was the practical P2SH objective, not a request for miners to trust an off-chain script.

Proposed opcode behaviour

CHV would hash the end of the preceding script from the last executed CODESEPARATOR, compare that HASH160 value with the top stack item and fail on a mismatch. A match would continue without popping the hash. Those stack and separator details mattered to backwards compatibility and to every implementation reproducing the same digest.

Standard output and redemption

The proposed output pushed a 20-byte hash, ran CHECKHASHVERIFY and then DROP. Redemption supplied signatures, a CODESEPARATOR and the committed script. Relay policy further constrained the appended script to a recognised standard type. Consensus validity, standard relay and wallet recognition therefore remained separate boundaries.

BIP 17 OP_CHECKHASHVERIFY (CHV) technical diagram
Standard output and redemption: the fields, validation boundary and operational evidence that implementations need to agree.

Activation and old-node risk

Old nodes would see the reassigned NOP permissively and could accept a block that upgraded nodes rejected. The document described miner signalling and a timestamp gate to limit a lasting split. Its one-confirmation attack illustrates why a nominally compatible soft fork still needs coordinated validation and cautious confirmation policy.

Why BIP 16 won

BIP 16 used a specific HASH160 and EQUAL output template followed by defined redeem-script evaluation. It addressed the same sender-facing need without introducing CHV semantics. Operational documentation should cite BIP 16 for deployed legacy P2SH and identify BIP 17 only when examining the historical alternatives.

Opcode history matters

The numeric slot proposed for CHV did not remain reserved for this design. BIP 65 later redefined OP_NOP2 as CHECKLOCKTIMEVERIFY under an activated consensus change. Software must interpret opcodes according to the active network rules and block context, never by copying an abandoned BIP table.

Safe reconstruction exercise

On isolated research tooling, reproduce the BIP 17 hash boundary and compare it with BIP 16 redeem-script validation. Trace the stack and CODESEPARATOR position, then show why a current node does not enable CHV. Keep experimental consensus binaries away from production datadirs and template failover.

Frequently asked questions

What is the main point of BIP 17 OP_CHECKHASHVERIFY (CHV)?

BIP 17 OP_CHECKHASHVERIFY (CHV): A receiver could choose a complex spending condition while the sender paid a fixed 20-byte hash.

For BIP 17 OP_CHECKHASHVERIFY (CHV), what should a beginner know about what CHV tried to achieve?

A receiver could choose a complex spending condition while the sender paid a fixed 20-byte hash.

For BIP 17 OP_CHECKHASHVERIFY (CHV), what should a beginner know about proposed opcode behaviour?

CHV would hash the end of the preceding script from the last executed CODESEPARATOR, compare that HASH160 value with the top stack item and fail on a mismatch.

For BIP 17 OP_CHECKHASHVERIFY (CHV), what should a beginner know about standard output and redemption?

The proposed output pushed a 20-byte hash, ran CHECKHASHVERIFY and then DROP.

Conclusion

BIP 17 is a useful record of the contest to make script-hash payments practical, but Bitcoin adopted BIP 16 instead. CHV is closed, and its proposed opcode slot now has a different deployed meaning under CHECKLOCKTIMEVERIFY.

Primary sources

Check the current specification status and the documentation for the exact implementation you operate before moving production funds or changing a mining node.

ASIC MINER PICKS

Recommended ASIC Mining Hardware

Compare three of our highest ranked ASIC miners currently available, with live product details and pricing.
Overall ranking
Equihash
·
ZEC
Overall rank#1of 100AvailableAll: #3 / 831
Bitmain Antminer Z15K 525KSol Equihash Zcash Miner
Bitmain
Pre-Order
Hashrate
525KSOL
Efficiency
4.73W/KSOL
Power
2483W
Earns/kWh
41.5p
Free Shipping
Price · delivered
£6,050.00
ex VAT
Est. per month
£751.05
Payback 8.1 Months
Overall ranking
Equihash
·
ZEC
Overall rank#2of 100AvailableAll: #4 / 831
Bitmain Antminer Z15 Pro 800KSol Equihash Zcash Miner
Bitmain
In stock
Hashrate
800KSOL
Efficiency
3.3W/KSOL
Power
2640W
Earns/kWh
59.4p
Price · delivered
£11,925.00
ex VAT
Est. per month
£1144.46
Payback 10.4 Months
Overall ranking
SHA-256
·
BTC
Overall rank#6of 100AvailableAll: #9 / 831
Bitmain Antminer S23e Hydro 2U 865Th SHA-256 Bitcoin Miner
Bitmain
Pre-Order
Hashrate
865TH
Efficiency
10W/TH
Power
8650W
Earns/kWh
13.2p
Free Shipping
Price · delivered
£9,382.50
ex VAT
Est. per month
£835.74
Payback 11.2 Months
Browse all ASIC miners
MORE MINING ADVICE

More ASIC Mining Articles

Read practical advice about choosing hardware, calculating electricity costs, setting up miners, hosting and maintenance.
MINER COMMUNITY

Join the ASIC Mining Discussion

Ask a question or share what has worked for you. Your experience may help another miner make a better decision.

Members can read and join the discussion

Log in to read comments from other miners. Create a free account if you would like to ask a question or share your experience.

Log in to read comments Register to join the discussion

Membership helps us protect the discussion from spam and keep answers useful.

ASIC MINING SUPPORT

Need Help Choosing an ASIC Miner?

Tell us what you want to mine, your electricity cost and where the machine will run. We can help you compare hardware, power requirements, hosting and repairs.
Contact our mining team
Browse ASIC miners