1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191]
helo=mx.sourceforge.net)
by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
(envelope-from <swansontec@gmail.com>) id 1WLgwB-0003VZ-AE
for bitcoin-development@lists.sourceforge.net;
Thu, 06 Mar 2014 22:38:47 +0000
Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com
designates 209.85.213.42 as permitted sender)
client-ip=209.85.213.42; envelope-from=swansontec@gmail.com;
helo=mail-yh0-f42.google.com;
Received: from mail-yh0-f42.google.com ([209.85.213.42])
by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.76) id 1WLgw9-0008Fk-KY
for bitcoin-development@lists.sourceforge.net;
Thu, 06 Mar 2014 22:38:47 +0000
Received: by mail-yh0-f42.google.com with SMTP id a41so3453685yho.29
for <bitcoin-development@lists.sourceforge.net>;
Thu, 06 Mar 2014 14:38:40 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.236.216.106 with SMTP id f100mr5063726yhp.129.1394145520232;
Thu, 06 Mar 2014 14:38:40 -0800 (PST)
Received: by 10.170.98.135 with HTTP; Thu, 6 Mar 2014 14:38:40 -0800 (PST)
Date: Thu, 6 Mar 2014 14:38:40 -0800
Message-ID: <CABjHNoQQUu0WDdgFHAe4FEGmO8JmjvwAfpCwcrL7wGsHiVDjog@mail.gmail.com>
From: William Swanson <swansontec@gmail.com>
To: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Content-Type: text/plain; charset=ISO-8859-1
X-Spam-Score: -1.6 (-)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
See http://spamassassin.org/tag/ for more details.
-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
sender-domain
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(swansontec[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1WLgw9-0008Fk-KY
Subject: [Bitcoin-development] bip-0021 and bip-0072 ambiguities & mistakes
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Thu, 06 Mar 2014 22:38:47 -0000
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.
|