This guide explains BIP 115 anti-replay protection 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 115 proposed OP_CHECKBLOCKATHEIGHT, a soft-fork reinterpretation of OP_NOP5 that could make a transaction valid only on a chain containing a specified historical block. The intent was generic replay protection during a blockchain split.
- Why it matters: BIP 115 is a closed historical proposal for script-level chain anchoring. Its useful lesson is that replay protection needs deployed consensus semantics and complete operational support, not merely a transaction label.
- Current position: The BIP is Closed and the opcode is not deployed Bitcoin consensus; funds must not be sent to scripts that assume its proposed semantics.
BIP 115 anti-replay protection in simple English
BIP 115 anti-replay protection: When two chains share transaction and script history, a valid spend on one may also be valid on the other.
Simple example
A node operator is checking BIP 115 anti-replay protection. Replay protection introduces a chain-specific condition, but coordination, wallet labelling and adversarial transaction handling remain operational requirements.
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.
The replay problem
When two chains share transaction and script history, a valid spend on one may also be valid on the other. Users can unintentionally move assets on both. Replay protection introduces a chain-specific condition, but coordination, wallet labelling and adversarial transaction handling remain operational requirements.
Proposed opcode inputs
The stack provided a block height and a truncated block-hash value. The opcode checked that the active chain contained the matching block at that height, subject to encoding and depth rules. Minimal numeric encoding and maximum hash length were consensus-critical rejection conditions.
Depth boundary
The proposal only enforced commitments within 52,596 blocks of the spending context; deeper and negative values completed as a no-op under its defined rule. This bounded historical lookup but creates a sharp semantic boundary. Tests must cover exact depth edges and reorganisation effects.
Soft-fork deployment model
Reinterpreting a NOP can be a soft fork because older nodes treat it as no operation while upgraded nodes impose the extra condition. Activation would still require a defined coordination mechanism. Writing the BIP did not activate the rule, and an old node accepting a block would not prove upgraded validity.
Hash truncation and chain identity
Allowing up to 28 bytes balanced script size with collision resistance for the intended use. The commitment identified a particular chain history, not a brand, ticker or network name. Wallet interfaces would need to show which anchor and confirmation depth they were enforcing.
Closed status and safety
BIP 115 was not deployed. Experimental parsers belong on isolated networks, and wallets should reject or clearly quarantine unknown script assumptions. A bilateral agreement cannot make a consensus opcode active for Bitcoin or guarantee miners will enforce it.
Operational lessons
Replay protection should be designed before a split, use unambiguous chain context, define reorganisation and expiry behaviour, and be supported across wallets, signers, explorers and exchanges. Confirmation policy alone does not stop replay of an otherwise identical transaction. Build a version-pinned evidence pack on an isolated node.
Frequently asked questions
What is the main point of BIP 115 anti-replay protection?
BIP 115 anti-replay protection: When two chains share transaction and script history, a valid spend on one may also be valid on the other.
For BIP 115 anti-replay protection, what should a beginner know about the replay problem?
When two chains share transaction and script history, a valid spend on one may also be valid on the other.
For BIP 115 anti-replay protection, what should a beginner know about proposed opcode inputs?
The stack provided a block height and a truncated block-hash value.
For BIP 115 anti-replay protection, what should a beginner know about depth boundary?
The proposal only enforced commitments within 52,596 blocks of the spending context.
Conclusion
BIP 115 is a closed historical proposal for script-level chain anchoring. Its useful lesson is that replay protection needs deployed consensus semantics and complete operational support, not merely a transaction label.
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.
Join the ASIC Mining Discussion
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.
Membership helps us protect the discussion from spam and keep answers useful.