I’m attempting to fetch blocks utilizing P2P messages however at block 501500 I by no means acquired any
Right here how I do it :
I’m connecting to a node model/verack occurs easily. I immediately reply any
ping message. I’ve been in a position to do the getblocks/inv/block course of as much as to dam 501500 the place I’m presently caught. I haven’t got timeout so I’m simply ready for my
block messages. I additionally observed I’m not receiving
ping message anymore. Might or not it’s that the node disconnected from me ?
Once I ask blocks from the beginning I’ve a solution. The node is meant to be synced as I get its begin peak from the model message and it matches present block peak.
Is there a motive why the node is disconnecting from me ? Any concept how I may debug or repair this ?
Be aware: I additionally tried with completely different nodes however I by no means get the blocks.
Replace: I occur to have additionally a python script doing the identical factor (fetching blocks) and I attempted utilizing it. It really works! (more often than not). So certainly typically I’m being ignored by the node. However I additionally imagine in my rust implementation I’ve a difficulty when studying messages type the buffer.
I learn first the 24 first bytes of a message so I get the command and the payload dimension. Then I block till I do know I’ve all of the payload. Sadly it seems to be just like the payload is rarely absolutely out there (however most likely despatched by the opposite node). I by no means had this difficulty on different networks however I imagine right here it’s as a result of we now have blocks at full capability.