Author

Topic: Version message not getting a response (Read 193 times)

legendary
Activity: 1040
Merit: 2785
Bitcoin and C♯ Enthusiast
May 11, 2019, 11:13:20 PM
#4
Take a look at protocol versions and what they do here: https://bitcoin.org/en/developer-reference#protocol-versions
newbie
Activity: 2
Merit: 4
Protocol version 106 is incredibly old. Bitcoin Core (the most commonly used node software) will not respond to anything older than version 31800.

Oh i didn't know that. On further inspection the node i was trying to contact (93.175.204.121) is indeed using bitcoin core, so that is probably the reason.
I will update my code to work with protocol version > 31800 and see if it works.

Thank you for the quick response Smiley
staff
Activity: 3458
Merit: 6793
Just writing some code
Protocol version 106 is incredibly old. Bitcoin Core (the most commonly used node software) will not respond to anything older than version 31800.

Why aren't you using the modern version message (which is largely the same format) with a higher version number?
newbie
Activity: 2
Merit: 4
Hi
I'm in the beginning stages of learning the bitcoin protocol.
Ive been reading about the specification from here.

So far i've made a small c program that generates a "version" message (of protocol version < 106) and sends it to another node via a socket.
But for whatever reason i'm not getting any response (i'm expecting a "verack" message).

I'm setting the following fields:


Header:
------------
[uint32_t] Magic value: 0xD9B4BEF9
[char[12]] Command: "version" (followed by 5 zero bytes of padding)
[uint32_t] Length: 46
[uint32_t] Checksum: 0xCDA4C5D9

Payload:
------------
[int32_t]   Version: 1
[uint64_t] Services: 0
[int64_t]   Timestamp: 1557620555
[uint64_t] Addr_recv->Services: 0
[char[16]] Addr_recv->IP (str): ::ffff:93.175.204.121 (i'm converting this to big endian before i send)
[uint16_t] Addr_recv->Port: 8333 (i'm converting this to big endian before i send)



Here is a dump of the exact message im sending (24 byte header, 46 byte payload - 70 bytes total).

I was hoping maybe someone with experience in this area could look at it and tell me if there is something wrong with it?

I know this is kind of a wired thing to ask but i really dont know what else to do, i've been reading the protocol specification so many times now and i cant tell whats wrong.
Thanks for reading.
Jump to: