Skip to content

Commit

Permalink
Edited ch08.asciidoc with Atlas code editor
Browse files Browse the repository at this point in the history
  • Loading branch information
IndexPro committed May 1, 2017
1 parent 53bb9fa commit 80e89de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch08.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Running a full blockchain node gives you the pure bitcoin experience: independen

=== Exchanging "Inventory"

The first thing a full node will do once it connects to peers is try to construct a complete blockchain. If it is a brand-new node and has no blockchain at all, it only knows one block, the genesis block, which is statically embedded in the client software. Starting with block #0 (the genesis block), the new node will have to download hundreds of thousands of blocks to synchronize with the network and reestablish the full blockchain.
((("bitcoin network", "exchanging inventory")))The first thing a full node will do once it connects to peers is try to construct a complete blockchain. If it is a brand-new node and has no blockchain at all, it only knows one block, the genesis block, which is statically embedded in the client software. Starting with block #0 (the genesis block), the new node will have to download hundreds of thousands of blocks to synchronize with the network and reestablish the full blockchain.

The process of syncing the blockchain starts with the +version+ message, because that contains +BestHeight+, a node's current blockchain height (number of blocks). A node will see the +version+ messages from its peers, know how many blocks they each have, and be able to compare to how many blocks it has in its own blockchain. Peered nodes will exchange a +getblocks+ message that contains the hash (fingerprint) of the top block on their local blockchain. One of the peers will be able to identify the received hash as belonging to a block that is not at the top, but rather belongs to an older block, thus deducing that its own local blockchain is longer than its peer's.

Expand Down

0 comments on commit 80e89de

Please sign in to comment.