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:

    payload=[version=70013, hashCount=1, blockLocatorHash=[00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048], hashStop=0000000000000000000000000000000000000000000000000000000000000000]

and the encoded bytes are:


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


  • 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

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
    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.