<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 7, 2014 at 10:55 PM, Paul Lyon <span dir="ltr"><<a href="mailto:pmlyon@hotmail.ca" target="_blank">pmlyon@hotmail.ca</a>></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 dir="ltr">
<div dir="ltr" style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt"><div>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? </div>
</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 the same main chain.<br>
</div><br><div>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.<br><br></div><div>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.<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></div><div dir="ltr" style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt">
</div><div style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt"><br></div><div dir="ltr" style="font-family:'Calibri','Segoe UI','Meiryo','Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','sans-serif';font-size:12pt">
<div><br></div><div style="padding-top:5px;border-top:1px solid rgb(229,229,229)"><div><font style="line-height:15pt;letter-spacing:0.02em;font-family:"Calibri","Segoe UI","Meiryo","Microsoft YaHei UI","Microsoft JhengHei UI","Malgun Gothic","sans-serif";font-size:12pt" face=" 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif'"><b>From:</b> <a href="mailto:tier.nolan@gmail.com" target="_blank">Tier Nolan</a><br>
<b>Sent:</b> Monday, April 07, 2014 6:48 PM<br><b>To:</b> <a href="mailto:bitcoin-development@lists.sourceforge.net" target="_blank">bitcoin-development@lists.sourceforge.net</a></font></div></div><div><br></div>
<div dir=""><div dir="ltr"><div class="gmail_extra"><div class=""><br><div class="gmail_quote">On Mon, Apr 7, 2014 at 8:50 PM, Tamas Blummer <span dir="ltr"><<a href="mailto:tamas@bitsofproof.com" target="_blank">tamas@bitsofproof.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><div>You have to load headers sequantially to be able to connect them and determine the longest chain.</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 the 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="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="gmail_quote">
<div><div class=""><br><div><div>> Blocks can be loaded in random order once you have their order given by the headers.</div>> 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><div class=""><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. 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. That can be checked on a block by block basis when downloading the entire block chain.<br>
</div></div><div><div class=""><br style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
<div><span style="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="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
<span style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal">> Tamas Blummer</span><span style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal"><br style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
<span style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal"><a href="http://bitsofproof.com" target="_blank">> http://bitsofproof.com</a></span>
</span></div>
<br></div><div><div class=""><div><div>On 07.04.2014, at 21:30, Paul Lyon <<a href="mailto:pmlyon@hotmail.ca" target="_blank">pmlyon@hotmail.ca</a>> wrote:</div><br></div></div><blockquote style="margin-top:0px;margin-bottom:0px">
<div style="font:12pt Calibri;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
<div dir="ltr"><div class=""><div>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.<div><br></div><div>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.</div>
<div><br></div></div></div><div><div class=""><div>This project is a bitcoin learning exercise for me, so I can only hope I don't have any critical design flaws in there. :)<br><br></div></div><div><div><div class="">
<hr>From:<span> </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> </span><a href="mailto:gmaxwell@gmail.com" target="_blank">gmaxwell@gmail.com</a><br>CC:<span> </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. </div><div><br></div></div><div class=""><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><div class=""><div><span style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal">Tamas Blummer</span><span style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal"><br style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;white-space:normal">
<span style="font:12px Helvetica;text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;float:none;display:inline!important;white-space:normal"><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 <<a href="mailto:gmaxwell@gmail.com" target="_blank">gmaxwell@gmail.com</a>> wrote:</div><br><blockquote style="margin-top:0px;margin-bottom:0px">On Mon, Apr 7, 2014 at 12:00 PM, Tamas Blummer <<a href="mailto:tamas@bitsofproof.com" target="_blank">tamas@bitsofproof.com</a>> wrote:<br>
<blockquote style="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 Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & 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>
<br>_______________________________________________ Bitcoin-development mailing list<span> </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><div class=""><blockquote class="gmail_quote" style="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="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" target="_blank">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></div><br></div></div>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
</div>
</blockquote></div><br></div></div>