Skip to content

P2P Protocol

Alexander Chepurnoy edited this page Jan 21, 2021 · 4 revisions

Handshake

First of all, nodes are doing handshaking by sending each other handshake messages. Handshaking details are provided in dedicated P2P Handshaking doc

Handshake format

Length is in bytes:

Length Field Name Details
4 Magic bytes Network-specific magic bytes, see Note 1.
1 Message code 75 (in decimal)
4 Message body length Length of handshake body (specified below), as signed 32-bit integer
* Message body Handshake body (specified below)
4 Handshake body checksum First four bytes of blake2b(handshake body)

[TODO: provide descriptions for possible values of message body]