[Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

Jorge Timón jtimon at jtimon.cc
Mon May 4 11:24:44 UTC 2015

What I was describing was an attempt to fix a similar proposal by Mark
Friedenbach, but it didn't needed fixing: I was simply
misunderstanding it.
Mark's RCLTV is completely reorg safe, so there's no need for the 100
block restriction. It also keeps the script validation independent
from the utxo.
Here's is how it works:

The operator takes a relative_height parameter and it checks that the
nSequence of the input is lower than that parameter.

Additionally, a new check at the transaction level:

for (unsigned int i = 0; i < tx.vin.size(); i++) {
// ...
            if (coins->nHeight + tx.vin[i].nSequence < nSpendHeight)
                return state.Invalid(false, REJECT_INVALID,
// ...

Well, this is assuming that we're only using it with heights and not timestamps.
Mark, feel free to elaborate further.

More information about the bitcoin-dev mailing list