On Thu, Jul 18, 2013 at 07:13:53AM -0400, Peter Todd wrote:
> Note that with OP_DEPTH we can remove the small chance of the payee
> vanishing and putting the funds in limbo:
> 
>     <height + n> OP_DEPTH OP_LESSTHAN
>     IF 2 PK1 PK2 CHECKMULTISIG
>     ELSE PK1 CHECKSIG
>     ENDIF
> 
> Though that shows how to implement OP_DEPTH as a true soft-fork we're
> probably best off doing it as part of a script v2 using the soft-fork
> mechanism I outlined before when talking about fidelity-bonded ledgers.
> (best to do MAST (merklized abstract syntax tree) support at the same
> time)

jl2012 pointed out we already have an OP_DEPTH instruction that returns
the number of items on the stack. In the future we should use the terms
OP_BLOCKHEIGHT, OP_TXOUTHEIGHT, OP_TXOUTDEPTH to talk about hypothetical
instructions that put the block height, confirmed txout height, and
confirmed txout depth on the stack. Thus the above example would now be:

     <height + n> BLOCKDEPTH LESSTHAN
     IF 2 <pk-payor> <pk-payee> CHECKMULTISIG
     ELSE <pk-payor> CHECKSIG
     ENDIF

-- 
'peter'[:-1]@petertodd.org
0000000000000013030f49fe3eed5e7f9388c4ecc237b7a847ca93255836bc3b

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development

Reply via email to