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
|
Return-Path: <apoelstra@wpsoftware.net>
Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id A631FC0032
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 11 Aug 2023 13:45:39 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp4.osuosl.org (Postfix) with ESMTP id 6B16C40580
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 11 Aug 2023 13:45:39 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6B16C40580
Authentication-Results: smtp4.osuosl.org;
dkim=pass (2048-bit key) header.d=mail.wpsoftware.net
header.i=@mail.wpsoftware.net header.a=rsa-sha256 header.s=default
header.b=UpqR9ka0
X-Virus-Scanned: amavisd-new at osuosl.org
X-Spam-Flag: NO
X-Spam-Score: -1.107
X-Spam-Level:
X-Spam-Status: No, score=-1.107 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=no autolearn_force=no
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 MjBU7iNhLRmE
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 11 Aug 2023 13:45:38 +0000 (UTC)
Received: from mail.wpsoftware.net (unknown [66.183.0.205])
by smtp4.osuosl.org (Postfix) with ESMTP id 2215F4054C
for <bitcoin-dev@lists.linuxfoundation.org>;
Fri, 11 Aug 2023 13:45:37 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 2215F4054C
Received: from camus (camus-andrew.lan [192.168.0.190])
by mail.wpsoftware.net (Postfix) with ESMTPSA id 0893D40095;
Fri, 11 Aug 2023 13:45:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.wpsoftware.net;
s=default; t=1691761537;
bh=D30qY9OOKL8Ds2mLmVyMeRTGFRQcd4bZbdt/6Bfw+DY=;
h=Date:From:To:Subject:References:In-Reply-To;
b=UpqR9ka0TSSp5ciYS4w2t8nZLoDdAN0XwRgWIYwCh4A7Y/f7Lpk4qUJKmhWr8YG4Q
DR5OuZQx+q7a6L1JRQu3UVxMpyBweD4TKKRBy+5QVPFS5n6/NXZ23fEGrdEbC7BZad
NL57twa6NrGej/R5ea+BFv/MzsIeoH1U0oM2JpsoUKpipZh7YWpnyAi1MxuF6k54vm
MmZul7OHghRrXJROw2MRaekHDDsg5/H7IUEf/UHxeWDGNR38VWix+T/4wVVWSvCMZv
xbwZWfQ6DGEGpsAX9+2EQkD4L6hS1/B83WyfGyYbzhbb7AMoexiTjHPkSgv9r9mf07
IC1aYq/ZMRsPQ==
Date: Fri, 11 Aug 2023 13:45:35 +0000
From: Andrew Poelstra <apoelstra@wpsoftware.net>
To: Tobin Harding <me@tobin.cc>,
Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Message-ID: <ZNY7f8tRfKHi73Uj@camus>
References: <ZNW9BenWIhgX95zl@alke>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature"; boundary="XxnP3vfVQL6HUXlF"
Content-Disposition: inline
In-Reply-To: <ZNW9BenWIhgX95zl@alke>
Subject: Re: [bitcoin-dev] segwit naming ambiguity
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: Fri, 11 Aug 2023 13:45:39 -0000
--XxnP3vfVQL6HUXlF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Aug 11, 2023 at 02:45:57PM +1000, Tobin Harding via bitcoin-dev wro=
te:
> Question for OG bitcoin API designers please.
>=20
> If you were to see the following function
>=20
> `is_segwit()`
>=20
> would you assume it returns `true` or `false` for a p2tr transaction?
>=20
>=20
> Currently we (rust-bitcoin) are being liberal with the use of `v0` but
> its a pretty ugly. Is there an official, or widely used, name for segwit =
v0?
>
As others have said, I think `is_segwit` should match all segwit
versions. Pavol also sorta answered your "widely used name" question
though he didn't draw attention to it -- segwit v0 outputs are called
"p2wsh" or "p2wpkh".
But I don't know any term that covers "p2wsh or p2wpkh but not p2tr".
Other than "segwit_v0", which we are currently using, and which I agree
is a bit of a mouthful.
--=20
Andrew Poelstra
Director of Research, Blockstream
Email: apoelstra at wpsoftware.net
Web: https://www.wpsoftware.net/andrew
The sun is always shining in space
-Justin Lewis-Webster
--XxnP3vfVQL6HUXlF
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEkPnKPD7Je+ki35VexYjWPOQbl8EFAmTWO38ACgkQxYjWPOQb
l8HAvwgAl7rgvJq+5cZCenntjwaa6lKnriNerZZ5G+kuwCbkhUS63bisLeNKhzu1
gRUHRnfLpJIWVaN2Qg0is5KmNl06Gz0MjAmlKEz/To2u9KfkvJL2kXRdMDhFOUeW
Ku7UHc8ey02ASUJeguG2IFuOWAgKPSIubxJRCnffoDssy89Zm40fWfX8EE5cMMog
4fD8IZbziOGxJ0XDj43P8pkeHOoYhpYq+3I8FpV+DX7EtV8R0ZZ/SFB8QrSeg/jW
2422lUApKxB5LDdCOGl8j56cITyrbWyC4fHBH9kUMx5J075PXze/mcL+s6kyFCTB
IrtySiue2WdsVGgPv7fsmiKpFz2yBg==
=/lX4
-----END PGP SIGNATURE-----
--XxnP3vfVQL6HUXlF--
|