summaryrefslogtreecommitdiff
path: root/37/00a19fe76973f7c137a32af32aa93a616eb35f
blob: 4f8a4b8c03441334a34dde170681bfcbd1449a19 (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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
Return-Path: <roconnor@blockstream.com>
Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 45B5DC000B
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 29 Jan 2022 17:14:57 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by smtp4.osuosl.org (Postfix) with ESMTP id 2613B4088B
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 29 Jan 2022 17:14:57 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: smtp4.osuosl.org (amavisd-new);
 dkim=pass (2048-bit key)
 header.d=blockstream-com.20210112.gappssmtp.com
Received: from smtp4.osuosl.org ([127.0.0.1])
 by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 38yFRAP1ZabN
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 29 Jan 2022 17:14:56 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.8.0
Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com
 [IPv6:2607:f8b0:4864:20::829])
 by smtp4.osuosl.org (Postfix) with ESMTPS id 4E67440889
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 29 Jan 2022 17:14:56 +0000 (UTC)
Received: by mail-qt1-x829.google.com with SMTP id y17so7848079qtx.9
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Sat, 29 Jan 2022 09:14:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=blockstream-com.20210112.gappssmtp.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=ERYL/RP5Z7fDhcvTs9TjmWwT+FSWx1VxYw4kYL0KM/4=;
 b=ewJzzVpKwUTuzrrLn1KwtQzCmnRuxAcX59eFn6Z6gRcbsrrA8FzEfKPe3T9ndE77Tj
 6k7ySf2vCA7g/5dQwK8XmhWBPNFVoK50e7SCd4QTLiRvKSy+TG9Z5MO3TVng2+YPdM4N
 bFYByr73GiCzPWZ+ig5sc/b2HaJTBPBJJKk8Q/cmlc39KPcecR3MgpYDayPYXHpe/DI+
 QL6k6wV10gbT5Y/3l+0alG0ks4GIZa2KAGGJKJVmv0MPqvmkehruSusZk8pTr2+PaXyQ
 CQ+OPVKvCuJRqaFlA4btJS/VIzlyB0bxAzvhXpx3T0CptIGKECIDlS6ADTphmyc8AHZd
 6biA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=ERYL/RP5Z7fDhcvTs9TjmWwT+FSWx1VxYw4kYL0KM/4=;
 b=TdBJRNr+zJFRPIpLef8CZ3wh4b4pCpDAFA0c3mSRGsSkUaHyfI/vc5LDA4cw/vbeSN
 SVub0r/wTMZLyspiP+nE+6ygZD3xi0DrtfbZ3cp0rfHjsb52DPE8UXMWDtb7E2ZYnpwA
 gSfTZNNB0PkxYoqkZN19ZJICY/gDCEAS+nd6EvVI4jbvkGfbWZkq/mYArkefGizpyDNl
 U8jTOPzgEjD1R+erOLnO1bFPB+QlokMiEaM85U0eQpnSgIGRe/psP9wSI5NQGJ1Kk9qS
 an5a/pwFIUROW+aWbsJr3XKMIQV57V0Nc7xfwiib1VamyPBOeBBEE2x95qD0ahDIjwkK
 fMBA==
X-Gm-Message-State: AOAM531FMjEi0QLyAikOIx7CBZKLReHW0wUopGYyTBUF4Z7KrvfEDJgF
 kYt6dl7531wXuu9CUOY8C1M7DBTdFT1+DE0bL15gtA==
X-Google-Smtp-Source: ABdhPJwMvqAH4i1JlLQ5GEW8/FA5lgTuEwjuIpwxiI4v6ONn4p9p+Gha/1DYlxzY5Er0J9HTzVn6o6mXCvq4XqrfPdE=
X-Received: by 2002:a05:622a:5ce:: with SMTP id
 d14mr9884890qtb.642.1643476495115; 
 Sat, 29 Jan 2022 09:14:55 -0800 (PST)
MIME-Version: 1.0
References: <CAMZUoK=pkZuovtifBzdqhoyegzG+9hRTFEc7fG9nZPDK4KbU3w@mail.gmail.com>
 <CAD5xwhhwqJ_AETAb3p_zUZmRX-Dzh8J9G984zwEs=KFsGN8aNQ@mail.gmail.com>
 <CAMZUoKmU1cwUAQaBv5m8oo8H3TWBvgsZ_OkQaMC0n0+3cpFtWg@mail.gmail.com>
 <CAPfvXfLr4n6RsS6VbEZR59=MRwAx41Crx88ko8-qnRXW4nFYGA@mail.gmail.com>
 <CAMZUoKkvoJs0WtN71A_qRSwToP4YnY707WdW3C-KJYGXsmkjSw@mail.gmail.com>
 <CAPfvXfLWtDvgJYwQCaxnww5jyQkqFsi6aG0OUxtp3Okx_ab7Hw@mail.gmail.com>
 <CAMZUoKkqEx5mh9Aq9XFc=7YPKmfObMzEipECFuWm4e3q_tVEEQ@mail.gmail.com>
 <CAD5xwhjHv2EGYb33p2MRS=VSz=ciGwAsiafX1yRHjxQEXfykSA@mail.gmail.com>
In-Reply-To: <CAD5xwhjHv2EGYb33p2MRS=VSz=ciGwAsiafX1yRHjxQEXfykSA@mail.gmail.com>
From: "Russell O'Connor" <roconnor@blockstream.com>
Date: Sat, 29 Jan 2022 12:14:43 -0500
Message-ID: <CAMZUoKki0M6jvgdtQLETa2fjYJkCqwWaj1k1WSSa=e8DJ8tPxA@mail.gmail.com>
To: Jeremy Rubin <j@rubin.io>
Content-Type: multipart/alternative; boundary="000000000000b042f005d6bbb006"
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] TXHASH + CHECKSIGFROMSTACKVERIFY in lieu of CTV
	and ANYPREVOUT
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
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: Sat, 29 Jan 2022 17:14:57 -0000

--000000000000b042f005d6bbb006
Content-Type: text/plain; charset="UTF-8"

The hash would normally also cover the hash flags in use, and would be
different in those two cases.

But yes, it seems at the last minute I did include a suggestion to disable
covering the flag themselves in the hash and appear to have accidentally
allowed for recursive covenants (a common occurrence when designing
opcodes).

On Sat, Jan 29, 2022 at 12:01 PM Jeremy Rubin <j@rubin.io> wrote:

>
>
>
>> Perhaps there is some misunderstanding.  TXHASH + CSFSV doesn't allow for
>> complex or recursive covenants.  Typically CAT is needed, at minimum, to
>> create those sorts of things.  TXHASH still amounts to deploying a
>> non-recursive covenant construction.
>>
>>
> This seems false to me.
>
> <Only hash a single input scriptpubkey> txhash <only hash a single output
> scriptpubkey> txhash equalverify
>
> Is that not a recursive covenant? With a little extra work you can also
> control for amounts and stuff.
>
>
>
>>

--000000000000b042f005d6bbb006
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div></div><div>The hash would normally also cover the has=
h flags in use, and would be different in those two cases.</div><div><br></=
div><div>But yes, it seems at the last minute I did include a suggestion to=
 disable covering the flag themselves in the hash and appear to have accide=
ntally allowed for recursive covenants (a common occurrence when designing =
opcodes).<br></div><div><br><div class=3D"gmail_quote"><div dir=3D"ltr" cla=
ss=3D"gmail_attr">On Sat, Jan 29, 2022 at 12:01 PM Jeremy Rubin &lt;<a href=
=3D"mailto:j@rubin.io">j@rubin.io</a>&gt; wrote:<br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex"><div dir=3D"auto"><div><div class=3D"gmail=
_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">=
<div class=3D"gmail_quote"><div></div></div></div></blockquote></div></div>=
<div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><div dir=3D"auto"><=
div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
><div dir=3D"ltr"><div class=3D"gmail_quote"><div><br></div><div>Perhaps th=
ere is some misunderstanding.=C2=A0 TXHASH=C2=A0+ CSFSV doesn&#39;t allow f=
or complex or recursive covenants.=C2=A0 Typically CAT is needed, at minimu=
m, to create those sorts of things.=C2=A0 TXHASH still amounts to deploying=
 a non-recursive covenant construction.<br></div><div><br></div><div></div>=
</div></div></blockquote></div></div><div dir=3D"auto"><div class=3D"gmail_=
quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;=
border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><=
div class=3D"gmail_quote"><div></div></div></div></blockquote></div></div><=
div dir=3D"auto"><br></div><div dir=3D"auto">This seems false to me.=C2=A0<=
/div><div dir=3D"auto"><br></div><div dir=3D"auto">&lt;Only hash a single i=
nput scriptpubkey&gt; txhash &lt;only hash a single output scriptpubkey&gt;=
 txhash equalverify</div><div dir=3D"auto"><br></div><div dir=3D"auto">Is t=
hat not a recursive covenant? With a little extra work you can also control=
 for amounts and stuff.</div><div dir=3D"auto"><br></div><div dir=3D"auto">=
<br></div><div dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_quote"><=
div><br></div></div></div>
</blockquote></div></div></div>
</blockquote></div></div></div>

--000000000000b042f005d6bbb006--