Author

Topic: Node not responding to getdata message (Read 1323 times)

legendary
Activity: 1050
Merit: 1000
You are WRONG!
November 14, 2011, 05:38:23 AM
#8
Hmm... I'm pretty sure my network code puts a checksum on those messages.
mine too and they are working. putting checksums on anything, but version and verack
administrator
Activity: 5222
Merit: 13032
November 14, 2011, 05:29:12 AM
#7
Hmm... I'm pretty sure my network code puts a checksum on those messages.
TT
member
Activity: 77
Merit: 10
November 13, 2011, 08:22:03 AM
#6
I just dropped the four checksum bytes and it worked!

I think this detail was omitted in https://en.bitcoin.it/wiki/Protocol_specification

It says
Quote
The version and verack messages do not have a checksum, the payload starts 4 bytes earlier.

Apparently, this is also the case for getdata messages. Someone might want to update the wiki.

-TT
TT
member
Activity: 77
Merit: 10
November 13, 2011, 01:55:32 AM
#5
OK, I received the following data:
----
Received data: 0xf9 0xbe 0xb4 0xd9 0x69 0x6e 0x76 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x25 0x00 0x00 0x00 0x8f 0xa1 0x8b 0x5e 0x01 0x01 0x00 0x00 0x00 0x79 0xb8 0x25 0x10 0x3d 0xca 0x85 0xf8 0x90 0xc2 0x24 0x79 0x22 0x1c 0x27 0xab 0x4f 0x73 0x60 0x49 0x94 0x54 0x3a 0xe8 0x3e 0x4a 0x4e 0x10 0x43 0x51 0x2b 0x8c
----
Formatted in human-readable form, it's:

Command: inv
Payload size(bytes): 37
Inventory count: 1
  Item 1:
    Type: MSG_TX
    Hash: 8c2b5143104e4a3ee83a54944960734fab271c227924c290f885ca3d1025b879

I'm sending back:
----
Sending getdata: 0xf9 0xbe 0xb4 0xd9 0x67 0x65 0x74 0x64 0x61 0x74 0x61 0x00 0x00 0x00 0x00 0x00 0x25 0x00 0x00 0x00 0x8f 0xa1 0x8b 0x5e 0x01 0x01 0x00 0x00 0x00 0x79 0xb8 0x25 0x10 0x3d 0xca 0x85 0xf8 0x90 0xc2 0x24 0x79 0x22 0x1c 0x27 0xab 0x4f 0x73 0x60 0x49 0x94 0x54 0x3a 0xe8 0x3e 0x4a 0x4e 0x10 0x43 0x51 0x2b 0x8c
----
administrator
Activity: 5222
Merit: 13032
November 13, 2011, 01:16:22 AM
#4
Ah, you're right about that.

Post a hexdump of what you're sending.
TT
member
Activity: 77
Merit: 10
November 13, 2011, 12:27:00 AM
#3
If the payload is the same, wouldn't the checksum also remain the same?
administrator
Activity: 5222
Merit: 13032
November 13, 2011, 12:22:52 AM
#2
Are you updating the checksum?
TT
member
Activity: 77
Merit: 10
November 13, 2011, 12:12:06 AM
#1
I'm working on the network i/o for a bitcoin node. Immediately after receiving an inv message from a peer,
I'm sending it back but just changing the "inv" command to "getdata". It is my understanding that the inventory
list structure is identical in both types of message, and therefore the payload can be identical. Only the 12 byte
command code needs to be changed from {'i','n','v',0,0,0,0,0,0,0,0,0} to {'g','e','t','d','a','t','a',0,0,0,0,0}. Other
nodes seem to recognize the message as a getdata message, but are not replying with any tx or block messages.

Any ideas why?
Jump to: