-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request, discussion] Uppercase schema in QR-encoded BIP21strings #145
Comments
We're investigating the adoption and wallet support of the upper-cased Bech32 and community is reaching out to wallets that aren't supporting the uppercase. You can follow on the progress we've made in this issue. |
@pavlenex that's awesome, thank you all! |
For address with a label the |
@Sjors I agree the benefit is fairly marginal (without checking specs, I think uppercase vs. alphanumeric saves like 3 bits per character plus up to 22 bits for mode change, so best case savings is like That said, I think interactions with "ancient" wallets are already going to require the user produce a non-default address type:
If users with old wallets are going to need to deal with address incompatibilities for other reasons, I think it's ok to risk asking them to deal with backwards incompatibility due to URI parsing problems too. |
@ChristopherA BCR-2020-005 supports uppercase and lowercase, so should be compliant with RFC3986? |
bcr-2020-05 is specifically designed to work with multiple transports, and is not case-significant. We suggest lowercase for readability, but for use in QRs to take advantage of the QR-native compression, you need all uppercase. Both forms are completely URI compatible. See bcr-2020-003 for more details on meeting the requirements of RFC3986 and other requirements. /cc @wolfmcnally |
Bitcoin Core 0.19 through 0.21 (at least) uppercases the bech32 address in BIP21 strings so that they will produce less complex QR codes that can sometimes take up less space or be quicker to scan accurately.
However, RFC3986 allows treating URI schemas as case insensitive, so it should be possible to also uppercase the leading
BITCOIN
(and the separator:
is part of the QR code uppercase set). RFC3986 says:BIP21 agrees:
One important downside of this approach is that not all wallets currently implement RFC3986 according to specification. See btcpayserver/btcpayserver#2099 for at least one instance of this. It's my hope that the recent attention the BTCPay team was able to bring to this issue will help get any other wallets with this issue to upgrade in the near future, allowing Bitcoin Core and others to use more efficient uppercase schema strings with bech32 addresses.
The text was updated successfully, but these errors were encountered: