0

When we install Geth client and point it to homestead or test network, first thing it does is, syncs the whole blockchain.

What I am not quite sure is when we say the blocks are copied to the new node the question which arises to me is where from these blocks are getting copied.

Believe each node is running the EVM on their own machine. There maybe nodes which hold the whole block chain and there will be few which use the light version (i..e i believe is downloaded with partial block chain).

Questions 1. Does the Geth client searches for a peer having the whole block chain and then syncs with it 2. Believe there is central point where the whole block chain data is present. So not sure how the whole process is functioning

1

Your first guess is correct. It's a P2P process. Geth discovers and connects to other peers to sync the chain data.

You can type net.peerCount or admin.peers in the console to check your current list of peers. Your node won't start syncing until the peer count is greater than 0.

  • If none of the peer is having full blockchain data then where from will it pull the whole blockchain data. Secondly if only one or two peers are having full data won't it slow down those two peers very much. Also when data is synced is it pulling data from one full node or from multiple nodes? Can you share any link where it explains this process – Susmit Apr 8 '17 at 4:32
  • I think each node helps you sync until their latest block, which can be assumed the "last" block for most peers. Although not in great detail, this page explains syncing a little. Also this page explains the peer discovery protocol a little. – jeff Apr 8 '17 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.