<div dir="ltr">Can you make it clear what the bold vs not-bold numbers mean?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 15, 2020 at 4:56 PM Russell O'Connor via bitcoin-dev <<a href="mailto:bitcoin-dev@lists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 13, 2019 at 1:31 AM Pieter Wuille via bitcoin-dev <<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfoundation.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><br><div dir="auto">That brings me to Matt's point: there is no need to do this right now. We can simply amend BIP173 to only permit length 20 and length 32 (and only length 20 for v0, if you like; but they're so far apart that permitting both shouldn't hurt), for now. Introducing the "new" address format (the one using an improved checksum algorithm) only needs to be there in time for when a non-32-byte-witness-program would come in sight.</div></div></blockquote><div><br></div><div>As a prerequisite to taproot activation, I was looking into amending BIP173 as stated above.  However after reviewing <a href="https://gist.github.com/sipa/a9845b37c1b298a7301c33a04090b2eb#detection-of-insertion-errors" target="_blank">https://gist.github.com/sipa/a9845b37c1b298a7301c33a04090b2eb#detection-of-insertion-errors</a> it seems that insertions of 5 characters or more is "safe" in the sense that there is low probability of creating a valid checksum by doing so randomly.</div><div><br></div><div>This means we could safely allow witness programs of lengths <b>20</b>, 23, 26, 29, <b>32</b>, 36, and 40 (or 39).  These correspond to Bech32 addresses of length <b>42</b>, 47, 52, 57, <b>62</b>, 68, and 74 (or 73).  We could also support a set of shorter addresses, but given the lack of entropy in such short addresses, it is hard to believe that such witness programs could be used to secure anything.  I'm not sure what the motivation for allowing such short witness programs was, but I'm somewhat inclined to exclude them from the segwit address format.<br></div><div><br></div><div>Given that we would only be able to support one of 39 or 40 byte witness programs, it is sensible to choose to allow 40 byte witness programs to be addressable.  This is the maximum witness program size allowed by BIP 141.</div><div><br></div><div>So my proposal would be to amend BIP173 in such a way to restrict "bc" and "tb" segwit address formats to require witness programs be of size <b>20</b>, 23, 26, 29, <b>32</b>, 36, or 40.  Witness programs of other sizes (between 2 and 40) would, of course, still be legal in accordance with BIP 141; however they would be unaddressable by using this "bc" and "tb" prefix.  Another address format would be needed to support other witness sizes, should the need ever arise.<br></div><div><br></div><div>-- <br></div><div>Russell O'Connor<br></div></div></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
</blockquote></div>