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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
|
Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192]
helo=mx.sourceforge.net)
by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
(envelope-from <tier.nolan@gmail.com>) id 1WXHo2-0001FQ-Jy
for bitcoin-development@lists.sourceforge.net;
Mon, 07 Apr 2014 22:14:18 +0000
Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmail.com
designates 209.85.216.180 as permitted sender)
client-ip=209.85.216.180; envelope-from=tier.nolan@gmail.com;
helo=mail-qc0-f180.google.com;
Received: from mail-qc0-f180.google.com ([209.85.216.180])
by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.76) id 1WXHo0-0007l7-2J
for bitcoin-development@lists.sourceforge.net;
Mon, 07 Apr 2014 22:14:18 +0000
Received: by mail-qc0-f180.google.com with SMTP id w7so92651qcr.11
for <bitcoin-development@lists.sourceforge.net>;
Mon, 07 Apr 2014 15:14:10 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.140.101.180 with SMTP id u49mr35921873qge.27.1396908850442;
Mon, 07 Apr 2014 15:14:10 -0700 (PDT)
Received: by 10.140.25.86 with HTTP; Mon, 7 Apr 2014 15:14:10 -0700 (PDT)
In-Reply-To: <BLU402-EAS381F95E2CF94AB1440E00F1A5680@phx.gbl>
References: <BLU402-EAS381F95E2CF94AB1440E00F1A5680@phx.gbl>
Date: Mon, 7 Apr 2014 23:14:10 +0100
Message-ID: <CAE-z3OVjz6s1f2YhZiUZ6REeY_iDjwu+SS=fQuhhV05VEQHV_g@mail.gmail.com>
From: Tier Nolan <tier.nolan@gmail.com>
To: "bitcoin-development@lists.sourceforge.net"
<bitcoin-development@lists.sourceforge.net>
Content-Type: multipart/alternative; boundary=001a11c16520d076c604f67b2f02
X-Spam-Score: -0.3 (/)
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
(tier.nolan[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
1.0 HTML_MESSAGE BODY: HTML included in message
0.3 HTML_FONT_FACE_BAD BODY: HTML font face is not a word
-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: 1WXHo0-0007l7-2J
Subject: Re: [Bitcoin-development] Why are we bleeding nodes?
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: Mon, 07 Apr 2014 22:14:18 -0000
--001a11c16520d076c604f67b2f02
Content-Type: text/plain; charset=ISO-8859-1
On Mon, Apr 7, 2014 at 10:55 PM, Paul Lyon <pmlyon@hotmail.ca> wrote:
> I actually ask for headers from each peer I'm connected to and then dump
> them into the backend to be sorted out.. is this abusive to the network?
>
I think downloading from a subset of the peers and switching out any slow
ones is a reasonable compromise.
Once you have a chain, you can quickly check that all peers have the same
main chain.
Your backend system could have a method that gives you the hash of the last
10 headers on the longest chain it knows about. You can use the block
locator hash system.
This can be used with the getheaders message and if the new peer is on a
different chain, then it will just send you the headers starting at the
genesis block.
If that happens, you need to download the entire chain from that peer and
see if it is better than your current best.
*From:* Tier Nolan <tier.nolan@gmail.com>
*Sent:* Monday, April 07, 2014 6:48 PM
*To:* bitcoin-development@lists.sourceforge.net
On Mon, Apr 7, 2014 at 8:50 PM, Tamas Blummer <tamas@bitsofproof.com> wrote:
> You have to load headers sequantially to be able to connect them and
> determine the longest chain.
>
The isn't strictly true. If you are connected to a some honest nodes, then
you could download portions of the chain and then connect the various
sub-chains together.
The protocol doesn't support it though. There is no system to ask for
block headers for the main chain block with a given height,
Finding one high bandwidth peer to download the entire header chain
sequentially is pretty much forced. The client can switch if there is a
timeout.
Other peers could be used to parallel download the block chain while the
main chain is downloading. Even if the header download stalled, it
wouldn't be that big a deal.
> Blocks can be loaded in random order once you have their order given by
the headers.
> Computing the UTXO however will force you to at least temporarily store
the blocks unless you have plenty of RAM.
You only need to store the UTXO set, rather than the entire block chain.
It is possible to generate the UTXO set without doing any signature
verification.
A lightweight node could just verify the UTXO set and then do random
signature verifications.
The keeps disk space and CPU reasonably low. If an illegal transaction is
added to be a block, then proof could be provided for the bad transaction.
The only slightly difficult thing is confirming inflation. That can be
checked on a block by block basis when downloading the entire block chain.
> Regards,
> Tamas Blummer
> http://bitsofproof.com <http://bitsofproof.com>
On 07.04.2014, at 21:30, Paul Lyon <pmlyon@hotmail.ca> wrote:
I hope I'm not thread-jacking here, apologies if so, but that's the
approach I've taken with the node I'm working on.
Headers can be downloaded and stored in any order, it'll make sense of what
the winning chain is. Blocks don't need to be downloaded in any particular
order and they don't need to be saved to disk, the UTXO is fully
self-contained. That way the concern of storing blocks for seeding (or not)
is wholly separated from syncing the UTXO. This allows me to do the initial
blockchain sync in ~6 hours when I use my SSD. I only need enough disk
space to store the UTXO, and then whatever amount of block data the user
would want to store for the health of the network.
This project is a bitcoin learning exercise for me, so I can only hope I
don't have any critical design flaws in there. :)
------------------------------
From: tamas@bitsofproof.com
Date: Mon, 7 Apr 2014 21:20:31 +0200
To: gmaxwell@gmail.com
CC: bitcoin-development@lists.sourceforge.net
Subject: Re: [Bitcoin-development] Why are we bleeding nodes?
Once headers are loaded first there is no reason for sequential loading.
Validation has to be sequantial, but that step can be deferred until the
blocks before a point are loaded and continous.
Tamas Blummer
http://bitsofproof.com
On 07.04.2014, at 21:03, Gregory Maxwell <gmaxwell@gmail.com> wrote:
On Mon, Apr 7, 2014 at 12:00 PM, Tamas Blummer <tamas@bitsofproof.com>
wrote:
therefore I guess it is more handy to return some bitmap of pruned/full
blocks than ranges.
A bitmap also means high overhead and-- if it's used to advertise
non-contiguous blocks-- poor locality, since blocks are fetched
sequentially.
------------------------------------------------------------------------------
Put Bad Developers to Shame Dominate Development with Jenkins Continuous
Integration Continuously Automate Build, Test & Deployment Start a new
project now. Try Jenkins in the cloud.http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________ Bitcoin-development mailing
list Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>
--001a11c16520d076c604f67b2f02
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><br><div class=3D"gmail=
_quote">On Mon, Apr 7, 2014 at 10:55 PM, Paul Lyon <span dir=3D"ltr"><<a=
href=3D"mailto:pmlyon@hotmail.ca" target=3D"_blank">pmlyon@hotmail.ca</a>&=
gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir=3D"ltr">
<div dir=3D"ltr" style=3D"font-family:'Calibri','Segoe UI',=
'Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI=
9;,'Malgun Gothic','sans-serif';font-size:12pt"><div>I actu=
ally ask for headers from each peer I’m connected to and then dump th=
em into the backend to be sorted out.. is this abusive to the network? </di=
v>
</div></div></blockquote><div><br>I think downloading from a subset of the =
peers and switching out any slow ones is a reasonable compromise.<br><br></=
div><div>Once you have a chain, you can quickly check that all peers have t=
he same main chain.<br>
</div><br><div>Your backend system could have a method that gives you the h=
ash of the last 10 headers on the longest chain it knows about. You c=
an use the block locator hash system.<br><br></div><div>This can be used wi=
th the getheaders message and if the new peer is on a different chain, then=
it will just send you the headers starting at the genesis block.<br>
</div><div><br></div><div>If that happens, you need to download the entire =
chain from that peer and see if it is better than your current best.<br></d=
iv><div dir=3D"ltr" style=3D"font-family:'Calibri','Segoe UI=
9;,'Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI=
','Malgun Gothic','sans-serif';font-size:12pt">
</div><div style=3D"font-family:'Calibri','Segoe UI','M=
eiryo','Microsoft YaHei UI','Microsoft JhengHei UI',=
9;Malgun Gothic','sans-serif';font-size:12pt"><br></div><div di=
r=3D"ltr" style=3D"font-family:'Calibri','Segoe UI','Me=
iryo','Microsoft YaHei UI','Microsoft JhengHei UI','=
;Malgun Gothic','sans-serif';font-size:12pt">
<div><br></div><div style=3D"padding-top:5px;border-top:1px solid rgb(229,2=
29,229)"><div><font style=3D"line-height:15pt;letter-spacing:0.02em;font-fa=
mily:"Calibri","Segoe UI","Meiryo","Micr=
osoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic&=
quot;,"sans-serif";font-size:12pt" face=3D" 'Calibri', &#=
39;Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Micr=
osoft JhengHei UI', 'Malgun Gothic', 'sans-serif'"><b>F=
rom:</b> <a href=3D"mailto:tier.nolan@gmail.com" target=3D"_blank">Tie=
r Nolan</a><br>
<b>Sent:</b> Monday, April 07, 2014 6:48 PM<br><b>To:</b> <a href=
=3D"mailto:bitcoin-development@lists.sourceforge.net" target=3D"_blank">bit=
coin-development@lists.sourceforge.net</a></font></div></div><div><br></div=
>
<div dir=3D""><div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D""><=
br><div class=3D"gmail_quote">On Mon, Apr 7, 2014 at 8:50 PM, Tamas Blummer=
<span dir=3D"ltr"><<a href=3D"mailto:tamas@bitsofproof.com" target=3D"_=
blank">tamas@bitsofproof.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding=
-left:1ex;border-left:1px solid rgb(204,204,204)"><div>You have to load hea=
ders sequantially to be able to connect them and determine the longest chai=
n.</div>
</blockquote><div><br></div><div>The isn't strictly true. If you =
are connected to a some honest nodes, then you could download portions of t=
he chain and then connect the various sub-chains together.<br>
<br>The protocol doesn't support it though. There is no system to=
ask for block headers for the main chain block with a given height,<br><br=
></div>Finding one high bandwidth peer to download the entire header chain =
sequentially is pretty much forced. The client can switch if there is=
a timeout.<br>
<br></div><div class=3D"gmail_quote">Other peers could be used to parallel =
download the block chain while the main chain is downloading. Even if=
the header download stalled, it wouldn't be that big a deal.<br></div>=
</div>
<div class=3D"gmail_quote">
<div><div class=3D""><br><div><div>> Blocks can be loaded in random orde=
r once you have their order given by the headers.</div>> Computing the U=
TXO however will force you to at least temporarily store the blocks unless =
you have plenty of RAM. <br>
<br></div><div>You only need to store the UTXO set, rather than the entire =
block chain.<br><br></div></div><div class=3D""><div>It is possible to gene=
rate the UTXO set without doing any signature verification.<br><br></div>
<div>A lightweight node could just verify the UTXO set and then do random s=
ignature verifications.<br>
<br></div><div>The keeps disk space and CPU reasonably low. If an ill=
egal transaction is added to be a block, then proof could be provided for t=
he bad transaction.<br><br></div><div>The only slightly difficult thing is =
confirming inflation. That can be checked on a block by block basis w=
hen downloading the entire block chain.<br>
</div></div><div><div class=3D""><br style=3D"font:12px Helvetica;text-tran=
sform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-spa=
ce:normal">
<div><span style=3D"font:12px Helvetica;text-transform:none;text-indent:0px=
;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important=
;white-space:normal">> Regards,</span><br style=3D"font:12px Helvetica;t=
ext-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;w=
hite-space:normal">
<span style=3D"font:12px Helvetica;text-transform:none;text-indent:0px;lett=
er-spacing:normal;word-spacing:0px;float:none;display:inline!important;whit=
e-space:normal">> Tamas Blummer</span><span style=3D"font:12px Helvetica=
;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px=
;white-space:normal"><br style=3D"font:12px Helvetica;text-transform:none;t=
ext-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
<span style=3D"font:12px Helvetica;text-transform:none;text-indent:0px;lett=
er-spacing:normal;word-spacing:0px;float:none;display:inline!important;whit=
e-space:normal"><a href=3D"http://bitsofproof.com" target=3D"_blank">> h=
ttp://bitsofproof.com</a></span>
</span></div>
<br></div><div><div class=3D""><div><div>On 07.04.2014, at 21:30, Paul Lyon=
<<a href=3D"mailto:pmlyon@hotmail.ca" target=3D"_blank">pmlyon@hotmail.=
ca</a>> wrote:</div><br></div></div><blockquote style=3D"margin-top:0px;=
margin-bottom:0px">
<div style=3D"font:12pt Calibri;text-transform:none;text-indent:0px;letter-=
spacing:normal;word-spacing:0px;white-space:normal">
<div dir=3D"ltr"><div class=3D""><div>I hope I'm not thread-jacking her=
e, apologies if so, but that's the approach I've taken with the nod=
e I'm working on.<div><br></div><div>Headers can be downloaded and stor=
ed in any order, it'll make sense of what the winning chain is. Blocks =
don't need to be downloaded in any particular order and they don't =
need to be saved to disk, the UTXO is fully self-contained. That way the co=
ncern of storing blocks for seeding (or not) is wholly separated from synci=
ng the UTXO. This allows me to do the initial blockchain sync in ~6 hours w=
hen I use my SSD. I only need enough disk space to store the UTXO, and then=
whatever amount of block data the user would want to store for the health =
of the network.</div>
<div><br></div></div></div><div><div class=3D""><div>This project is a bitc=
oin learning exercise for me, so I can only hope I don't have any criti=
cal design flaws in there. :)<br><br></div></div><div><div><div class=3D"">
<hr>From:<span> </span><a href=3D"mailto:tamas@bitsofproof.com" target=
=3D"_blank">tamas@bitsofproof.com</a><br>
Date: Mon, 7 Apr 2014 21:20:31 +0200<br>To:<span> </span><a href=3D"ma=
ilto:gmaxwell@gmail.com" target=3D"_blank">gmaxwell@gmail.com</a><br>CC:<sp=
an> </span><a href=3D"mailto:bitcoin-development@lists.sourceforge.net=
" target=3D"_blank">bitcoin-development@lists.sourceforge.net</a><br>
Subject: Re: [Bitcoin-development] Why are we bleeding nodes?<br><br><div><=
br></div><div>Once headers are loaded first there is no reason for sequenti=
al loading. </div><div><br></div></div><div class=3D""><div>Validation=
has to be sequantial, but that step can be deferred until the blocks befor=
e a point are loaded and continous.</div>
<br></div><div class=3D""><div><span style=3D"font:12px Helvetica;text-tran=
sform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:non=
e;display:inline!important;white-space:normal">Tamas Blummer</span><span st=
yle=3D"font:12px Helvetica;text-transform:none;text-indent:0px;letter-spaci=
ng:normal;word-spacing:0px;white-space:normal"><br style=3D"font:12px Helve=
tica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing=
:0px;white-space:normal">
<span style=3D"font:12px Helvetica;text-transform:none;text-indent:0px;lett=
er-spacing:normal;word-spacing:0px;float:none;display:inline!important;whit=
e-space:normal"><a href=3D"http://bitsofproof.com/" target=3D"_blank">http:=
//bitsofproof.com</a></span></span></div>
<br><div><div>On 07.04.2014, at 21:03, Gregory Maxwell <<a href=3D"mailt=
o:gmaxwell@gmail.com" target=3D"_blank">gmaxwell@gmail.com</a>> wrote:</=
div><br><blockquote style=3D"margin-top:0px;margin-bottom:0px">On Mon, Apr =
7, 2014 at 12:00 PM, Tamas Blummer <<a href=3D"mailto:tamas@bitsofproof.=
com" target=3D"_blank">tamas@bitsofproof.com</a>> wrote:<br>
<blockquote style=3D"margin-top:0px;margin-bottom:0px">therefore I guess it=
is more handy to return some bitmap of pruned/full<br>blocks than ranges.<=
br></blockquote><br>A bitmap also means high overhead and— if it'=
s used to advertise<br>
non-contiguous blocks— poor locality, since blocks are fetched<br>
sequentially.<br><br></blockquote></div><br><br></div></div>---------------=
--------------------------------------------------------------- Put Bad Dev=
elopers to Shame Dominate Development with Jenkins Continuous Integration C=
ontinuously Automate Build, Test & Deployment Start a new project now. =
Try Jenkins in the cloud.<a href=3D"http://p.sf.net/sfu/13600_Cloudbees" ta=
rget=3D"_blank">http://p.sf.net/sfu/13600_Cloudbees</a><div>
<br>_______________________________________________ Bitcoin-development mai=
ling list<span> </span><a href=3D"mailto:Bitcoin-development@lists.sou=
rceforge.net" target=3D"_blank">Bitcoin-development@lists.sourceforge.net</=
a><a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-developme=
nt" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-=
development</a></div>
</div></div></div></div></blockquote></div><br></div></div><div class=3D"">=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;padding=
-left:1ex;border-left:1px solid rgb(204,204,204)"><br>---------------------=
---------------------------------------------------------<br>
Put Bad Developers to Shame<br>
Dominate Development with Jenkins Continuous Integration<br>
Continuously Automate Build, Test & Deployment<br>
Start a new project now. Try Jenkins in the cloud.<br>
<a href=3D"http://p.sf.net/sfu/13600_Cloudbees" target=3D"_blank">http://p.=
sf.net/sfu/13600_Cloudbees</a><br>_________________________________________=
______<br>
Bitcoin-development mailing list<br>
<a href=3D"mailto:Bitcoin-development@lists.sourceforge.net" target=3D"_bla=
nk">Bitcoin-development@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>
<br></blockquote></div></div><br></div></div>
</div></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"l=
tr">
</div>
</blockquote></div><br></div></div>
--001a11c16520d076c604f67b2f02--
|