timeouts

A timeout on a transaction implies that it can not be transmitted before the time limit A timeout on a UTXO implies that it can not be spent before the time limit

CLTV is OP_CHECKLOCKTIMEVERIFY

See Handout and Example for more detail

Examples

Example of use (from here)

Using OP_CHECKLOCKTIMEVERIFY it is possible to make funds provably unspendable until a certain point in the future.

scriptPubKey: <expiry time> OP_CHECKLOCKTIMEVERIFY OP_DROP
              OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY
              OP_CHECKSIG

scriptSig: <sig> <pubKey>
Handout

There are several timeout features in the Bitcoin protocol, implemented as operators in Bitcoin's scrypt language.

Here we will consider OP_CHECKLOCKTIMEVERIFY, implemented as BIP: 65.

This description of OP_CHECKLOCKTIMEVERIFY, or CLTV is taken mostly from the Bitcoin wiki and the initial CLTV proposal as an improvement to the Bitcoin protocol BIP: 65.

CLTV marks a transaction as invalid if the top stack item is greater than the transaction's nLockTime field, otherwise script evaluation continues as though an OP_NOP was executed. Transaction is also invalid if

  1. the stack is empty; or
  2. the top stack item is negative; or
  3. the top stack item is greater than or equal to 500000000 while the transaction's nLockTime field is less than 500000000, or vice versa; or
  4. the input's nSequence field is equal to 0xffffffff. The precise semantics are described in BIP 0065.