HomenieuwsBitcoinBitcoin nLockTime delays a transaction; CLTV constrains a spending path

Bitcoin nLockTime delays a transaction; CLTV constrains a spending path

Cryptofocus bron in google
Bybit - sponsored
Ontvang nu een welkomstbonus bij Bybit, maar liefst 30 USDC!

Bitcoin’s nLockTime field delays when a particular transaction can be mined. To enforce a time condition on a spending path itself, a script can use CHECKLOCKTIMEVERIFY, usually called CLTV. The difference becomes important when another signed transaction could spend the same coins without the original delay.

What you need to know
nLockTime places a time or block-height condition on a transaction.
A different signed transaction may spend the same output without that delay.
CLTV compares a script condition with the spending transaction's nLockTime.
A script can offer an immediate cooperative path and a delayed recovery path.

The distinction appears in the motivation for BIP65, the CLTV specification. A pre-signed transaction carrying nLockTime can demonstrate that a future spend is possible. On its own, it cannot establish that an earlier spend is impossible: another valid signature may exist for a different transaction spending the output. The field describes that transaction’s eligibility, rather than an unconditional promise about every possible spend of those coins.

What CLTV actually compares

When an executed script reaches CLTV, the instruction checks the value supplied on the script stack against the transaction’s nLockTime. The specification rejects a negative argument, a missing argument, a height-versus-timestamp type mismatch, or a script argument greater than the transaction’s locktime. It also rejects the final input sequence value 0xffffffff. Meeting just the apparent date in a wallet display therefore does not establish that this script path will validate.

For a hypothetical height-based path, suppose the script requires height 950,000 and a spending transaction sets nLockTime to 949,999. That path fails the comparison even if someone broadcasts the transaction later. Raising the transaction’s field to meet the script’s requirement addresses that comparison; the transaction must still meet the remaining validation and finality conditions. This is a protocol example, not a ready-to-use wallet command.

Lees ook:  Coinbase-premie waarschuwt bitcoinbelegger voor dunne vraag

A recovery deadline can belong to one branch

BIP65’s escrow example gives two cooperating participants an immediate way to spend together. A separate branch becomes available after the specified delay and allows a third participant to cooperate with either original participant. The delay applies to that recovery branch. It does not prevent the two original participants from using their cooperative branch earlier.

That structure is useful when reading a claim that funds are locked until a date. The claim needs to identify the spending conditions: a delayed recovery route can coexist with an earlier cooperative route. A displayed locktime alone omits which branch is being used and who can satisfy it. Our explanation of block-based waiting periods covers the separate question of how a waiting interval relates to clock time.

Partnerdeal

Bybit - Welkomstbonus 30 USDC!

Ontvang nu een welkomstbonus bij Bybit, maar liefst 30 USDC!.

Lees hier de voorwaarden
Nu naar Bybit
Voorkeur cryptofocus google nieuws
Lotte Herkens
Lotte Herkens
Lotte Herkens schrijft over crypto alsof het om geld gaat dat je morgen echt nodig hebt. Ze volgt bitcoin en altcoins al jaren, maar wordt pas enthousiast als er data, adoptie of beleid achter zit. Haar stukken zijn kort, scherp en praktisch: wat is er gebeurd, waarom boeit het, en wat kan het betekenen voor je portfolio? Ze heeft een zwak voor on-chain trends, macro-cijfers en alles wat schuurt tussen regelgeving en innovatie. Als ze niet schrijft, zit ze vaak met een koffie in de trein, podcasts te luisteren, of maakt ze lange wandelingen om een verhaal “recht” te krijgen. Lotte is nuchter, nieuwsgierig en allergisch voor hype. Ze wil dat lezers snappen wat er speelt — zonder dat het voelt alsof je een whitepaper moet doorploegen.
Lees ook