[Bitcoin-development] CLTV opcode allocation; long-term plans?

Peter Todd pete at petertodd.org
Thu May 7 17:17:32 UTC 2015


On Thu, May 07, 2015 at 11:05:47AM +0930, Rusty Russell wrote:
> Peter Todd <pete at petertodd.org> writes:
> > That said, if people have strong feelings about this, I would be willing
> > to make OP_CLTV work as follows:
> >
> >     <nLockTime> 1 OP_CLTV
> >
> > Where the 1 selects absolute mode, and all others act as OP_NOP's. A
> > future relative CLTV could then be a future soft-fork implemented as
> > follows:
> >
> >     <relative nLockTime> 2 OP_CLTV
> 
> Mildly prefer to put that the other way around.
> 
> ie. the OP_NOP1 becomes OP_EXTENSION_PREFIX, the next op defines which
> extended opcode it is (must be a push).

There's no good way to implement that option - when the OP_NOPx is
executed all that's available to it without a lot of complex work is
what's already been pushed to the stack, not what will be pushed to the
stack in the future.

-- 
'peter'[:-1]@petertodd.org
000000000000000002761482983864328320badf24d137101fab9a5861a59d30
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 650 bytes
Desc: Digital signature
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150507/b2acc7b2/attachment.sig>


More information about the bitcoin-dev mailing list