Bitcoin Forum
September 27, 2018, 11:08:22 PM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: sending getblocks message but not getting back the expected inv  (Read 500 times)
yzernik
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 14, 2014, 12:48:08 AM
 #1

Similar question to this one https://bitcointalk.org/index.php?topic=54892.0

I am trying to download the blockchain from the beginning (genesis). I have hardcoded the genesis block in my client program.

I have most of the protocol message are working. I connect using the version and verack messages. I can send a ping and get back the correct pong.

But when I send a getblocks message, I don't get back any inv with a MSG_BLOCK in it. I periodically receive inv messages, but they only contain a few MSG_TX's.

These are the raw bytes that I send as my getblock message.

Code:
f9beb4d9676574626c6f636b73000000450000008634d5ae0100000001000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f0000000000000000000000000000000000000000000000000000000000000000

I also tried it with the genesis block hash reversed, without any success.
1538089702
Hero Member
*
Offline Offline

Posts: 1538089702

View Profile Personal Message (Offline)

Ignore
1538089702
Reply with quote  #2

1538089702
Report to moderator
1538089702
Hero Member
*
Offline Offline

Posts: 1538089702

View Profile Personal Message (Offline)

Ignore
1538089702
Reply with quote  #2

1538089702
Report to moderator
1538089702
Hero Member
*
Offline Offline

Posts: 1538089702

View Profile Personal Message (Offline)

Ignore
1538089702
Reply with quote  #2

1538089702
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
TierNolan
Legendary
*
Offline Offline

Activity: 1190
Merit: 1001


View Profile
January 14, 2014, 05:13:30 PM
 #2

I also tried it with the genesis block hash reversed, without any success.

It seems ok, decoding:

MAGIC: f9beb4d9
Command: 676574626c6f636b73000000
Size: 45000000
CRC: 8634d5ae

Version: 01000000
count: 01
Genesis: 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
Stop: 0000000000000000000000000000000000000000000000000000000000000000

Can you try with the genesis set to all zeros and also with count==0 (so just the stop field).

If you give it no block it knows about, it should start again at genesis.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
yzernik
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
January 15, 2014, 07:26:01 PM
 #3

Thank you. It looks like my problem is the way that I am decoding the inv message.
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!