Bitcoin Forum
June 17, 2024, 04:41:24 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sender\Receiver address info backward in Version message?  (Read 943 times)
Atheros (OP)
Sr. Member
****
Offline Offline

Activity: 249
Merit: 251



View Profile WWW
July 26, 2011, 03:35:02 AM
 #1

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:


BM-GteJMPqvHRUdUHHa1u7dtYnfDaH5ogeY
Bitmessage.org - Decentralized, trustless, encrypted, authenticated messaging protocol and client.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5236
Merit: 13088


View Profile
July 26, 2011, 04:34:14 AM
 #2

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.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Atheros (OP)
Sr. Member
****
Offline Offline

Activity: 249
Merit: 251



View Profile WWW
July 26, 2011, 04:53:49 AM
 #3

Okay, Thank You.

I'll update the wiki.

BM-GteJMPqvHRUdUHHa1u7dtYnfDaH5ogeY
Bitmessage.org - Decentralized, trustless, encrypted, authenticated messaging protocol and client.
JoelKatz
Legendary
*
Offline Offline

Activity: 1596
Merit: 1012


Democracy is vulnerable to a 51% attack.


View Profile WWW
July 26, 2011, 04:58:12 AM
 #4

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.

I am an employee of Ripple. Follow me on Twitter @JoelKatz
1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!