1

It seems my 'getheaders' request is being ignored by peers. I've followed the implementation: https://en.bitcoin.it/wiki/Protocol_documentation#getheaders without success.

If I change it to 'getblocks' then it returns an inv[500] message just fine. But for some reason, it's not returning a 'headers' packet when requesting headers.

I'm connected to over 100 peers, and still no success.

Has anyone else had similar trouble before? Any guidance is appreciated.

The request values are as follows:

    magic=3908297187
    command=getheaders
    length=69 
    checksum=1021834552
    payload=[version=70013, hashCount=1, blockLocatorHash=[00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048], hashStop=0000000000000000000000000000000000000000000000000000000000000000]

and the encoded bytes are:

e3e1f3e876657273696f6e000000000069000000a4d49d4e7d11010004000000000000002cb0db5d73010000000000000000000000000000000000000000ffff7f000001208d000000000000000000000000000000000000ffff0fa518f420a100ecfbdaa2585542132f626974636f696e6a2d73763a302e302e372f0000000000

Just to note, when serializing, i reverse the blockLocatorHash bytes as mentioned in the wiki.

Cheers,

5
  • 1
    It would likely help answerers if you were to share the actual request that you are sending, and the response that you are receiving. – Murch Jul 17 '20 at 17:12
  • Thanks for the response. I've updated my question. – Michael Fletcher Jul 17 '20 at 17:49
  • Do you get any messages in debug.log on the node you're querying, if you enable -debug=net? – Pieter Wuille Jul 17 '20 at 18:08
  • I'm pushing the raw transaction to remote peers without response, and there's nothing to suggest the message didn't send unsuccessfully. – Michael Fletcher Jul 17 '20 at 18:17
  • Voting to close as the asker clarified that they are troubleshooting communication with some altcoin client. – Murch Jul 17 '20 at 21:43
2

It looks like the magic bytes you are using isn't the Bitcoin magic bytes. You have e3e1f3e8 but Bitcoin's network magic is f9beb4d9.

1
  • 1
    Sorry i should have clarified, i'm trying to connect to a BSV node – Michael Fletcher Jul 17 '20 at 20:46

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