<div dir="ltr">Hi Keagan,<div><br></div><div>I had a very similar idea. The only difference being for the node to decide on a range of blocks to keep beforehand, rather than making the decision block-by-block like you suggest.</div><div><br></div><div>I felt the other nodes would be better served by ranges due to the sequential nature of IBD. Perhaps this would be computationally lighter as well.</div><div><br></div><div>I also encourage you to read Ryosuke Abe's paper [1] that proposes a DHT scheme to solve this same problem.</div><div><br></div><div>Cheers,</div><div>Igor</div><div><br></div><div>[1] <a href="https://arxiv.org/abs/1902.02174">https://arxiv.org/abs/1902.02174</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 26 Feb 2021 at 21:57, Keagan McClelland via bitcoin-dev <<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfoundation.org</a>> wrote:<br></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">Hi all,<div><br></div><div>I've been thinking for quite some time about the problem of pruned nodes and ongoing storage costs for full nodes. One of the things that strikes me as odd is that we only really have two settings.</div><div><br></div><div>A. Prune everything except the most recent blocks, down to the cache size</div><div>B. Keep everything since genesis</div><div><br></div><div>From my observations and conversations with various folks in the community, they would like to be able to run a "partially" pruned node to help bear the load of bootstrapping other nodes and helping with data redundancy in the network, but would prefer to not dedicate hundreds of Gigabytes of storage space to the cause.</div><div><br></div><div>This led me to the idea that a node could randomly prune some of the blocks from history if it passed some predicate. A rough sketch of this would look as follows.</div><div><br></div><div>1. At node startup, it would generate a random seed, this would be unique to the node but not necessary that it be cryptographically secure.</div><div>2. In the node configuration it would also carry a "threshold" expressed as some percentage of blocks it wanted to keep.</div><div>3. As IBD occurs, based off of the threshold, the block hash, and the node's unique seed, the node would either decide to prune the data or keep it. The uniqueness of the node's hash should ensure that no block is systematically overrepresented in the set of nodes choosing this storage scheme.</div><div>4. Once the node's IBD is complete it would advertise this as a peer service, advertising its seed and threshold, so that nodes could deterministically deduce which of its peers had which blocks.</div><div><br></div><div>The goals are to increase data redundancy in a way that more uniformly shares the load across nodes, alleviating some of the pressure of full archive nodes on the IBD problem. I am working on a draft BIP for this proposal but figured I would submit it as a high level idea in case anyone had any feedback on the initial design before I go into specification levels of detail.</div><div><br></div><div>If you have thoughts on</div><div><br></div><div>A. The protocol design itself</div><div>B. The barriers to put this kind of functionality into Core</div><div><br></div><div>I would love to hear from you,</div><div><br></div><div>Cheers,</div><div>Keagan</div></div>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href="mailto:bitcoin-dev@lists.linuxfoundation.org" target="_blank">bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href="https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" rel="noreferrer" target="_blank">https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><b>Igor Cota</b><div>Codex Apertus d.o.o.<br></div></div></div></div></div>