Author

Topic: How did bitcoin nodes sync blockchain in the first version of bitcoin? (Read 344 times)

newbie
Activity: 14
Merit: 0
Network latency and serialization delay (transmission time) to communicate a block between nodes. The transmission time can be influenced by how predictable the content of the block is due to the use of efficient transmission techniques like BIP152 and FIBRE.
newbie
Activity: 10
Merit: 1
By sync I mean how nodes advanced their chain (messages that happen, algorithm), especially when side block or orphaned block was announced by a peer.

Please answer how it occurred in initial version of bitcoin, prior to improvements that were added in v0.10 or whatever.

If I understood correctly it goes like this:

  • I get the announcement from a peer that he found a new tip in his blockchain. (so called INV message)
  • I send him the block locator message with last 10 hashes from the tip of my blockchain.
  • Me and him could be on different branches so he has to detect which hash do we have in common (the hash where fork happened). Or we are on the same branch and he just advanced the branch by one hash. NOTE: If he does not find the common hash he will ask me to send hashes further back my chain (fork happened somewhere earlier).
  • When he detects the common hash, he will send me the headers from this hash up to the newly found hash. I validate each header, stopping if a header in this process is invalid.
  • If his chain is now longer than mine (edit: and download the transaction part's of his blocks, verify them then) I switch to new chain.


Jump to: