Author

Topic: Sender\Receiver address info backward in Version message? (Read 942 times)

legendary
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
Also, I underlined in green the port which is 8333 in both cases. Why is it 8333 in both cases instead of 62036 which Wireshark says is the port on the sender's end?
Each side already knows the port in use for this particular connection. The port they are exchanging is the port on which they accept inbound connections. That will tell the side that accepted the connection how other nodes can reach the node that connected to it.
sr. member
Activity: 249
Merit: 251
Okay, Thank You.

I'll update the wiki.
administrator
Activity: 5222
Merit: 13032
I'm pretty sure the wiki is wrong here. The code says:
Code:
PushMessage("version", VERSION, nLocalServices, nTime, addrYou, addrMe,
                    nLocalHostNonce, string(pszSubVer), nBestHeight);
addrYou comes first.
sr. member
Activity: 249
Merit: 251
I'm interested in some clarification. The documentation suggests that within a Version message, the Sender address info goes first, then the Recipient. But when I look at a packet, it is flipped as I show in the screenshot. (My external IP is in yellow, and is followed by the sender's IP).
Also, I underlined in green the port which is 8333 in both cases. Why is it 8333 in both cases instead of 62036 which Wireshark says is the port on the sender's end?
Thank You!

From the documentation on the Wiki:

Version message:
 9C 7C 00 00                                                                   - 31900 (version 0.3.19)
 01 00 00 00 00 00 00 00                                                       - 1 (NODE_NETWORK services)
 E6 15 10 4D 00 00 00 00                                                       - Mon Dec 20 21:50:14 EST 2010
 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 DA F6 - Sender address info - see Network Address
 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 02 20 8D - Recipient address info - see Network Address
 DD 9D 20 2C 3A B4 57 13                                                       - Node random unique ID
 00                                                                            - "" sub-version string (string is 0 bytes long)
 55 81 01 00                                                                   - Last block sending node has is block #98645


From my own connection:

Jump to: