Skip to main content
£0.00 0

Basket

No products in the basket.

ASIC mining articles and advice

BIP 18 hashScriptCheck Explained: A Historical P2SH Design

BIP 18 hashScriptCheck explained: review its dataSig and scriptCheck model, sigop accounting, compatibility plan and relationship to deployed P2SH.

BIP 18 hashScriptCheck guide cover

This guide explains BIP 18 hashScriptCheck 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 18 hashScriptCheck documented an alternative way to formalise pay-to-script-hash by naming three transaction elements: dataSig, scriptCheck and hashScriptCheck. Its status is Complete as a historical specification, but the Bitcoin network deployed the closely related BIP 16 rules.
  • Why it matters: BIP 18 offers a precise historical vocabulary for the P2SH transition, including resource accounting and compatibility. Current operations should validate the deployed BIP 16 behaviour and use BIP 18 only to understand the design record.
  • Current position: Its status is Complete as a historical specification, but the Bitcoin network deployed the closely related BIP 16 rules.

BIP 18 hashScriptCheck in simple English

BIP 18 hashScriptCheck: dataSig replaced scriptSig with push-only data, its final element was the scriptCheck, and hashScriptCheck replaced scriptPubKey with a commitment to that script.

Simple example

A node operator is checking BIP 18 hashScriptCheck. A near match or a block before activation would use legacy script processing. The model attempted to describe data and executable policy more explicitly while remaining interpretable by legacy software through the familiar HASH160 template.

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.
Node:
A computer running Bitcoin software that checks data and communicates with other peers.

The proposed three-part model

dataSig replaced scriptSig with push-only data, its final element was the scriptCheck, and hashScriptCheck replaced scriptPubKey with a commitment to that script. The model attempted to describe data and executable policy more explicitly while remaining interpretable by legacy software through the familiar HASH160 template.

Exact output encoding

The committed output was required to match OP_HASH160, a 20-byte hash push and OP_EQUAL exactly. A near match or a block before activation would use legacy script processing. Exact template recognition is consensus-sensitive: accepting extra opcodes or non-minimal lengths would change which validation branch runs.

Input validation steps

The dataSig had to contain pushes only, the final scriptCheck had to hash to the output commitment, and execution with the earlier data elements preloaded had to finish successfully with true on top. Each step creates a distinct rejection reason useful for test vectors and incident diagnosis.

BIP 18 hashScriptCheck technical diagram
Input validation steps: the fields, validation boundary and operational evidence that implementations need to agree.

Static sigop accounting

CHECKSIG operations counted individually, small preceded CHECKMULTISIG constructions counted by their explicit key number, and other CHECKMULTISIG cases counted as twenty. Static counting bounded block verification cost even when branches were not executed. Template and pool software needed the same conservative interpretation.

Compatibility and signalling

The proposal described non-standard behaviour for old relay nodes, permissive old-node block interpretation, coinbase signalling and a coordinated activation threshold. That history shows why a hash-equality outer script did not by itself make the inner spending rule active for all validators.

Relationship to deployed P2SH

BIP 18 stated that it was protocol-identical to BIP 16 while framing and deprecating the legacy fields differently. Production Bitcoin documentation normally uses BIP 16 terminology: scriptSig, redeem script and P2SH scriptPubKey. Mixing the alternate names into current runbooks can obscure what deployed software actually exposes.

How specialists test it

Developers test the proposal with made-up data on an isolated test network. They check normal cases and deliberately invalid cases. Different implementations should reach the same result before anyone relies on the proposal.

Frequently asked questions

What is the main point of BIP 18 hashScriptCheck?

BIP 18 hashScriptCheck: dataSig replaced scriptSig with push-only data, its final element was the scriptCheck, and hashScriptCheck replaced scriptPubKey with a commitment to that script.

For BIP 18 hashScriptCheck, what should a beginner know about the proposed three-part model?

dataSig replaced scriptSig with push-only data, its final element was the scriptCheck, and hashScriptCheck replaced scriptPubKey with a commitment to that script.

For BIP 18 hashScriptCheck, what should a beginner know about exact output encoding?

The committed output was required to match OP_HASH160, a 20-byte hash push and OP_EQUAL exactly.

For BIP 18 hashScriptCheck, what should a beginner know about input validation steps?

The dataSig had to contain pushes only, the final scriptCheck had to hash to the output commitment, and execution with the earlier data elements preloaded had to finish successfully with true on top.

Conclusion

BIP 18 offers a precise historical vocabulary for the P2SH transition, including resource accounting and compatibility. Current operations should validate the deployed BIP 16 behaviour and use BIP 18 only to understand the design record.

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