Author

Topic: Getting block headers (Read 720 times)

legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
April 20, 2013, 06:34:53 AM
#5
Thanks!


I didn't see your edit
There is a new field in the version message you send which tells the other peer not to send you inv's like this.
Thanks a lot, that'll clean my display

To receive block headers, you need to ask with a 'getheaders' message, it doesn't follow the 'getblocks' -> receive 'inv' -> 'getdata' -> receive block  message sequence.
Yeah, I was mixing getheaders and getblocks
full member
Activity: 154
Merit: 100
April 20, 2013, 06:27:43 AM
#4
The client will relay invs to its other peers for every new block it receives. If it's syncing, then it receives a lot of new blocks and so you get a lot of invs.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
April 20, 2013, 05:57:24 AM
#3
Absolutely
Does this change anything? I didn't saw anything about it
I didn't finish reading https://en.bitcoin.it/wiki/Satoshi_Client_Block_Exchange though


Edit:
I just checked what the two responding nodes (localhost and 98.26...) and it looks like they are sending me their last blocks
localhost is sending me hashes of blocks number ~134k
full member
Activity: 154
Merit: 100
April 20, 2013, 05:52:49 AM
#2
Is your local node syncing at the time?

There is a new field in the version message you send which tells the other peer not to send you inv's like this.

To receive block headers, you need to ask with a 'getheaders' message, it doesn't follow the 'getblocks' -> receive 'inv' -> 'getdata' -> receive block  message sequence.
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
April 20, 2013, 04:55:35 AM
#1
Hi
I ran into something strange when I'm downloading block hashes from bitcoin nodes (let's call my script 'BD')
When I'm connecting to 63.247.147.163 (all fallback nodes on the wiki* behave the same way), the following happens:
  • BD sends version
  • BD receives version and verack
  • BD sends verack
  • BD regularly receives tx inv's (about 1 per second)
Moreover, sending getblocks doesn't change anything and I still receive only tx inv's

On the other hand, when I connect to my local bitcoin node (127.0.0.1 ofc), that becomes:
  • BD sends version
  • BD receives version and verack
  • BD sends verack
  • BD receives tons of block hash inv's (yeah, TONS OF THEM)
I didn't even try to send a getblocks...


So, why does my local node behaves differently than the other ones?



(*) all the nodes I tested on http://blockchain.info/connected-nodes too



Edit: 98.26.149.98:8333 sends me some block headers after a getblocks
Jump to: