Skip to main content

Locktime

technical · blockchain

A transaction field or script condition that delays when a transaction or spending path becomes eligible for inclusion.

1.general

Locktime is a Bitcoin-style transaction feature that keeps a transaction non-final until a specified block height or time condition is satisfied. Related script opcodes can delay a particular spending path. These mechanisms support delayed settlement, refunds, and recovery paths.

2.technical

The nLockTime field is a 32-bit value. Values below 500,000,000 are interpreted as block heights; values at or above that threshold are time-based and evaluated against the chain's applicable median-time-past rule rather than a user's wall clock. If every input sequence is final (0xffffffff), transaction-level nLockTime is disabled.

3.use-case

Timelocks are important for payment channels, atomic swaps, escrow, and recovery transactions. They give honest participants a window to claim, refund, or dispute funds without trusting a counterparty.

4.comparison

Related mechanisms include CLTV for absolute timelocks inside scripts and CSV for relative timelocks based on how long an output has existed. These tools are more flexible than a transaction-level nLockTime alone.

Related terms

All terms and definitions may update as the Cryptionary improves.