Hey guys, As you all know, while Decred continues to grow, the amount of data in the blockchain becomes larger and larger.... What do you guys think of having a signed copy of the blockchain provided as an official release with periodic updates? This wouldn't have to be done with every software release as the devs push them out pretty quickly, but what about every 6044 blocks when the block reward goes down? At the current height of the time of writing, we are at 28,579 blocks, and the space these blocks take up is almost at 250 MB. I understand that providing this could substantially increase the web server's bandwidth utilization, so what if it was released as a torrent and shared through a separate P2P network? This could ease the strain on the public nodes that normally serve the blockchain by having them converge just the newest blocks and also provide a faster setup time for new users who may be in a rush. The only limiting factor at this point would be your CPU and how quickly it can process the blocks. Even so, I have found that copying the data/mainnet directory from a fully sync'd node to a new computer and then initializing dcrd is quicker than downloading the entire blockchain using the Decred public peers (read: the normal way). And last but not least, would there be any security concerns in doing this? I know if one bad copy of the blockchain joins the network it will be quickly rejected and repaired, but what if hundreds or even thousands of the same "bad copy" came online? Would this cause complete chaos and destruction with two major forks in the chain? I'm curious to hear other thoughts from the forum and also input from the project managers if this is something they would like to do.
This is sort of built-in already. There are checkpoints for the blockchain: https://github.com/decred/dcrd/blob...fe5906bc534613058/chaincfg/params.go#L301-304 Obviously more need to be added now that the chain has grown. Bitcoin used to have a torrent for bootstrap.dat which contained the blockchain data but they abandoned it when they made syncing just as fast as torrenting/importing bootstrap.dat. Unfortunately dcrd isn't not quite at that level yet so this would be useful. There is an issue open with some notes and an example implementation if anyone wants to take a shot at it: https://github.com/decred/dcrd/issues/27 This was certainly a real possibility before stake validation height (4096) where someone could mine a long sidechain and force everyone to reorganize to them. In fact I did that on accident on testnet a time or two since I was the only one GPU mining and everyone else was CPU mining. It should be near impossible in practical terms now.
We have actually considered this as part of our stakepool offering. Both direct and P2P downloads. We have not solidified anything yet. Stay tuned.
I did not know about the checkpoints so thank you for pointing that out! If more of these checkpoints are added, there shouldn't be any problem with anyone packaging and hosting the blockchain as a download. With the current strength of the blockchain, I don't think there would be any issue even without the checkpoints in place in the code, but I'm sure people would be more trusting if they are updated. I remember those days. After a quick torrent download I was putting my GTX 460 to good use! Sweet!
Didn't remember if we wanted to talk about that yet, but yeah, it would be neat for Staking pools to have blockchain downloads available, since you've got to have a copy of it anyway.
I think this will be very useful in the future if there is going to be a really secure way to provide that blockchain copy for download.