1

I'm trying to send a raw bitcoin transaction through a raw socket connection in python. To debug I'm using wireshark to sniff the packets.

Wireshark figures out that the packet is for Bitcoin and that it's a 'version' message, and gets the first couple fields right, but then neglects the checksum field and instead assigns what should be the checksum to the protocol version, throwing everything else off. I can't seem to get to the bottom of it.

Other message types, like 'tx', include the checksum but have other issues (I'll get to later). Any ideas why wireshark isn't picking up on the checksum for the version message?

  • Does Wireshark correctly parse transactions sent by the standard Bitcoin client? – Nate Eldredge May 24 '14 at 17:47
  • I think the issue might be an old bitcoin dissector, since checksums were only added into the version msg recently. building from source now with updates dissector. don't have the cpp-client right now so can't check. – Ethan May 24 '14 at 18:07
  • I believe the dissector for Bitcoin is broke in Wireshark, there are more issues. – Jori May 24 '14 at 18:47
  • super. is there an alternative. how can I debug my packets? – Ethan May 24 '14 at 19:39
  • 1
    Yes, the Bitcoin plugin for Wireshark is very old and doesn't include some types of messages. Your best bet is to just filter by the port and do the work manually, the types are identified correctly and are not encrypted so it's fairly easy going. – user13413 May 25 '14 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.