I'm trying to send a protocol version message to my node on port 8333. I found this site that explains how to send a version message from the command line. I have a C++ app that is creating the message, but I thought I would try sending it from the command line before trying to do it in my C++ application.

I'm on a local network sending the message from to the node at The node is running Bitcoin Core 23.0.

According to the site linked above, the following command can be used to send a version message and print the verack that it receives. Instead, it pauses for a few seconds and prints nothing.

echo -en "f9beb4d976657273696f6e00000000005a000000365c501771110100010000000000000091211e6300000000010000000000000000000000000000000000ffffc0a8012f208d010000000000000000000000000000000000ffffc0a8012c208daabbccddeeff11350454657374d87f0b0000" | xxd -r -p | nc 8333 -i 2 | xxd

Here is a breakdown of the most recent message I've tried to send:





Here is what each of the above lines is supposed to be:

Mainnet byte sequence
"version" padded with zeroes
Length of payload (little endian)
Payload checksum (1st 4 bytes of double SHA256 converted to little endian)

Version 70001 (little endian)
Timestamp (little endian)
Recipient address/port =

Sender address/port =
Nonce (random)
User agent = "Test"
Last block received = 753624 (little endian)

Relay = false

My bitcoin.conf file contains:


Is there something that needs to be added to bitcoin.conf?

Is there something wrong with the version message I am trying to send?

What else could the problem be?

  • Try adding "debug=net" to your bitcoin.conf, restart bitcoind, try your command again, and see if anything relevant appears in the debug.log file. Sep 11 at 18:54
  • It added a line in debug.log that looks like this: 76890:2022-09-11T19:16:25Z connection from accepted. However, it did not return a verack to the command I ran on the command line. I also noticed that while the command was waiting, an Unroutable Inbound peer with the same ip address appeared in bitcoin-qt and disappeared when the command finally finished.
    – Zephyrus
    Sep 11 at 19:23
  • Looking at some line in debug.log that came after that, I see a Wrong checksum message that shows the same 4-byte checksum that I sent. Going to look at it more carefully in a bit, but that's a big clue.
    – Zephyrus
    Sep 11 at 19:36
  • 1
    FWIW, the phrase "1st 4 bytes of double SHA256 converted to little endian" is meaningless. SHA256 outputs 32 bytes, the first 4 of those are the checksum. Bitcoin does in some places interpret the SHA256 output bytes as numbers (in particular, in block hashes when determining PoW), but there are no numbers involved here - just bytes. Sep 11 at 21:35
  • And that was my incorrect assumption, that those 4-bytes was interpreted as a number and needed to be converted to little endian. Commenting those lines out fixed the problem.
    – Zephyrus
    Sep 11 at 22:05


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.