January 2019
Beginner to intermediate
372 pages
11h 17m
English
When a new node joins a network, it connects to one of the available peers in the network; it then tries to exchange its block information with the peer, and updates the local blockchain, if required.

The node sends a chain length or last block query message after connecting to the peer. Requesting the chain length is equivalent to requesting the last block to identify its index. If the received block cannot be appended to the local blockchain due the hash mismatch, then the node sends a message to its peer asking it to send all the blocks. The node can also broadcast ...