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
130
131
132
133
134
135
136
137
138
139
|
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 23F9A305
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 3 Nov 2016 03:35:13 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from sender163-mail.zoho.com (sender163-mail.zoho.com
[74.201.84.163])
by smtp1.linuxfoundation.org (Postfix) with ESMTPS id B5C801BD
for <bitcoin-dev@lists.linuxfoundation.org>;
Thu, 3 Nov 2016 03:35:12 +0000 (UTC)
Received: from [10.8.8.2] (119246245241.ctinets.com [119.246.245.241]) by
mx.zohomail.com with SMTPS id 1478144104986567.953605067021;
Wed, 2 Nov 2016 20:35:04 -0700 (PDT)
From: Johnson Lau <jl2012@xbt.hk>
Content-Type: multipart/alternative;
boundary="Apple-Mail=_9770579C-3E4F-411D-844F-5E38B2FBFB11"
Message-Id: <D597A70E-663C-4D78-BCC4-5CB650376655@xbt.hk>
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
Date: Thu, 3 Nov 2016 11:35:02 +0800
References: <CAMZUoKkG0AqwsTE=opTcsD=xqWsoVxqPVCzFbcSz8zJT1wiFPg@mail.gmail.com>
To: Russell O'Connor <roconnor@blockstream.io>,
bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org>
In-Reply-To: <CAMZUoKkG0AqwsTE=opTcsD=xqWsoVxqPVCzFbcSz8zJT1wiFPg@mail.gmail.com>
X-Mailer: Apple Mail (2.3124)
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE,
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: Thu, 03 Nov 2016 04:27:56 +0000
Subject: Re: [bitcoin-dev] Implementing Covenants with
OP_CHECKSIGFROMSTACKVERIFY
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol 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: Thu, 03 Nov 2016 03:35:13 -0000
--Apple-Mail=_9770579C-3E4F-411D-844F-5E38B2FBFB11
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=us-ascii
Interesting. I have implemented OP_CHECKSIGFROMSTACKVERIFY in a =
different way from the Elements. Instead of hashing the data on stack, I =
directly put the 32 byte hash to the stack. This should be more flexible =
as not every system are using double-SHA256
https://github.com/jl2012/bitcoin/commits/mast_v3_master =
<https://github.com/jl2012/bitcoin/commits/mast_v3_master>
> On 3 Nov 2016, at 01:30, Russell O'Connor via bitcoin-dev =
<bitcoin-dev@lists.linuxfoundation.org =
<mailto:bitcoin-dev@lists.linuxfoundation.org>> wrote:
>=20
> Hi all,
>=20
> It is possible to implement covenants using two script extensions: =
OP_CAT and OP_CHECKSIGFROMSTACKVERIFY. Both of these op codes are =
already available in the Elements Alpha sidechain, so it is possible to =
construct covenants in Elements Alpha today. I have detailed how the =
construction works in a blog post at =
<https://blockstream.com/2016/11/02/covenants-in-elements-alpha.html =
<https://blockstream.com/2016/11/02/covenants-in-elements-alpha.html>>. =
As an example, I've constructed scripts for the Moeser-Eyal-Sirer vault.
>=20
> I'm interested in collecting and implementing other useful covenants, =
so if people have ideas, please post them.
>=20
> If there are any questions, I'd be happy to answer. =20
>=20
> --=20
> Russell O'Connor
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org =
<mailto:bitcoin-dev@lists.linuxfoundation.org>
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
--Apple-Mail=_9770579C-3E4F-411D-844F-5E38B2FBFB11
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=us-ascii
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dus-ascii"><meta http-equiv=3D"Content-Type" content=3D"text/html=
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div class=3D"">Interesting. I have =
implemented OP_CHECKSIGFROMSTACKVERIFY in a different way from the =
Elements. Instead of hashing the data on stack, I directly put the 32 =
byte hash to the stack. This should be more flexible as not every system =
are using double-SHA256</div><div class=3D""><br class=3D""></div><div =
class=3D""><a =
href=3D"https://github.com/jl2012/bitcoin/commits/mast_v3_master" =
class=3D"">https://github.com/jl2012/bitcoin/commits/mast_v3_master</a></d=
iv><div class=3D""><br class=3D""></div><br class=3D""><div><blockquote =
type=3D"cite" class=3D""><div class=3D"">On 3 Nov 2016, at 01:30, =
Russell O'Connor via bitcoin-dev <<a =
href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" =
class=3D"">bitcoin-dev@lists.linuxfoundation.org</a>> wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" =
class=3D"">Hi all,<br class=3D""><br class=3D"">It is possible to =
implement covenants using two script extensions: OP_CAT and =
OP_CHECKSIGFROMSTACKVERIFY. Both of these op codes are already =
available in the Elements Alpha sidechain, so it is possible to =
construct covenants in Elements Alpha today. I have detailed how =
the construction works in a blog post at <<a =
href=3D"https://blockstream.com/2016/11/02/covenants-in-elements-alpha.htm=
l" =
class=3D"">https://blockstream.com/2016/11/02/covenants-in-elements-alpha.=
html</a>>. As an example, I've constructed scripts for the =
Moeser-Eyal-Sirer vault.<br class=3D""><br class=3D"">I'm interested in =
collecting and implementing other useful covenants, so if people have =
ideas, please post them.<br class=3D""><br class=3D"">If there are any =
questions, I'd be happy to answer. <br class=3D""><br class=3D"">-- =
<br class=3D"">Russell O'Connor<br class=3D""></div>
_______________________________________________<br class=3D"">bitcoin-dev =
mailing list<br class=3D""><a =
href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" =
class=3D"">bitcoin-dev@lists.linuxfoundation.org</a><br class=3D""><a =
href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
class=3D"">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev<=
/a><br class=3D""></div></blockquote></div><br class=3D""></body></html>=
--Apple-Mail=_9770579C-3E4F-411D-844F-5E38B2FBFB11--
|