Bitcoin Forum
June 15, 2024, 02:15:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is block forwarding logic of the Satoshi Client?  (Read 422 times)
Sergio_Demian_Lerner (OP)
Hero Member
*****
expert
Offline Offline

Activity: 554
Merit: 648


View Profile WWW
February 10, 2014, 01:36:04 AM
 #1

After some time, I'm reading the reference implementation in order to document what is the block forwarding logic, which I have forgotten.
But the logic is spread all over main.cpp.
Could anyone with deeper knowledge answer these simple questions with true/false?

a. An orphan block received from a peer is not announced to the remaining peers until the parents are found ("inv" command not sent immediately).

b. A stale block (not in the best chain) received from a peer is not announced to the remaining peers until it becomes part of the best chain ("inv" command not sent immediately).

c. Some blocks are forwarded even if they are not requested by peers ("block" command issued even if "getdata" not received). Which blocks?

d. Orphan blocks can be requested by peers using "getdata".

e. Stale blocks can be requested by peers using "getdata".

f. Nodes request whatever block it's announced by a peer "inv" command for which they don't have the hash, being stale, orphan or invalid.

Assuming that three Satoshi nodes are connected, what would be the interaction between these nodes regarding received orphan, stale and best-chain blocks?
This link https://bitcointalk.org/index.php?topic=41729.0 describes the interaction, but.. can it be described in more simple words?

I think this information is useful for anyone trying to understand how the actual protocol works. 

Best regards, Sergio.
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!