summaryrefslogtreecommitdiff
path: root/be/b1e9248c7ed685f1cf3d5ba3113916b8a63f71
blob: b648031a585654b0f87e9c9dcae45328c1becaae (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
Return-Path: <ZmnSCPxj@protonmail.com>
Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 05B20C0051
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 21 Oct 2020 03:05:51 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by hemlock.osuosl.org (Postfix) with ESMTP id DFD5F872E2
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 21 Oct 2020 03:05:50 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from hemlock.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 5SXByy8z4vki
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 21 Oct 2020 03:05:49 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-40132.protonmail.ch (mail-40132.protonmail.ch
 [185.70.40.132])
 by hemlock.osuosl.org (Postfix) with ESMTPS id 21375872DC
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 21 Oct 2020 03:05:48 +0000 (UTC)
Date: Wed, 21 Oct 2020 03:05:35 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail; t=1603249546;
 bh=XZffDOdXhv5wZZ/XVC+0Sise9sdhtc0sEpLXAnSE2HQ=;
 h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From;
 b=m3cBC7BFBkuSZoXL4DxtG5y3aeX+CZ9ALE3a0eSqn3wQ/tfz0jM3aykb6JFP3vzWc
 eshgp5d8F2vYiPfeYAmLI7o6jqFYHn6zjA+hEfgYCyge5MsTjQQwpROqZhouAOSLlt
 Ugg7fpA/zpXih7k4tljSrI7YR8nFWmH44VbPamI0=
To: Rusty Russell <rusty@rustcorp.com.au>,
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Reply-To: ZmnSCPxj <ZmnSCPxj@protonmail.com>
Message-ID: <wl99_YiLrtFFZuJNlFM19WDz5nkxlTGduefyc1_kCnTNVtkvMcY8xbASSRgoHBylhd9Kne3Uoh6UYfdkswBnel3kTbPeWlkIzY7gKb6vwvc=@protonmail.com>
In-Reply-To: <877drn2g6q.fsf@rustcorp.com.au>
References: <87imblmutl.fsf@rustcorp.com.au>
 <20201008145938.vrmm33f6sugdc7qm@ganymede> <87r1q0e06p.fsf@rustcorp.com.au>
 <sYf9B0e3UaSdMfdBfChon1Vr7BRFdH_6mgzuXIt_xbtlKtdqns9JJp90dRlNfvwBoRq57YEVrKbKX-dHDWz7TE0gobU4u8dGGJTcFFz2n60=@wuille.net>
 <877drn2g6q.fsf@rustcorp.com.au>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Cc: John Barboza <johnbarboza@gmail.com>
Subject: Re: [bitcoin-dev] Progress on bech32 for future Segwit Versions
	(BIP-173)
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: Wed, 21 Oct 2020 03:05:51 -0000



> Anecdata: c-lightning doesn't allow withdraw to segwit > 0. It seems
> that the contributor John Barboza (CC'd) assumed that future versions
> should be invalid:
>
> if (bip173) {
> bool witness_ok =3D false;
> if (witness_version =3D=3D 0 && (witness_program_len =3D=3D 20 ||
> witness_program_len =3D=3D 32)) {
> witness_ok =3D true;
> }
> /* Insert other witness versions here. */

I believe this is actually my code, which was later refactored by John Barb=
oza when we were standardizing the `param` system.

This was intended only as a simple precaution against creating non-standard=
 transaction, and not an assumption that future versions should be invalid.
The intent is that further `else if` branches would be added for newer witn=
ess versions and whatever length restrictions they may have, as the `/* Ins=
ert other witness versions here.  */` comment implies.

Regards,
ZmnSCPxj