public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: ZmnSCPxj <ZmnSCPxj@protonmail.com>
To: Rusty Russell <rusty@rustcorp.com.au>,
	Bitcoin Protocol Discussion
	<bitcoin-dev@lists.linuxfoundation.org>
Cc: John Barboza <johnbarboza@gmail.com>
Subject: Re: [bitcoin-dev] Progress on bech32 for future Segwit Versions (BIP-173)
Date: Wed, 21 Oct 2020 03:05:35 +0000	[thread overview]
Message-ID: <wl99_YiLrtFFZuJNlFM19WDz5nkxlTGduefyc1_kCnTNVtkvMcY8xbASSRgoHBylhd9Kne3Uoh6UYfdkswBnel3kTbPeWlkIzY7gKb6vwvc=@protonmail.com> (raw)
In-Reply-To: <877drn2g6q.fsf@rustcorp.com.au>



> 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 = false;
> if (witness_version == 0 && (witness_program_len == 20 ||
> witness_program_len == 32)) {
> witness_ok = true;
> }
> /* Insert other witness versions here. */

I believe this is actually my code, which was later refactored by John Barboza 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 witness versions and whatever length restrictions they may have, as the `/* Insert other witness versions here.  */` comment implies.

Regards,
ZmnSCPxj


  parent reply	other threads:[~2020-10-21  3:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08  0:21 [bitcoin-dev] Progress on bech32 for future Segwit Versions (BIP-173) Rusty Russell
2020-10-08 14:59 ` David A. Harding
2020-10-08 15:21   ` Russell O'Connor
2020-10-15  1:40   ` Rusty Russell
2020-10-16 21:09     ` Pieter Wuille
2020-10-19  0:49       ` Rusty Russell
2020-10-19 22:55         ` Pieter Wuille
2020-10-20  0:42           ` Rusty Russell
2020-10-20  3:31             ` Rusty Russell
2020-10-20  9:21               ` Riccardo Casatta
2020-10-20 10:29             ` David A. Harding
2020-10-20 20:12               ` Pieter Wuille
2020-10-20 23:52                 ` Mike Schmidt
2020-10-21  4:51                   ` Rusty Russell
2020-11-06 19:49                   ` Mike Schmidt
2020-12-05 23:10                     ` Pieter Wuille
2020-12-06 13:04                       ` David A. Harding
2020-12-06 20:43                         ` Pieter Wuille
2020-12-08 17:39                         ` Ryan Grant
2020-12-18  2:02                           ` Pieter Wuille
2020-10-21  3:05         ` ZmnSCPxj [this message]
2020-10-21  4:39           ` Rusty Russell
2020-10-28  0:20 ` Pieter Wuille
2020-12-05 22:59   ` Pieter Wuille

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='wl99_YiLrtFFZuJNlFM19WDz5nkxlTGduefyc1_kCnTNVtkvMcY8xbASSRgoHBylhd9Kne3Uoh6UYfdkswBnel3kTbPeWlkIzY7gKb6vwvc=@protonmail.com' \
    --to=zmnscpxj@protonmail.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=johnbarboza@gmail.com \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox