Subject: Re: [Bitcoin-development] [BIP draft] CHECKLOCKTIMEVERIFY - Prevent a txout from being spent until an expiration time

From: Gregory Maxwell <[email-masked]>
Date: Fri, 3 Oct 2014 09:17:48 -0700

On Fri, Oct 3, 2014 at 7:28 AM, Matt Whitlock <[email-masked]> wrote:
> Is there a reason why we can't have the new opcode simply replace the top stack item with the block height of the txout being redeemed?

This would not be soft-forking compatible.

It also would be unsafe in that it would result in transactions which
once mined could not be restored in a reorg through no fault of the
participants, which makes the coins less fungible and differently safe
to accept. It risks creating weird pressures around immediate block
admission since a one additional block delay could forever censor such
a transaction (E.g. increases the power of single miners to censor or
steal). Avoiding this is a conscious decision in Bitcoin and also part
of the justification for the 100 block maturity of newly generated
coins.

It also would require violating the script/transaction/block layering
more substantially, complicating implementations, and making the
validity of a script no longer a deterministic pure function of the
transaction.

Avoiding these issues is a conscious design in OP_CHECKLOCKTIMEVERIFY.
I would strenuously oppose a proposal which failed in any of these
respects.

> Then arbitrary logic could be implemented, including "output cannot be spent until a certain time" and also "output can ONLY be spent until a certain time," as well as complex logic with alternative key groups with differing time constraints.

You can already achieve the not spendable after logic with a
cancellation spend that moves the coin in the usual way. (Which
doesn't even require the participant be online, with the help of some
network service to queue unlocked transactions).

> OP_CHECKLOCKTIMEVERIFY, as conceived, seems too limited, IMHO.

It is intentionally so, and yet it covers the intended use cases;
including ones with alternative key groups, they are just not
exclusive.