Author

Topic: What is block forwarding logic of the Satoshi Client? (Read 447 times)

hero member
Activity: 555
Merit: 654
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://bitcointalksearch.org/topic/satoshi-client-operation-block-exchange-41729 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.
Jump to: