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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
|
Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191]
helo=mx.sourceforge.net)
by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
(envelope-from <mh.in.england@gmail.com>) id 1W7Xl2-0006wl-Py
for bitcoin-development@lists.sourceforge.net;
Sun, 26 Jan 2014 22:00:48 +0000
Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com
designates 209.85.214.180 as permitted sender)
client-ip=209.85.214.180; envelope-from=mh.in.england@gmail.com;
helo=mail-ob0-f180.google.com;
Received: from mail-ob0-f180.google.com ([209.85.214.180])
by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.76) id 1W7Xl1-0003Qg-DQ
for bitcoin-development@lists.sourceforge.net;
Sun, 26 Jan 2014 22:00:48 +0000
Received: by mail-ob0-f180.google.com with SMTP id wp4so5659978obc.39
for <bitcoin-development@lists.sourceforge.net>;
Sun, 26 Jan 2014 14:00:42 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.182.29.33 with SMTP id g1mr43017obh.59.1390773642002; Sun,
26 Jan 2014 14:00:42 -0800 (PST)
Sender: mh.in.england@gmail.com
Received: by 10.76.99.112 with HTTP; Sun, 26 Jan 2014 14:00:41 -0800 (PST)
In-Reply-To: <lc3utn$m8u$1@ger.gmane.org>
References: <lc3tm6$9ko$1@ger.gmane.org>
<CANEZrP2F-1aqzBfUB82riWOwTABf1arbx70FdQ-XndQ91m_QqA@mail.gmail.com>
<lc3utn$m8u$1@ger.gmane.org>
Date: Sun, 26 Jan 2014 23:00:41 +0100
X-Google-Sender-Auth: zY7K-xGioqxMUC6CRZOyvVV8wlQ
Message-ID: <CANEZrP0GLcSf0B-bW7jZq5m+wdkBLe_iEok-XCCOFASGAthtug@mail.gmail.com>
From: Mike Hearn <mike@plan99.net>
To: Andreas Schildbach <andreas@schildbach.de>
Content-Type: multipart/alternative; boundary=001a11c2b8b2e505df04f0e6b866
X-Spam-Score: -0.5 (/)
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
(mh.in.england[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
1.0 HTML_MESSAGE BODY: HTML included in message
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: 1W7Xl1-0003Qg-DQ
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] BIP70/71 issue, RFD
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: Sun, 26 Jan 2014 22:00:49 -0000
--001a11c2b8b2e505df04f0e6b866
Content-Type: text/plain; charset=UTF-8
I think for "binding" the payment protocol to those transports we should
indeed use protobuf varint length prefixes. But it's unnecessary for all
cases. Unless Gavin feels it'd be better to be consistent everywhere and is
willing to change the spec and code - as far as I know though we're trying
to ship 0.9rc1 soonish .....
On Sun, Jan 26, 2014 at 10:32 PM, Andreas Schildbach
<andreas@schildbach.de>wrote:
> Bluetooth, Wifi Direct, HTTP request/responses via broken proxies, smoke
> signals... basically anything that is a stream rather than a file.
>
> Right, NFC NDEF and QR codes are not affected, so we can skip the
> delimiter for these mediums.
>
>
> On 01/26/2014 10:24 PM, Mike Hearn wrote:
> > Which medium is this an issue for? As you note, for files and HTTP
> > responses it's not a problem in practice. i'd guess nor for NFC tags nor
> > QR codes.
> >
> >
> > On Sun, Jan 26, 2014 at 10:11 PM, Andreas Schildbach
> > <andreas@schildbach.de <mailto:andreas@schildbach.de>> wrote:
> >
> > I'm experimenting with BIP70/71 (payment protocol) usage in face to
> face
> > payments (more on that soon).
> >
> > I've excountered an issue with the protobuf format. Protobufs are not
> > self-delimiting. That means if you're reading from an undelimited
> > stream, you will read endlessly because you don't know how much to
> read.
> >
> > The current BIP70 implementations probably work because they're
> reading
> > either from a file or from an HTTP resource which sets the
> > Content-Length header. Trouble is the Content-Length header is
> optional,
> > and also there are many kinds of streams that don't have this
> built-in
> > delimiting mechanism.
> >
> > The Java protobuf API solves this by offering delimited I/O, like
> >
> > payment.writeDelimitedTo(os);
> >
> > This writes the size of the message as a varint before writing the
> data.
> > I don't know about protobuf implementations for other languages but
> I'd
> > expect them to offer something compatible.
> >
> > However, this leading varint is an incompatible change and would
> need to
> > be added to the spec.
> >
> > I specifically encountered this with PaymentMessage and PaymentACK,
> but
> > it might be a good idea to apply this to all messages if any. Open
> for
> > discussion.
> >
> >
> >
> ------------------------------------------------------------------------------
> > CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> > Learn Why More Businesses Are Choosing CenturyLink Cloud For
> > Critical Workloads, Development Environments & Everything In Between.
> > Get a Quote or Start a Free Trial Today.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Bitcoin-development mailing list
> > Bitcoin-development@lists.sourceforge.net
> > <mailto:Bitcoin-development@lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/bitcoin-development
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> > Learn Why More Businesses Are Choosing CenturyLink Cloud For
> > Critical Workloads, Development Environments & Everything In Between.
> > Get a Quote or Start a Free Trial Today.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> >
> >
> >
> > _______________________________________________
> > Bitcoin-development mailing list
> > Bitcoin-development@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bitcoin-development
> >
>
>
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
--001a11c2b8b2e505df04f0e6b866
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I think for "binding" the payment protocol to th=
ose transports we should indeed use protobuf varint length prefixes. But it=
's unnecessary for all cases. Unless Gavin feels it'd be better to =
be consistent everywhere and is willing to change the spec and code - as fa=
r as I know though we're trying to ship 0.9rc1 soonish .....</div>
<div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Sun, Jan 2=
6, 2014 at 10:32 PM, Andreas Schildbach <span dir=3D"ltr"><<a href=3D"ma=
ilto:andreas@schildbach.de" target=3D"_blank">andreas@schildbach.de</a>>=
</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Bluetooth, Wifi Direct, HTTP request/respons=
es via broken proxies, smoke<br>
signals... basically anything that is a stream rather than a file.<br>
<br>
Right, NFC NDEF and QR codes are not affected, so we can skip the<br>
delimiter for these mediums.<br>
<div class=3D"im"><br>
<br>
On 01/26/2014 10:24 PM, Mike Hearn wrote:<br>
> Which medium is this an issue for? As you note, for files and HTTP<br>
> responses it's not a problem in practice. i'd guess nor for NF=
C tags nor<br>
> QR codes.<br>
><br>
><br>
> On Sun, Jan 26, 2014 at 10:11 PM, Andreas Schildbach<br>
</div><div><div class=3D"h5">> <<a href=3D"mailto:andreas@schildbach.=
de">andreas@schildbach.de</a> <mailto:<a href=3D"mailto:andreas@schildba=
ch.de">andreas@schildbach.de</a>>> wrote:<br>
><br>
> =C2=A0 =C2=A0 I'm experimenting with BIP70/71 (payment protocol) u=
sage in face to face<br>
> =C2=A0 =C2=A0 payments (more on that soon).<br>
><br>
> =C2=A0 =C2=A0 I've excountered an issue with the protobuf format. =
Protobufs are not<br>
> =C2=A0 =C2=A0 self-delimiting. That means if you're reading from a=
n undelimited<br>
> =C2=A0 =C2=A0 stream, you will read endlessly because you don't kn=
ow how much to read.<br>
><br>
> =C2=A0 =C2=A0 The current BIP70 implementations probably work because =
they're reading<br>
> =C2=A0 =C2=A0 either from a file or from an HTTP resource which sets t=
he<br>
> =C2=A0 =C2=A0 Content-Length header. Trouble is the Content-Length hea=
der is optional,<br>
> =C2=A0 =C2=A0 and also there are many kinds of streams that don't =
have this built-in<br>
> =C2=A0 =C2=A0 delimiting mechanism.<br>
><br>
> =C2=A0 =C2=A0 The Java protobuf API solves this by offering delimited =
I/O, like<br>
><br>
> =C2=A0 =C2=A0 payment.writeDelimitedTo(os);<br>
><br>
> =C2=A0 =C2=A0 This writes the size of the message as a varint before w=
riting the data.<br>
> =C2=A0 =C2=A0 I don't know about protobuf implementations for othe=
r languages but I'd<br>
> =C2=A0 =C2=A0 expect them to offer something compatible.<br>
><br>
> =C2=A0 =C2=A0 However, this leading varint is an incompatible change a=
nd would need to<br>
> =C2=A0 =C2=A0 be added to the spec.<br>
><br>
> =C2=A0 =C2=A0 I specifically encountered this with PaymentMessage and =
PaymentACK, but<br>
> =C2=A0 =C2=A0 it might be a good idea to apply this to all messages if=
any. Open for<br>
> =C2=A0 =C2=A0 discussion.<br>
><br>
><br>
> =C2=A0 =C2=A0 --------------------------------------------------------=
----------------------<br>
> =C2=A0 =C2=A0 CenturyLink Cloud: The Leader in Enterprise Cloud Servic=
es.<br>
> =C2=A0 =C2=A0 Learn Why More Businesses Are Choosing CenturyLink Cloud=
For<br>
> =C2=A0 =C2=A0 Critical Workloads, Development Environments & Every=
thing In Between.<br>
> =C2=A0 =C2=A0 Get a Quote or Start a Free Trial Today.<br>
> =C2=A0 =C2=A0 <a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=
=3D119420431&iu=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.=
doubleclick.net/gampad/clk?id=3D119420431&iu=3D/4140/ostg.clktrk</a><br=
>
> =C2=A0 =C2=A0 _______________________________________________<br>
> =C2=A0 =C2=A0 Bitcoin-development mailing list<br>
> =C2=A0 =C2=A0 <a href=3D"mailto:Bitcoin-development@lists.sourceforge.=
net">Bitcoin-development@lists.sourceforge.net</a><br>
</div></div>> =C2=A0 =C2=A0 <mailto:<a href=3D"mailto:Bitcoin-develop=
ment@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a>&g=
t;<br>
> =C2=A0 =C2=A0 <a href=3D"https://lists.sourceforge.net/lists/listinfo/=
bitcoin-development" target=3D"_blank">https://lists.sourceforge.net/lists/=
listinfo/bitcoin-development</a><br>
<div class=3D"HOEnZb"><div class=3D"h5">><br>
><br>
><br>
><br>
> ----------------------------------------------------------------------=
--------<br>
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.<br>
> Learn Why More Businesses Are Choosing CenturyLink Cloud For<br>
> Critical Workloads, Development Environments & Everything In Betwe=
en.<br>
> Get a Quote or Start a Free Trial Today.<br>
> <a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D119420431&a=
mp;iu=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.ne=
t/gampad/clk?id=3D119420431&iu=3D/4140/ostg.clktrk</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Bitcoin-development mailing list<br>
> <a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-d=
evelopment@lists.sourceforge.net</a><br>
> <a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-develo=
pment" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitco=
in-development</a><br>
><br>
<br>
<br>
<br>
---------------------------------------------------------------------------=
---<br>
CenturyLink Cloud: The Leader in Enterprise Cloud Services.<br>
Learn Why More Businesses Are Choosing CenturyLink Cloud For<br>
Critical Workloads, Development Environments & Everything In Between.<b=
r>
Get a Quote or Start a Free Trial Today.<br>
<a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D119420431&iu=
=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net/gam=
pad/clk?id=3D119420431&iu=3D/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-develo=
pment@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-development=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment</a><br>
</div></div></blockquote></div><br></div>
--001a11c2b8b2e505df04f0e6b866--
|