Bitcoin Forum
September 22, 2024, 04:56:59 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How did bitcoin nodes sync blockchain in the first version of bitcoin?  (Read 344 times)
croraf (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
October 29, 2017, 05:30:02 PM
 #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.


devopruschip
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
October 30, 2017, 06:02:00 PM
 #2

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!