Author: Pieter Wuille 2019-11-13 06:30:18
Published on: 2019-11-13T06:30:18+00:00
A discussion on the Bitcoin-dev mailing list has suggested that adding a length for checksumming purposes does not necessarily require the length to be added in the address format. One proposal is to create an improved bech32 algorithm and use it for future addresses, rather than working around the problem in the address encoding while keeping the existing bech32 checksum. This would result in two checksum formats, one which validates with the witness program length, and one without. Readers that do not understand the new checksum format will simply reject them without mis-sending to the wrong witness program. Another solution includes including the length in some fashion directly in the checksum calculation, which may be preferable. It's also possible to do this in such a way that for 33-symbol and 53-symbol data parts (corresponding to P2WPKH and P2WSH lengths) the new algorithm is defined as identical to the old one. Updating BIP173 to indicate the issue and suggesting improvements for other users of bech32 is also under consideration. It has been suggested that there is no need to introduce the "new" address format right now; amending BIP173 to only permit length 20 and length 32 for now should suffice. The introduction of the new address format using an improved checksum algorithm can wait until a non-32-byte-witness-program would come into sight.
Updated on: 2023-05-20T21:04:54.712516+00:00