- Mastering Ethereum
- Merunas Grincalaitis
- 240字
- 2021-06-24 15:01:09
Understanding DEVP2P
DEVP2P is a networking protocol in charge of managing the negotiations between nodes when they want to interact by sending messages. Each message is encrypted using a protocol named RLPx, which allows nodes to exchange encrypted data over the network with a secure guarantee that nobody but the recipient will be able to decode the message.
For nodes to connect to each other, they expose any TCP port they would like to use, which, by default, is 30303. So, if you want to connect to a specific node, you must know exactly which port it is using, which protocol it is using, and the IP address or unique identifier of it. For instance, Whisper, the messaging protocol that we discussed earlier, uses the shh protocol, while Ethereum uses the eth protocol. This is just a simple distinction that becomes apparent when you use web3.js, because it shows each function in each corresponding protocol.
In summary, you've seen which components make up the Ethereum architecture, so you are able to discern which parts you're actually using when developing your smart contracts. You should be able to identify different protocols used in the network and understand which tools you have available.
You have just developed an increased awareness when it comes to the tools that are at your disposal, which is essential for all kinds of Ethereum developers that want to implement time-tested solutions to common problems.