- Mastering Ethereum
- Merunas Grincalaitis
- 146字
- 2021-06-24 15:01:09
Peer-to-peer layer
This is the lowest layer that Ethereum has to function properly. The P2P layer is in charge of communicating nodes with each other in a real-time fashion without middlemen via messages.
The following diagram shows what the P2P layer contains:
Every node in the P2P network is discoverable because of a unique IP identifier and a hash table that contains data about every node that you are connected to. For instance, when you connect to node 123.456.123, you can send a request to see which nodes it is connected to, thus giving you the option to extend your range of known nodes that you can connect in the future. This is important for being able to discover nodes and connect to new peers when required. The more nodes you are connected to, the stronger your communication will be for getting the important messages faster.