summaryrefslogtreecommitdiff
path: root/59/e7bf2d963b7d57c2b8345be725481060a18746
blob: 676c8edb3d17fb77b53d92577dc8bf85dfaf60d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
Return-Path: <jl2012@xbt.hk>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 1FFE27AE
	for <bitcoin-dev@lists.linuxfoundation.org>;
	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 <bitcoin-dev@lists.linuxfoundation.org>;
	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 <jl2012@xbt.hk>) id 1aw1Hp-002Gxe-FQ
	for bitcoin-dev@lists.linuxfoundation.org;
	Fri, 29 Apr 2016 01:48:21 -0400
From: Johnson Lau <jl2012@xbt.hk>
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: <D35A2482-CC78-4423-BD7B-EA3EEE1AC732@xbt.hk>
To: bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
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 <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=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--