summaryrefslogtreecommitdiff
path: root/f5/7b3af7a25d2529ce6001d2c24881378747014d
blob: 0424205e77a9f0d1647cdc1af6c96c1f1896d4a6 (plain)
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
Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
	helo=mx.sourceforge.net)
	by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
	(envelope-from <laanwj@gmail.com>) id 1WYDbO-00056G-Vt
	for bitcoin-development@lists.sourceforge.net;
	Thu, 10 Apr 2014 11:57:07 +0000
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com
	designates 209.85.213.170 as permitted sender)
	client-ip=209.85.213.170; envelope-from=laanwj@gmail.com;
	helo=mail-ig0-f170.google.com; 
Received: from mail-ig0-f170.google.com ([209.85.213.170])
	by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
	(Exim 4.76) id 1WYDbO-0001C8-62
	for bitcoin-development@lists.sourceforge.net;
	Thu, 10 Apr 2014 11:57:06 +0000
Received: by mail-ig0-f170.google.com with SMTP id uq10so687727igb.1
	for <bitcoin-development@lists.sourceforge.net>;
	Thu, 10 Apr 2014 04:57:00 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.50.55.40 with SMTP id o8mr15621299igp.42.1397131020828; Thu,
	10 Apr 2014 04:57:00 -0700 (PDT)
Received: by 10.64.70.131 with HTTP; Thu, 10 Apr 2014 04:57:00 -0700 (PDT)
In-Reply-To: <CANEZrP04O7EqB=TqyTiC7O1K2A9R0nKJ_ssANHKg=Byum8-LtA@mail.gmail.com>
References: <CANEZrP04O7EqB=TqyTiC7O1K2A9R0nKJ_ssANHKg=Byum8-LtA@mail.gmail.com>
Date: Thu, 10 Apr 2014 13:57:00 +0200
Message-ID: <CA+s+GJDbYjwhpsV15a+7kCO_vTstEewVrwvqbnB=a5zOSwFC6Q@mail.gmail.com>
From: Wladimir <laanwj@gmail.com>
To: Mike Hearn <mike@plan99.net>
Content-Type: multipart/alternative; boundary=047d7b10caa93386b404f6aeea51
X-Spam-Score: -0.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
	(laanwj[at]gmail.com)
	-0.0 SPF_PASS               SPF: sender matches SPF record
	1.0 HTML_MESSAGE           BODY: HTML included in message
	-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: 1WYDbO-0001C8-62
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] Chain pruning
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, 10 Apr 2014 11:57:07 -0000

--047d7b10caa93386b404f6aeea51
Content-Type: text/plain; charset=UTF-8

On Thu, Apr 10, 2014 at 1:37 PM, Mike Hearn <mike@plan99.net> wrote:

> Chain pruning is probably a separate thread, changing subject.
>
>
>> Reason is that the actual blocks available are likely to change
>> frequently (if
>> you keep the last week of blocks
>
>
> I doubt anyone would specify blocks to keep in terms of time. More likely
> it'd be in terms of megabytes, as that's the actual resource constraint on
> nodes.
>

Well with bitcoin, (average) time, number of blocks and (maximum) size are
all related to each other so it doesn't matter how it is specified, it's
always possible to give estimates of all three.

As for implementation it indeed makes most sense to work with block ranges.


> Given a block size average it's easy to go from megabytes to num_blocks,
> so I had imagined it'd be a new addr field that specifies how many blocks
> from the chain head are stored. Then you'd connect to some nodes and if
> they indicate their chain head - num_blocks_stored is higher than your
> current chain height, you'd do a getaddr and go looking for nodes that are
> storing far enough back.
>

This assumes that nodes will always be storing the latest blocks. For
dynamic nodes that take part in the consensus this makes sense.

Just wondering: Would there be a use for a [static] node that, say, always
serves only the first 100000 blocks? Or, even, a static range like block
100000 - 200000?

Wladimir

--047d7b10caa93386b404f6aeea51
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Thu, Apr 10, 2014 at 1:37 PM, Mike Hearn <span dir=3D"ltr">&lt;<a href=
=3D"mailto:mike@plan99.net" target=3D"_blank">mike@plan99.net</a>&gt;</span=
> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_extra">=
<div class=3D"gmail_quote"><div>Chain pruning is probably a separate thread=
, changing subject.</div>
<div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8=
ex;border-left:1px #ccc solid;padding-left:1ex">
Reason is=C2=A0that the actual blocks available are likely to change freque=
ntly (if<br>
you keep the last week of blocks</blockquote><div><br></div><div>I doubt an=
yone would specify blocks to keep in terms of time. More likely it&#39;d be=
 in terms of megabytes, as that&#39;s the actual resource constraint on nod=
es. </div>
</div></div></div></blockquote><div><br></div><div>Well with bitcoin, (aver=
age) time, number of blocks and (maximum) size are all related to each othe=
r so it doesn&#39;t matter how it is specified, it&#39;s always possible to=
 give estimates of all three.<br>
<br></div><div>As for implementation it indeed makes most sense to work wit=
h block ranges.<br></div><div>=C2=A0</div><blockquote class=3D"gmail_quote"=
 style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><d=
iv dir=3D"ltr">
<div class=3D"gmail_extra"><div class=3D"gmail_quote"><div>Given a block si=
ze average it&#39;s easy to go from megabytes to num_blocks, so I had imagi=
ned it&#39;d be a new addr field that specifies how many blocks from the ch=
ain head are stored. Then you&#39;d connect to some nodes and if they indic=
ate their chain head - num_blocks_stored is higher than your current chain =
height, you&#39;d do a getaddr and go looking for nodes that are storing fa=
r enough back.</div>
</div></div></div></blockquote><div><br></div><div>This assumes that nodes =
will always be storing the latest blocks. For dynamic nodes that take part =
in the consensus this makes sense.<br><br></div><div>Just wondering: Would =
there be a use for a [static] node that, say, always serves only the first =
100000 blocks? Or, even, a static range like block 100000 - 200000?<br>
</div><div><br>Wladimir<br></div></div><br></div></div>

--047d7b10caa93386b404f6aeea51--