Bitcoin Forum
May 02, 2024, 10:38:42 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Version message not getting a response on: May 12, 2019, 12:45:58 AM
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.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!