Handshakes
Handshakes are used to establish connections to peers.
Flow
The default handshake flow is made up of the connecting peer sending a handshake request and the receiving peer responding with a handshake response.
It should be noted that not all other messages are banned during handshakes, for example, support flag requests and even some protocol requests can be sent.
Handshake Request Checks
The receiving peer will check:
- The
network_id
is network ID expected.1 - The connection is an incoming connection.2
- The peer hasn't already completed a handshake.3
- If the network zone is public, then the
peer_id
must not be the same as ours.4 - The core sync data is not malformed.5
Handshake Response Checks
The initiating peer will check:
- The
network_id
is network ID expected.6 - The number of peers in the peer list is less than
250
.7 - All peers in the peer list are in the same zone.8
- The core sync data is not malformed.5
- If the network zone is public, then the
peer_id
must not be the same as ours.9