Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Proposal: download the entire blockchain over bittorrent #14551
This is an improvement proposal, rather than a bug report. And I'm not a blockchain expert, so it might not be a great idea, but...
Currently I see a great usability issue in the fact that the blockchain is downloaded (synced) very slowly. For me it crashed a couple of times, which which in no way is helping adoption among not so technical users.
So why not push snapshots of the blockchain to a bittorrent DHT? People have done that with the Bitcoin blockchain - a snapshot is available for download from various places.
But manual download isn't ideal - my proposal is to include a small bittorrent client in geth (and other implementations), so that peers can use the ethereum protocol to push a particular snapshot to the DHT, and also "advertise" the same DHT key to newly joined peers.
I'm not sure if that can be secure enough, e.g. if malicious nodes won't have able to interfere and some clients end up with a fake blockchain, but I guess that can be remedied when the next block is received and it doesn't match.
I know I'm a bit vague, but that's the general idea - have a bittorrent client in the ethereum client that pushes and downloads a blockchain snapshot (e.g. each day / week) to a bittorrent DHT.
Yup, that's what I meant - "pushes and downloads a blockchain snapshot (e.g. each day / week)". The thing is, data itself is not pushed to the bittorrent network - only the hash of the data, which is a way to locate the actual data on the clients' machines, where it resides anyway
The slow sync process is probably not because of a slow download, but mostly because all blocks are fully processed to calculate and verify the state.
Blocks in a chain don't really change after a valid hash is found, so if a DHT-like network is actually faster, miners could upload the block to Swarm and clients could download the data from there after receiving the block-hashes.