|
1 |
| -# Execution p2p |
| 1 | +# DevP2P |
2 | 2 |
|
3 |
| -> :warning: This article is a [stub](https://en.wikipedia.org/wiki/Wikipedia:Stub), help the wiki by [contributing](/contributing.md) and expanding it. |
| 3 | +This section will cover the networking protocol used by the Execution Layer (EL). |
| 4 | +First, we will provide some background on computer networks and then we will dive into the |
| 5 | +specifics of the EL's networking protocol. |
4 | 6 |
|
5 |
| -The execution layer implements [devp2p](https://github.com/ethereum/devp2p) as its communication protocol with nodes in the network. It includes various subprotocols and features: eth, snap, les, pip, wit. |
| 7 | +## Computer networks background |
| 8 | +* Distributed network of nodes |
| 9 | +* OSI vs TCP/IP model |
| 10 | +## EL's networking specs |
| 11 | +* peer-to-peer networking protocol |
| 12 | +* gossiping data (1:N) and request/response (1:1) communication |
| 13 | +* Client software divided into Execution and Consensus (each one have its own p2p network) |
| 14 | +* Execution network propagates transactions |
| 15 | +* Two network stacks: |
| 16 | + * UDP-based transport layer (discovery and finding peers) |
| 17 | + * TCP-based transport layer (devp2p, exchange information) |
| 18 | +* Discovery protocol |
| 19 | + * bootstrap nodes |
| 20 | + * Kademlia |
| 21 | + * Hash tables |
| 22 | + * PING/PONG hashed messages |
| 23 | + * Find neighbours: list of peers |
6 | 24 |
|
7 |
| -Because libp2p (used by CL) was not ready when Ethereum was created, devp2p was created as Ethereum's own p2p protocol stack. |
| 25 | +start client --> connect to bootnode --> bond to bootnode --> find neighbours --> bond to neighbours |
| 26 | + |
| 27 | +## ENR: Ethereum Node Records |
| 28 | +* Node's identity |
| 29 | +* Object |
| 30 | + * signature (hash) |
| 31 | + * sequence number |
| 32 | + * arbitrary key-value pairs |
| 33 | + |
| 34 | +## DevP2P specs |
| 35 | +* RLPx: encrypted and authenticated transport protocol |
| 36 | + * Handshake messaging |
| 37 | + * Encryption |
| 38 | + * Authentication |
| 39 | +* RLP: Recursive Length Prefix encoding |
| 40 | +* Multiplexing: multiple subprotocols |
| 41 | +* Subprotocols |
| 42 | + * LES: Light Ethereum Subprotocol |
| 43 | + * Witness Subprotocol |
| 44 | + * Wire Subprotocol |
| 45 | + * SHH: Whisper Subprotocol |
| 46 | + |
| 47 | + |
| 48 | +### Further Reading |
| 49 | +* [Geth devp2p docs](https://geth.ethereum.org/docs/tools/devp2p) |
| 50 | +* [Ethereum devp2p GitHub](https://github.com/ethereum/devp2p) |
0 commit comments