From: William Swanson <swansontec@gmail.com>
To: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: [Bitcoin-development] bip-0021 and bip-0072 ambiguities & mistakes
Date: Thu, 6 Mar 2014 14:38:40 -0800 [thread overview]
Message-ID: <CABjHNoQQUu0WDdgFHAe4FEGmO8JmjvwAfpCwcrL7wGsHiVDjog@mail.gmail.com> (raw)
Hello,
I am attempting to write a parser for bip-0021 URI's, including
support for the new bip-0072 payment parameters. My goal is absolute
correctness. Unfortunately, these BIP's have a few ambiguities and
mistakes which ought to be corrected.
First, I would like to point out that internet RFC 3986 governs the
general syntax for URI's. It obsoletes RFC 1738 and various other
early RFC's. Since RFC 3986 came out in 2005, I think we can agree
that any bitcoin URI scheme should use this and not the earlier ones.
Unfortunately, bip-0021 never actually mentions RFC 3986, which is a
big omission. Even worse, bip-0072 explicitly refers to RFC 1738,
which is obsolete. This is a problem, since the old, obsolete standard
requires more escapes than are actually necessary. Updating bip-0072
to refer to RFC 3986 instead would allow shorter, more readable
bitcoin URI's (things like slashes in payment addresses wouldn't need
to be escaped).
Secondly, neither of the bip's describe what to do with international
characters. I doubt anybody wants to limit the "label" and "message"
parameters to 7-bit ASCII, so a character encoding needs to be
defined. RFC reccomends that all new URI schemes use UTF-8 as their
encoding, which is perfectly reasonable. The bip-0021 standard just
needs to actually say so.
Finally, there is an error in the bip-0021 BNF grammar, which never
mentions the '&' separator between query elements.
What is the procedure for getting these BIP's corrected? Submit a pull
request with the changes? Hopefully we can all agree that these fixes
are useful and necessary.
-William
P.S. The bitcoin-qt client uses QUrl to parse bitcoin uri's, and that
is based on RFC 3986. Thus, the bitcoin-qt client is probably already
implementing these suggestions.
next reply other threads:[~2014-03-06 22:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 22:38 William Swanson [this message]
2014-03-06 22:59 ` [Bitcoin-development] bip-0021 and bip-0072 ambiguities & mistakes Mike Hearn
2014-03-07 2:16 ` William Swanson
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=CABjHNoQQUu0WDdgFHAe4FEGmO8JmjvwAfpCwcrL7wGsHiVDjog@mail.gmail.com \
--to=swansontec@gmail.com \
--cc=bitcoin-development@lists.sourceforge.net \
/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