Reading Bitcoin Developer Guide, I couldn't fully answer following question:
What is the exact purpose of the Stopping Hash field inside a GetBlocks Message?


Node1 announces block B3, using an 'inv' message with B3's gash.

Node2 does not know about B3, or its parent B2, but does know the grandparent B1. It sends a getblocks message, starting from B1, but stopping at B3.

Node1 replies with an inv for B2, but not with B3 or any potential successor B4 thay may have appeared.

The purpose is just avoiding sending too many hashes in case the sender already knows some successor.

Note that since Bitcoin Core 0.10.0, getblocks is no longer used. getheaders has similar logic though.

  • By "[...], but stopping at B3" you mean that Node2 requests only 1 block saying "give me B2's hash but not B3's hash"? So can we say Stopping Hash defines how many block header hashes are requested, unlike the default 00000..00000 Stopping Hash? May 5 '15 at 15:16
  • 1
    No, not how many. Just the one after which the sender can stop. May 5 '15 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.