<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 10, 2014 at 1:37 PM, Mike Hearn <span dir="ltr">&lt;<a href="mailto:mike@plan99.net" target="_blank">mike@plan99.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Chain pruning is probably a separate thread, changing subject.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Reason is that the actual blocks available are likely to change frequently (if<br>
you keep the last week of blocks</blockquote><div><br></div><div>I doubt anyone 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 nodes. </div>
</div></div></div></blockquote><div><br></div><div>Well with bitcoin, (average) time, number of blocks and (maximum) size are all related to each other 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 with block ranges.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div class="gmail_extra"><div class="gmail_quote"><div>Given a block size average it&#39;s easy to go from megabytes to num_blocks, so I had imagined it&#39;d be a new addr field that specifies how many blocks from the chain head are stored. Then you&#39;d connect to some nodes and if they indicate 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 far 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>