Bitcoin Forum
December 04, 2016, 10:32:41 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bug? - getaddr command contains checksum despite having no payload  (Read 1618 times)
0x6763
Guest

January 13, 2011, 05:21:52 PM
 #1

This is part of a packet from the current 0.3.19 linux client:

Code:
0000   F9 BE B4 D9 67 65 74 61  64 64 72 00 00 00 00 00   ....getaddr.....
0010   00 00 00 00 5D F6 E0 E2                            ....]...

It is my understanding that if there is no payload, there should be no checksum.  Is my understanding correct and this is a bug?
1480847561
Hero Member
*
Offline Offline

Posts: 1480847561

View Profile Personal Message (Offline)

Ignore
1480847561
Reply with quote  #2

1480847561
Report to moderator
1480847561
Hero Member
*
Offline Offline

Posts: 1480847561

View Profile Personal Message (Offline)

Ignore
1480847561
Reply with quote  #2

1480847561
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480847561
Hero Member
*
Offline Offline

Posts: 1480847561

View Profile Personal Message (Offline)

Ignore
1480847561
Reply with quote  #2

1480847561
Report to moderator
1480847561
Hero Member
*
Offline Offline

Posts: 1480847561

View Profile Personal Message (Offline)

Ignore
1480847561
Reply with quote  #2

1480847561
Report to moderator
Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
January 13, 2011, 06:38:56 PM
 #2

I had the same problem, but yes the checksum for an empty message (byte[0]) is 0x5DF6E0E2 so that's correct Cheesy Useless but correct.

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
0x6763
Guest

January 13, 2011, 07:02:55 PM
 #3

I had the same problem, but yes the checksum for an empty message (byte[0]) is 0x5DF6E0E2 so that's correct Cheesy Useless but correct.

Yeah, I was able to work around it without a problem.  I asked about this in IRC a day or two ago, but no one had anything useful to say about it, so I figured I'd bring it up in the forum, so if it is a bug (seems to be no reason for it to be there), that it could get fixed.  Otherwise it might cause some problems for other people working on their own Bitcoin implementations.  I made a note about it in the wiki:

https://en.bitcoin.it/wiki/Protocol_specification#getaddr
Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
January 14, 2011, 01:02:21 AM
 #4

Well to be precise there are quite a few messages without payload that have checksums (see ping for example) I don't think this should be labeled as a bug, it's simpler not to have a special case for empty payload messages when stripping the message header :-)

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
0x6763
Guest

January 14, 2011, 02:21:33 AM
 #5

Well to be precise there are quite a few messages without payload that have checksums (see ping for example) I don't think this should be labeled as a bug, it's simpler not to have a special case for empty payload messages when stripping the message header :-)

So do all messages (except 'version' and 'verack') contain checksums regardless of whether or not they have a payload?
Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
January 14, 2011, 01:43:11 PM
 #6

Yup

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
0x6763
Guest

January 14, 2011, 01:44:21 PM
 #7

Yup

Interesting, thanks.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!