Timelocks
Terms used in this lesson
- CLTV
- CheckLockTimeVerify: a Bitcoin Script operation that enforces an absolute time or block-height condition.
- CSV
- CheckSequenceVerify: a Bitcoin Script operation that enforces a relative delay after an earlier output confirms.
- BIP68
- The consensus rule that gives version-2 transaction sequence fields relative block-height or relative-time meaning.
- BIP65
- The Bitcoin Improvement Proposal that introduced CHECKLOCKTIMEVERIFY for absolute height or time requirements.
- CHECKLOCKTIMEVERIFY
- The full name of CLTV, which checks an absolute height or time requirement.
- BIP112
- The Bitcoin Improvement Proposal that introduced CHECKSEQUENCEVERIFY for relative-delay requirements.
- CHECKSEQUENCEVERIFY
- The full name of CSV, which checks a relative height or time requirement.
- MTP
- Median Time Past: the median timestamp of the previous 11 blocks, used by Bitcoin for time-based lock evaluation.
- Proof-of-work target
- The maximum header-hash value accepted for a block; lowering it makes valid hashes harder to find.
nLockTime, sequence, CLTV, and CSV constrain when transactions or spending paths become valid.
Loading lesson visuals...
Learn the idea
A timelock restricts when a transaction or input may become valid. BIP65 introduced CHECKLOCKTIMEVERIFY, or CLTV, for absolute requirements. BIP112 introduced CHECKSEQUENCEVERIFY, or CSV, for relative requirements. nLockTime is a transaction-level absolute height or time used with nonfinal sequence values. Relative locktime uses input sequence under BIP68. Median Time Past, or MTP, is the median timestamp of the previous 11 blocks and supplies the chain time used by time-based locks.
Choose absolute or relative time
Absolute locks target a specific block height or timestamp. Relative locks target an age after the prior output confirms.
Inspect every idea above to open it.
Expiration only removes one validity barrier. Someone must still construct, authorize, broadcast, relay, and mine a valid transaction.
The questions unlock after every required learning activity
Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.