P2P Network

1. Steps

When a node connects to the blockchain network for the first time, it follows a series of steps to establish a connection, synchronize with the network, and become a fully participating node. Here is an overview of these steps along with the messages typically exchanged:

  1. Network Discovery:
  2. Handshaking:
  3. Synchronization:
  4. Validation and Consensus:
  5. Peer-to-Peer Networking:

1.1. Connection Path

send version messagereceive version message → check protocol compatibility → send verack messagegetheaders messagereceive headers message

→ check their validity and links to the existing blockchain

getdata message

→ receives block message

→ verifies each block