From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05B20C0051 for ; 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 ; 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 ; 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 ; 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 , Bitcoin Protocol Discussion From: ZmnSCPxj Reply-To: ZmnSCPxj Message-ID: In-Reply-To: <877drn2g6q.fsf@rustcorp.com.au> References: <87imblmutl.fsf@rustcorp.com.au> <20201008145938.vrmm33f6sugdc7qm@ganymede> <87r1q0e06p.fsf@rustcorp.com.au> <877drn2g6q.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: John Barboza 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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