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 4656371 for ; Thu, 3 Nov 2016 04:20:10 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 637981A6 for ; Thu, 3 Nov 2016 04:20:09 +0000 (UTC) Received: by mail-qk0-f174.google.com with SMTP id o68so43236127qkf.3 for ; Wed, 02 Nov 2016 21:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blockstream-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dpdNgAfKamFjmVKL2WGNI/vvzdxeJTsvElRZfe5+PLc=; b=uRkSnOMKEGsIelxXGGibgKKAUT4M4e67PpzFljYIO7yc9BwsFdSsiwkSS3UXI6Q1so RQQXzh1zMTI4in7Zde4wlRPN/H8DJ8wTc1Kn+N6Xvd5gBh2m4Xh9u33fnmx2wsZhxVJY uFzbM7VNKb+QKwnsaX8AZEL+ddvehy5RpwFC+JZb1SvRsUVkdF4KtoCspFjikdgyVflh TxES5hVT5xvYBps+DYqOJLeUhIl+nP3DFwhENCrqywItNJ/Xx0R+VOq+rt/monjDWfli MqziP0D+w1AS26hLGQ2auyD7qnU4g6DHwcfFOS7FF6QgAYBz3YxmYXp9T5txs/DEgkwA 04Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dpdNgAfKamFjmVKL2WGNI/vvzdxeJTsvElRZfe5+PLc=; b=lx3bSK9UzJ3EjC7+RRcCtfgFV9Q8RdkkQIjlDdu25EPp8uvVr0Yf6u7qKoybCyWAAe fECCA3rZFawcrsQmKOctcwPqBActv86tSCRJ1ZTwW1ZpvBJ/qnUq18Z7CtENqcyHZ6wn COwuFB2RrWlAbMHep360AjGNd/NMjfruKrledtbE+f5W6ePfBz1XZ32zz6hkGxs0pV+X LHdtQq38+iSg8LxB1tYYhB/1pHHB8AJ5ES4SBo6CFCQnF3kQz7qyYIOI9kjlK0RocQnX MgCMPlDQA92klMzn96lB5mj0lzkEwb02bWcn552uIS+EPGyvucHrW2/9H/izICDgiPI1 B24Q== X-Gm-Message-State: ABUngvdY4Jxm3AXK/X9MzBm+v6LCTQOLTcnUrtXUo2WpESzNamabP8LUSua/BBCirTqIIiVVsJv8Y4b9k0QOCMPE X-Received: by 10.55.221.29 with SMTP id n29mr6891221qki.114.1478146808545; Wed, 02 Nov 2016 21:20:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.164.195 with HTTP; Wed, 2 Nov 2016 21:19:48 -0700 (PDT) In-Reply-To: References: From: "Russell O'Connor" Date: Thu, 3 Nov 2016 00:19:48 -0400 Message-ID: To: Johnson Lau Content-Type: multipart/alternative; boundary=001a1149d3a4731aa005405ddf96 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM 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:28:04 +0000 Cc: bitcoin-dev 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 04:20:10 -0000 --001a1149d3a4731aa005405ddf96 Content-Type: text/plain; charset=UTF-8 Right. There are minor trade-offs to be made with regards to that design point of OP_CHECKSIGFROMSTACKVERIFY. Fortunately this covenant construction isn't sensitive to that choice and can be made to work with either implementation of OP_CHECKSIGFROMSTACKVERIFY. On Wed, Nov 2, 2016 at 11:35 PM, Johnson Lau wrote: > 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 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 > > > --001a1149d3a4731aa005405ddf96 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Right.=C2=A0 There are minor trade-offs to be made with re= gards to that design point of OP_CHECKSIGFROMSTACKVERIFY.=C2=A0 Fortun= ately this covenant construction isn't sensitive to that choice and can= be made to work with either implementation of OP_CHECKSIGFROMSTACKVER= IFY.

On W= ed, Nov 2, 2016 at 11:35 PM, Johnson Lau <jl2012@xbt.hk> wrote:<= br>
Interesting. I have implemented=C2=A0OP_CHECK= SIGFROMSTACKVERIFY 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 shou= ld be more flexible as not every system are using double-SHA256
<= br>


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

Hi all,
It is possible to implement covenants using two script extensions: OP_= CAT and OP_CHECKSIGFROMSTACKVERIFY.=C2=A0 Both of these op codes are alread= y available in the Elements Alpha sidechain, so it is possible to construct= covenants in Elements Alpha today.=C2=A0 I have detailed how the construct= ion works in a blog post at <https://blockstream.= com/2016/11/02/covenants-in-elements-alpha.html>.=C2=A0 As= an example, I've constructed scripts for the Moeser-Eyal-Sirer vault.<= br>
I'm interested in collecting and implementing other useful coven= ants, so if people have ideas, please post them.

If there are any qu= estions, I'd be happy to answer.=C2=A0

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


--001a1149d3a4731aa005405ddf96--