<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 7, 2014 at 8:50 PM, Tamas Blummer <span dir="ltr">&lt;<a href="mailto:tamas@bitsofproof.com" target="_blank">tamas@bitsofproof.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">You have to load headers sequantially to be able to connect them and determine the longest chain.</div>
</blockquote><div><br></div><div style="word-wrap:break-word">The isn&#39;t strictly true.&nbsp; 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.<br>
<br>The protocol doesn&#39;t support it though.&nbsp; 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.&nbsp; The client can switch if there is a timeout.<br>
<br></div><div class="gmail_quote">Other peers could be used to parallel download the block chain while the main chain is downloading.&nbsp; Even if the header download stalled, it wouldn&#39;t be that big a deal.<br></div><div class="gmail_quote">
<div style="word-wrap:break-word"><br><div><div>&gt; Blocks can be loaded in random order once you have their order given by the headers.</div>&gt; Computing the UTXO 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>It is possible to generate 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 signature verifications.<br>
<br></div><div>The keeps disk space and CPU reasonably low.&nbsp; If an illegal transaction is added to be a block, then proof could be provided for the bad transaction.<br><br></div><div>The only slightly difficult thing is confirming inflation.&nbsp; That can be checked on a block by block basis when downloading the entire block chain.<br>
</div><div><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px">&gt; Regards,</span><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px">&gt; Tamas Blummer</span><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:start;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><br style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px">
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><a href="http://bitsofproof.com" target="_blank">&gt; http://bitsofproof.com</a></span>
</span></div>
<br><div><div class=""><div>On 07.04.2014, at 21:30, Paul Lyon &lt;<a href="mailto:pmlyon@hotmail.ca" target="_blank">pmlyon@hotmail.ca</a>&gt; wrote:</div><br></div><blockquote type="cite"><div style="font-size:12pt;font-family:Calibri;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div dir="ltr"><div class="">I hope I&#39;m not thread-jacking here, apologies if so, but that&#39;s the approach I&#39;ve taken with the node I&#39;m working on.<div><br></div><div>Headers can be downloaded and stored in any order, it&#39;ll make sense of what the winning chain is. Blocks don&#39;t need to be downloaded in any particular order and they don&#39;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.</div>
<div><br></div></div><div><div class="">This project is a bitcoin learning exercise for me, so I can only hope I don&#39;t have any critical design flaws in there. :)<br><br></div><div><div class=""><hr>From:<span>&nbsp;</span><a href="mailto:tamas@bitsofproof.com" target="_blank">tamas@bitsofproof.com</a><br>
Date: Mon, 7 Apr 2014 21:20:31 +0200<br>To:<span>&nbsp;</span><a href="mailto:gmaxwell@gmail.com" target="_blank">gmaxwell@gmail.com</a><br>CC:<span>&nbsp;</span><a href="mailto:bitcoin-development@lists.sourceforge.net" target="_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 sequential loading.&nbsp;</div><div><br></div><div>Validation has to be sequantial, but that step can be deferred until the blocks before a point are loaded and continous.</div>
<br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Tamas Blummer</span><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"><a href="http://bitsofproof.com/" target="_blank">http://bitsofproof.com</a></span></span></div>
<br><div><div>On 07.04.2014, at 21:03, Gregory Maxwell &lt;<a href="mailto:gmaxwell@gmail.com" target="_blank">gmaxwell@gmail.com</a>&gt; wrote:</div><br><blockquote type="cite">On Mon, Apr 7, 2014 at 12:00 PM, Tamas Blummer &lt;<a href="mailto:tamas@bitsofproof.com" target="_blank">tamas@bitsofproof.com</a>&gt; wrote:<br>
<blockquote type="cite">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&mdash; if it&#39;s used to advertise<br>non-contiguous blocks&mdash; poor locality, since blocks are fetched<br>
sequentially.<br><br></blockquote></div><br><br></div>------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test &amp; Deployment Start a new project now. Try Jenkins in the cloud.<a href="http://p.sf.net/sfu/13600_Cloudbees" target="_blank">http://p.sf.net/sfu/13600_Cloudbees</a><div class="">
<br>_______________________________________________ Bitcoin-development mailing list<span>&nbsp;</span><a href="mailto:Bitcoin-development@lists.sourceforge.net" target="_blank">Bitcoin-development@lists.sourceforge.net</a><a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a></div>
</div></div></div></div></blockquote></div><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>------------------------------------------------------------------------------<br>

Put Bad Developers to Shame<br>
Dominate Development with Jenkins Continuous Integration<br>
Continuously Automate Build, Test &amp; Deployment<br>
Start a new project now. Try Jenkins in the cloud.<br>
<a href="http://p.sf.net/sfu/13600_Cloudbees" target="_blank">http://p.sf.net/sfu/13600_Cloudbees</a><br>_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href="mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-development@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/bitcoin-development" target="_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-development</a><br>
<br></blockquote></div><br></div></div>