BIP 65 CHECKLOCKTIMEVERIFY explained: understand absolute time locks, Script execution, transaction locktime rules and miner validation duties.
TL;DR
CHECKLOCKTIMEVERIFY, usually written CLTV, lets a Bitcoin Script require that the spending transaction has reached a specified absolute block height or time. Values below 500,000,000 are interpreted as block heights. At the same time, values at or above that boundary represent Unix time under Bitcoin locktime rules.
CLTV compares its operand with the transaction nLockTime and fails if the transaction locktime is too early. The opcode reads the top stack item as a script number, rejects a negative value and leaves the item on the stack for a later opcode such as DROP.
BIP 65 CHECKLOCKTIMEVERIFY in simple English
BIP 65 CHECKLOCKTIMEVERIFY: CHECKLOCKTIMEVERIFY, usually written CLTV, lets a Bitcoin Script require that the spending transaction has reached a specified absolute block height or time.
Simple example
A node operator is checking BIP 65 CHECKLOCKTIMEVERIFY. Before BIP 65, nLockTime could delay an entire transaction but Script could not reliably make that delay part of an output condition.
Key terms in plain English
- BIP:
- Bitcoin Improvement Proposal: a document that suggests or explains a change to Bitcoin. A BIP number does not mean the idea is active.
- Bitcoin Core:
- Widely used Bitcoin software. It can check blocks and transactions and provide wallet, network and operator tools.
- Consensus:
- The shared rules that Bitcoin or another network uses to decide whether blocks and transactions are valid.
- Node:
- A computer running network software that checks data and talks to other computers on the network.
- ASIC:
- A computer built to do one specialised job. A mining ASIC is designed for a particular proof-of-work algorithm.
What CHECKLOCKTIMEVERIFY does
CHECKLOCKTIMEVERIFY, usually written CLTV, lets a Bitcoin Script require that the spending transaction has reached a specified absolute block height or time. Before BIP 65, nLockTime could delay an entire transaction but Script could not reliably make that delay part of an output condition. CLTV turns the stack value into an enforceable spending constraint.
Start with the validating node, because the ASIC only hashes the candidate header it receives. Record the node release and the pool component that assembled the block. If those facts are unknown, the operator cannot show which rules were actually applied before electricity was committed to the work.
Height locks and time locks
Values below 500,000,000 are interpreted as block heights. At the same time, values at or above that boundary represent Unix time under Bitcoin locktime rules. The script operand and transaction nLockTime must use the same type. Operators should never convert between height and timestamp casually because a type mismatch makes the spend fail even when both numbers appear mature.
Treat status dashboards as observations, not as the source of truth. Compare them with an independently operated node and retain the raw deployment or template response. Period boundaries, chain reorganisations and cached pool pages can otherwise make a correct-looking percentage describe the wrong state.
Interaction with nLockTime and sequence
CLTV compares its operand with the transaction nLockTime and fails if the transaction locktime is too early. The input sequence must also be non-final, otherwise nLockTime is disabled for that input. CLTV does not itself delay block validation by sleeping or counting. Nodes evaluate deterministic fields against the current chain context.
Build the failure response before the boundary arrives. Define which rejection messages trigger an alert, who can pause a template source and how failover is prevented from returning miners to the same faulty validation stack. A second hostname is not independent when both endpoints share one node.
Script execution details
The opcode reads the top stack item as a script number, rejects a negative value and leaves the item on the stack for a later opcode such as DROP. It does not verify a signature or choose a recovery key. A typical contract combines CLTV with branches and signature checks so one key can spend now while another path becomes available later.
Separate readiness, signalling and enforcement in the operating log. Readiness is a claim about software and process, signalling is data carried by blocks, and enforcement is a validation result. Combining them into a single supported or unsupported label hides the point at which revenue is actually at risk.
Uses in recovery and payment protocols
Absolute locks can support escrow timeouts, refund paths, payment channels and recovery designs. The calendar promise is only as strong as the full script and key custody. A height target gives predictable blocks but uncertain wall-clock time. A timestamp target follows median-time-past rules rather than a miner choosing any arbitrary clock value.
Map responsibility across the full path: validating node, template server, pool protocol, proxy, firmware and ASIC. For each layer, state what it can alter and what it merely relays. This prevents a version-bit setting in firmware from being mistaken for complete consensus-rule support. Relate that responsibility map to the pool and job-control boundary in our Stratum V2 guide.
Miner and node responsibility
A miner must validate CLTV spends under the active consensus rules before placing them in a template. A transaction can sit outside the mempool until mature or be rejected for a script failure. ASIC hardware does not perform this judgement. The validating node and template builder must agree, including every failover path, or a solved block can be invalid.
Test the primary and failover paths with the same checks. Compare chain tip, chainwork, deployment state, required rules and template age, then save the result with a timestamp. The process should be repeatable by another operator without relying on an undocumented pool conversation.
Safe verification procedure
On regtest, create scripts with height and timestamp CLTV branches, then test before and after maturity. Include negative, mismatched-type and final-sequence cases. Use testmempoolaccept and block proposal validation, not just a wallet display. Record the exact chain height, median time past, raw transaction and node release so the result is reproducible.
Turn the conclusion into a business decision. State which chain and settlement venues the operation intends to serve, the maximum acceptable stale-block exposure and the point at which mining pauses. This connects protocol evidence to electricity cost, pool revenue and payout finality.
Operator decision record
A concise decision record for BIP 65 CHECKLOCKTIMEVERIFY should name the source documents, their dates, the node release tested, the responsible pool or template provider and the exact trigger for action. Include screenshots or machine-readable output for the deployment state. But keep the raw node response as the stronger evidence.
State whether a change affects policy, block construction or consensus validity, because those layers have different failure costs.
Run the check on every production and failover path. Confirm that monitoring alerts on stale templates, unexpected chain tips, rejected proposals and a rise in stale shares. Keep rollback instructions for node and pool configuration. But do not roll back across an active consensus boundary without understanding the rules the older release enforces.
If the evidence conflicts, pause the affected path and investigate before committing more electricity to uncertain work.
For related background, read our plain-English BIP-110 guide and technical BIP-110 review. Those articles use a modern proposal to show why signalling, activation, template construction and accepted chain history must be examined separately.
Conclusion
Bip 65 checklocktimeverify is best understood as a defined interaction between validating software, mining infrastructure and economic acceptance. The safest operator does not infer consensus from a dashboard percentage or a pool slogan. They verify the rule source, the activation boundary, the template fields and the chain their payouts ultimately settle on. That discipline reduces the chance of hashing an invalid or commercially unwanted block.
Frequently asked questions
What is the main point of BIP 65 CHECKLOCKTIMEVERIFY?
BIP 65 CHECKLOCKTIMEVERIFY: CHECKLOCKTIMEVERIFY, usually written CLTV, lets a Bitcoin Script require that the spending transaction has reached a specified absolute block height or time.
For BIP 65 CHECKLOCKTIMEVERIFY, what should a beginner know about what CHECKLOCKTIMEVERIFY does?
CHECKLOCKTIMEVERIFY, usually written CLTV, lets a Bitcoin Script require that the spending transaction has reached a specified absolute block height or time.
For BIP 65 CHECKLOCKTIMEVERIFY, what should a beginner know about height locks and time locks?
Values below 500,000,000 are interpreted as block heights. At the same time, values at or above that boundary represent Unix time under Bitcoin locktime rules.
For BIP 65 CHECKLOCKTIMEVERIFY, what should a beginner know about interaction with nLockTime and sequence?
CLTV compares its operand with the transaction nLockTime and fails if the transaction locktime is too early.
Primary sources
Primary specifications are living technical records. Check their current status and changelog before using this article for a production activation decision.
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.