public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] bip-0021 and bip-0072 ambiguities & mistakes
@ 2014-03-06 22:38 William Swanson
  2014-03-06 22:59 ` Mike Hearn
  0 siblings, 1 reply; 3+ messages in thread
From: William Swanson @ 2014-03-06 22:38 UTC (permalink / raw)
  To: Bitcoin Dev

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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-07  2:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-06 22:38 [Bitcoin-development] bip-0021 and bip-0072 ambiguities & mistakes William Swanson
2014-03-06 22:59 ` Mike Hearn
2014-03-07  2:16   ` William Swanson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox