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 ) 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 ; 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: References: Date: Thu, 10 Apr 2014 13:57:00 +0200 Message-ID: From: Wladimir To: Mike Hearn 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 Subject: Re: [Bitcoin-development] Chain pruning X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 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

= On Thu, Apr 10, 2014 at 1:37 PM, Mike Hearn <mike@plan99.net> wrote:
=
Chain pruning is probably a separate thread= , changing subject.
=C2=A0
Reason is=C2=A0that the actual blocks available are likely to change freque= ntly (if
you keep the last week of blocks

I doubt an= yone 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 nod= es.

Well with bitcoin, (aver= age) time, number of blocks and (maximum) size are all related to each othe= r 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 wit= h block ranges.
=C2=A0
Given a block si= ze average it's easy to go from megabytes to num_blocks, so I had imagi= ned it'd be a new addr field that specifies how many blocks from the ch= ain head are stored. Then you'd connect to some nodes and if they indic= ate 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 fa= r 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--