Bitcoin Forum
September 19, 2018, 12:27:30 AM *
News: ♦♦ Bitcoin Core users must update to 0.16.3 [Torrent]. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How did bitcoin nodes sync blockchain in the first version of bitcoin?  (Read 272 times)
croraf
Newbie
*
Offline Offline

Activity: 10
Merit: 0


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.


Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537316850
Hero Member
*
Offline Offline

Posts: 1537316850

View Profile Personal Message (Offline)

Ignore
1537316850
Reply with quote  #2

1537316850
Report to moderator
1537316850
Hero Member
*
Offline Offline

Posts: 1537316850

View Profile Personal Message (Offline)

Ignore
1537316850
Reply with quote  #2

1537316850
Report to moderator
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:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!