Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 1FFE27AE for ; Fri, 29 Apr 2016 05:48:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from s47.web-hosting.com (s47.web-hosting.com [199.188.200.16]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 191A412F for ; Fri, 29 Apr 2016 05:48:22 +0000 (UTC) Received: from [137.189.134.42] (port=52509 helo=[192.168.0.105]) by server47.web-hosting.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.86_1) (envelope-from ) id 1aw1Hp-002Gxe-FQ for bitcoin-dev@lists.linuxfoundation.org; Fri, 29 Apr 2016 01:48:21 -0400 From: Johnson Lau X-Pgp-Agent: GPGMail 2.6b2 Content-Type: multipart/signed; boundary="Apple-Mail=_1826333F-8FDD-4671-AF1E-5E0B105BA7B2"; protocol="application/pgp-signature"; micalg=pgp-sha512 Date: Fri, 29 Apr 2016 07:48:10 +0200 Message-Id: To: bitcoin-dev Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server47.web-hosting.com X-AntiAbuse: Original Domain - lists.linuxfoundation.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - xbt.hk X-Get-Message-Sender-Via: server47.web-hosting.com: authenticated_id: jl2012@xbt.hk X-Authenticated-Sender: server47.web-hosting.com: jl2012@xbt.hk X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Fri, 29 Apr 2016 06:56:11 +0000 Subject: [bitcoin-dev] BIP draft: Scripting System in Merkelized Abstract Syntax Tree X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Development Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2016 05:48:24 -0000 --Apple-Mail=_1826333F-8FDD-4671-AF1E-5E0B105BA7B2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 h= ttps://github.com/jl2012/bips/blob/mastopcodes/bip-mastopcodes.mediawiki This BIP defines the scripting system in Merkelized Abstract Syntax Tree = (BIP114). It re-enables some of the previously disabled opcodes, = introduces new opcodes, and defines expandable opcodes for future = extension. It will: =E2=80=A2 re-enable CAT, SUBSTR, LEFT, RIGHT, INVERT, AND, OR, = XOR, LSHIFT, and RSHIFT; =E2=80=A2 introduce new opcodes: DUPTOALTSTACK, DUPFROMALTSTACK, = SWAPSTACK, SWAPCAT, and RESIZE; =E2=80=A2 define expandable opcodes for future softforks of = stack manipulating opcodes: EXPAND1 to EXPAND32. This BIP is based on the BIP114 MAST: = https://github.com/bitcoin/bips/blob/master/bip-0114.mediawiki Reference implementation, including the BIP9 logic and script tests, = could be found at https://github.com/jl2012/bitcoin/tree/segwit_mast . = This branch is rebased on top of the #7910 segwit PR. However, I have = not tested the BIP9 activation. The implementation of the re-enabled opcode are mostly taken from the = Elements Project. ------------- This BIP does not describe changes in CHECKSIG (e.g. new hash type, = Schnorr sig), which I think should be another BIP. I have also considered more radical changes. For example, make all = comparison opcode to be =E2=80=9CVERIFY=E2=80=9D type, and a script = passes if and only if the stack is exactly empty after evaluation. --Apple-Mail=_1826333F-8FDD-4671-AF1E-5E0B105BA7B2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQGcBAEBCgAGBQJXIvWiAAoJEO6eVSA0viTSAG8L/i6GJXq4Mpp4tWRvFFGaT+KS xXTaBFeMByKgmPbLIqy0HXaosyiMvOsXXdjcg2mNeJojBofy07mHQXgihw+KTZxp xijC6aFPuyF/lwghW+6xOlUD1wkT3T+GQIO26QNaA192Nup2SeJSJNxulmhmzp19 RMfenABN0DU54eE1lkf2wL6lI9T3ujq1gosLHuANsZrx/9AqimyyoRdFCJLIGyhk AE7DUN/Rd9aX5iCrwTthG5EI3aOxCvH3C+J1c+N1QQkGHs7nMR/n5FIukVZ2pO+S o8NXdWNkXfUVdpXedgDtEMVW8m/28BRGdqR5Hbt2D7aYbgzu5aon9Sp4AomamJCg cHc/7vnVcxXU1NXclBA2eXl7yNpdPXnyPMR55NKmkWduRqFjsi01NeQcKJLJGYim sc5pCqlEdUCGtSHdBtQ8oJbOjB2dayeuqicLd+2zrTVC6+W1MKdaRdnH/cBtjk9r rNP2HiEoBpbRKCVof1DdhHJksWaAYfT9DVZJan5pfA== =uZ3R -----END PGP SIGNATURE----- --Apple-Mail=_1826333F-8FDD-4671-AF1E-5E0B105BA7B2--