[Bitcoin-development] Alternative to OP_EVAL

theymos theymos at mm.st
Thu Dec 29 08:44:19 UTC 2011

On Thu, Dec 29, 2011, at 01:55 AM, roconnor at theorem.ca wrote:
> The number of operations executed is still bounded by the number of
> operations occurring in the script.  With the OP_EVAL proposal the
> script language becomes essentially Turing complete, with only an
> artificial limit on recursion depth preventing arbitrary computation
> and there is no way to know what code will run without executing it.

Even if OP_EVAL allowed infinite depth, you'd still need to explicitly
specify all operations performed, since there is no way of looping.

I think that something like OP_EVAL will eventually be used to improve
Script in a backward-compatible way (enable the disabled math ops, fix
bugs, etc.), so the mechanism might as well be used now. The only
advantage I see with OP_CODEHASH is that script ops won't need to be in
Script "strings".

More information about the bitcoin-dev mailing list