<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <blockquote type="cite">
      <pre wrap="">RE: delaying EVAL rollout:  I could live with rolling out just BIP 11
(up-to-3-signature-CHECKMULTISIG as 'standard' transactions) and
delaying EVAL rollout on the main network, but I worry that will just
encourage people to delay thoroughly reviewing/testing for a couple of
months, and we'll be right back here at the beginning of March.</pre>
    </blockquote>
    <br>
    How about releasing it on testnet first? If you want "less smart"
    people such as myself to help test, well I don't think I would get
    anywhere if I tried to abstractly reason about every possibility.
    Low-level testing is certainly important, but for me "thorough
    testing" requires an actual network of nodes (running different
    clients) and applications capable of creating and verifying real
    OP_EVAL transactions.<br>
    <br>
    My suggestion would be: Deploy OP_EVAL on testnet quickly, let's
    build some real-life applications and if it works well, <i>then </i>let's
    pull the trigger for mainnet. If some issues or improvements arise,
    we'll have a chance to adjust it and try again.<br>
    <br>
    I don't think this is too conservative or paranoid. I think this is
    a textbook use case for testnet.<br>
    <br>
    <br>
    On 12/29/2011 7:00 PM, Gavin Andresen wrote:
    <blockquote
cite="mid:CABsx9T1Hu7Yg-gWUZsRirpNjzYayySJvaVihKGnuntF2rBdmBA@mail.gmail.com"
      type="cite">
      <pre wrap="">RE: preventing OP_EVAL from executing the result of calculations:

</pre>
      <blockquote type="cite">
        <pre wrap="">This is not adequate: &lt;data&gt; OP_SHA256 OP_EVAL runs random code that is more&gt; than 5 bytes.
</pre>
      </blockquote>
      <pre wrap="">Good point, the rule should be "OP_EVAL shall fail if asked to execute
8 or fewer bytes."

RE: this minor disadvantage:

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">&nbsp;OP_EVALs are not executed, and so the code associated with them does
not have to be part of the transaction, if they are in the
non-executed branch of an OP_IF. That could be good for privacy, and
could be good for reducing block-chain size.
</pre>
        </blockquote>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">I don't understand the above paragraph.
</pre>
      </blockquote>
      <pre wrap="">
It is the "Either This or That can redeem" case that motivated me to
allow 2-deep EVAL recursion.

Start with the most straightforward code for doing "this or that" (in
pseudocode):

scriptSig:  &lt;sigs&gt; &lt;either the code for This or the code for That&gt;
scriptPuKey:
  IF &lt;hash of code&gt; EQUALS hash of This or hash of That:
    EVAL
  ELSE
    fail validation
  ENDIF

That can be done with CODESEPARATOR/CODEHASH.

But if you want to then bundle that up so the scriptPubKey is a
standard 'pay to script', you get:

scriptSig:  &lt;sigs&gt; &lt;either the code for This or the code for That&gt;
&lt;serialized IF... code from above&gt;
scriptPubKey:  ... standard DUP HASH160 &lt;&gt; EQUALVERIFY EVAL

To be backwards compatible with old clients the scriptSig would have to be:

&lt;hash1&gt; &lt;hash2&gt; &lt;sigs&gt; CODESEPARATOR this_or_that_code
 CODEHASH
 CODESEPARATOR
 IF &lt;hash of code&gt; does not equal hash2:
   fail verification
 ENDIF

That could only be done if the definition of CODEHASH was modified to
hash only the stuff between CODESEPARATORS instead of hashing from
CODESEPARATOR to the end of the scriptSig.

RE: static analysis:

</pre>
      <blockquote type="cite">
        <pre wrap="">Yes, but maybe there is other static analysis miners may want to do. &nbsp;I
can't imagine every scenario.
</pre>
      </blockquote>
      <pre wrap="">
The vast majority of miners are "discouraging" (not relaying or
putting into blocks) anything besides 'standard' transaction types.

Until somebody smarter than me (like Russell) has done a deep analysis
of Script and all of its opcodes, I don't think that should change.
The standard transaction types are easy to reason about, and the
standard types extended with OP_EVAL are also easy to reason about--
you can template-match them to find out how many ECDSA operations a
CHECKMULTISIG will do, etc.

Again, in practice, I don't think EVAL as proposed is a danger.

RE: delaying EVAL rollout:  I could live with rolling out just BIP 11
(up-to-3-signature-CHECKMULTISIG as 'standard' transactions) and
delaying EVAL rollout on the main network, but I worry that will just
encourage people to delay thoroughly reviewing/testing for a couple of
months, and we'll be right back here at the beginning of March.

</pre>
    </blockquote>
    <br>
  </body>
</html>