Post
Topic
Board Announcements (Altcoins)
Re: [ANN][CLAM] CLAMS, Proof-Of-Chain, Proof-Of-Pearl, Recent Mandatory Update
by
presstab
on 02/07/2015, 15:35:24 UTC
I regularly update this old post with full dumps of the CLAM blockchain in bootstrap.dat format to make it easier for people to get their CLAM client synced up:

I made an updated bootstrap.dat file for people having trouble syncing their client.

It goes up to block 526400 which was staked on Thu Jun 25 05:07:28 2015.

https://s3.amazonaws.com/dooglus/bootstrap.dat

Last night in the Just-Dice chat, Thirdspace asked about the possibility of generating and syncing from "partial" bootstrap.dat files. Suppose your client went out of sync a few weeks ago and is 20,000 blocks behind. You don't want to download and import the whole bootstrap.dat file because you already have 95% of it. Is there some way of having someone make a bootstrap.dat file with just the blocks you need?

Well, the bootstrap file format is very simple: it's pretty much just the raw block data. There's no reason it has to start at block 0. So I made a commit to the CLAM client repository allowing you to run 'dumpbootstrap' and tell it which block to start the dump from. And since I had a bunch of .clam folders ready to go, I tested it:

Quote
$ cc1 getblockcount
528105

$ cc2 getblockcount
527194

$ cc1 dumpbootstrap /tmp 527200 527190

$ cp /tmp/bootstrap.dat ~/.clam.bs2/

$ cc2 stop
Clam server stopping

$ cc2
Clam server starting

$ cc2 getblockcount
527200

ie. I have two clamd processes running. One is up to date and one is behind (and not connected to any peers). I create an 11-block bootstrap from the up to date clamd, copy it into the out of date clamd's date folder, restart, and see that it has successfully imported just those blocks. The 11 block bootstrap file was just 10642 bytes long.

So I'll publish 10k block bootstrap files, along with the big one. If you're 30k blocks behind, you can simply download the last three, append them all together in order (the format is simple enough that you can stick them end to end without breaking anything) and restart the client.

See the old bootstrap.dat post for details of how to find the 10k block bootstrap files.

Edit: presstab replied, then apparently deleted his reply. He made the point that there's no harm using a full bootstrap.dat file, because it will quickly skip the blocks you already have, and the only advantage of partial bootstrap files is they're smaller.


Yes sorry about the delete I meant to press edit then deleted, then got too lazy to do anything else:P

Anyways, this gist of my post is that I didn't quite see the use, and that a normal bootstrap skips over blocks that you already have. But now that I more fully understand your reasoning behind this, and how much faster this actually will process the blocks that you already have... this is amazing! This could really be useful when you stop a bootstrap midstream and need to start it backup. Or if you have been out of sync for a month or two.