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.