summaryrefslogtreecommitdiff
path: root/07/2c27558959ca7091a6a6dfe207f03607952f3a
blob: d5780e2724fb28d791d945986d76a6e0f4c64347 (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
Return-Path: <pieter.wuille@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id 9F5C11429
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 26 May 2019 17:54:22 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com
	[209.85.167.182])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 90C57A9
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 26 May 2019 17:54:21 +0000 (UTC)
Received: by mail-oi1-f182.google.com with SMTP id u64so10416322oib.1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sun, 26 May 2019 10:54:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=mime-version:references:in-reply-to:from:date:message-id:subject:to; 
	bh=0XhFa7ghePgXBp+rQ8mpR/fkicBEbJx28TZu3iSiJAM=;
	b=ft/bJPkm5j6vO73CPIPpmVfmyrRbyy9YSH33rhQ4UXbnnGE5kcQmcq8J/L9epPBnB3
	GVxIqiqusxTJN0iVllDroz+2Dr17kBgmgYEopV5CW0yiPdowCZxDfFT+Vd4lZVikj1zG
	yeWDm3MLUD13rEHzQ2fNr9gdU8BVNBGgC+2BZrHISSFvGBEFggHZ9uSn9NGu3ANaQsdD
	Z8g/R7mSCZvC/xcwevLv6R9b7tKx/Eo4aQv6FV5lTAH7YX0lFx9riupgELSbrg9m4r54
	zNNL/Ib7l+09L+ZbWXJmF8/rqcPYX8WhmVleEqSblyIgU1GnfTM9CcioBnn/00GpnJOw
	dfzg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:references:in-reply-to:from:date
	:message-id:subject:to;
	bh=0XhFa7ghePgXBp+rQ8mpR/fkicBEbJx28TZu3iSiJAM=;
	b=VLQBLKqYnMSGcyaA60XSeuGfNYYYUxRP0dhhHmbkG77gzHB/uJBWw5LVSYpWrZr3sI
	GtrYjbzA+L/RHgQCp+4yQaMVZVoH+/9PhHFpYpufB2Pjz5m+YicuoyNmgpxkDhOxMzKH
	Da3M5b0LBHKS4Q/ODgGoZaFSRgRpnrOXdKMpj/99FUMnEGB5nWkyqG06D8I3CGb1oy7E
	xDOmDn98Ez+Beznc/Ot9j9OKxdLfOR8uc38N/4Tb7YbzV27EVwz18SyXcJ3fEghrsBnY
	ww/Y8SzKbgahjHKLrrtR3WkM5YrEiL1Bv3QR+UBrDbGPFTBAN5CeUrdbRoJYu6865l/c
	+RmQ==
X-Gm-Message-State: APjAAAWosI+zqraIts3k9m3F9ZMQdZo6o9LlT4hX83689k+lyEAmbVlT
	g7SpC7U+rlt33muSBQbqLdBSwV1gXCUif2Zr8gQ=
X-Google-Smtp-Source: APXvYqyfyHbpK46WQq8d8qELRyFnPbhVjefPv/T3+menLaC9ZW0ohIvQE7WQJKyNUSh9iA3Y4/bqTcrxUMvA1kLrwY8=
X-Received: by 2002:aca:f007:: with SMTP id o7mr12788483oih.59.1558893260458; 
	Sun, 26 May 2019 10:54:20 -0700 (PDT)
MIME-Version: 1.0
References: <e537e781-e10f-7299-fddb-67fab74124c0@gmail.com>
In-Reply-To: <e537e781-e10f-7299-fddb-67fab74124c0@gmail.com>
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 26 May 2019 10:54:08 -0700
Message-ID: <CAPg+sBg6ws3LZXeppDfjznHbdBSoeQ4-5FHwDutQ1frRFZNc9w@mail.gmail.com>
To: Aymeric Vitte <vitteaymeric@gmail.com>, 
	Bitcoin Dev <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000000851400589ce1f5d"
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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: Mon, 27 May 2019 14:28:01 +0000
Subject: Re: [bitcoin-dev] Two questions about segwit implementation
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: Sun, 26 May 2019 17:54:22 -0000

--0000000000000851400589ce1f5d
Content-Type: text/plain; charset="UTF-8"

On Sun, May 26, 2019, 07:07 Aymeric Vitte via bitcoin-dev <
bitcoin-dev@lists.linuxfoundation.org> wrote:

> I realized recently that my segwit implementation was not correct,
> basically some time ago, wrongly reading the specs (and misleaded by
> what follows), I thought that scriptsig would go into witness data as it
> was, but that's not the case, op_pushdata is replaced by varlen
>
> Now reading correctly the specs, they seem to be not totally correct,
> then the first question is: why OP_0 is 00 in witness data and not 0100?
> Does this apply to other op_codes? This does not look logical at all
>
> The second question is: why for non segwit inputs there is a 00 length
> in segwit data, what is the rational for that? It should just be nothing
> since you don't need this to reconciliate things
>

This is a question that belongs on https://bitcoin.stackexchange.com, not
this list.

Cheers,

-- 
Pieter

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

<div dir=3D"auto"><div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr">On Sun, May 26, 2019, 07:07 Aymeric Vitte via bitcoin-dev &lt;=
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.=
linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=
I realized recently that my segwit implementation was not correct,<br>
basically some time ago, wrongly reading the specs (and misleaded by<br>
what follows), I thought that scriptsig would go into witness data as it<br=
>
was, but that&#39;s not the case, op_pushdata is replaced by varlen<br>
<br>
Now reading correctly the specs, they seem to be not totally correct,<br>
then the first question is: why OP_0 is 00 in witness data and not 0100?<br=
>
Does this apply to other op_codes? This does not look logical at all<br>
<br>
The second question is: why for non segwit inputs there is a 00 length<br>
in segwit data, what is the rational for that? It should just be nothing<br=
>
since you don&#39;t need this to reconciliate things<br></blockquote></div>=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">This is a question that=
 belongs on <a href=3D"https://bitcoin.stackexchange.com">https://bitcoin.s=
tackexchange.com</a>, not this list.</div><div dir=3D"auto"><br></div><div =
dir=3D"auto">Cheers,</div><div dir=3D"auto"><br></div><div dir=3D"auto">--=
=C2=A0</div><div dir=3D"auto">Pieter</div><div dir=3D"auto"><br></div><div =
dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>

--0000000000000851400589ce1f5d--