From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 23F9A305 for ; 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 ; 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 Content-Type: multipart/alternative; boundary="Apple-Mail=_9770579C-3E4F-411D-844F-5E38B2FBFB11" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Date: Thu, 3 Nov 2016 11:35:02 +0800 References: To: Russell O'Connor , bitcoin-dev In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 = > On 3 Nov 2016, at 01:30, Russell O'Connor via bitcoin-dev = > 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 = >. = 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 = > 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
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


On 3 Nov 2016, at 01:30, = Russell O'Connor via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:

Hi all,

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>.  As an example, I've constructed scripts for the = Moeser-Eyal-Sirer vault.

I'm interested in = collecting and implementing other useful covenants, so if people have = ideas, please post them.

If there are any = questions, I'd be happy to answer. 

-- =
Russell O'Connor
_______________________________________________
bitcoin-dev = mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev<= /a>

= --Apple-Mail=_9770579C-3E4F-411D-844F-5E38B2FBFB11--