diff --git a/docs/wiki/EL/devp2p.md b/docs/wiki/EL/devp2p.md index 929117f3..5fc2ccb8 100644 --- a/docs/wiki/EL/devp2p.md +++ b/docs/wiki/EL/devp2p.md @@ -1,7 +1,50 @@ -# Execution p2p +# DevP2P -> :warning: This article is a [stub](https://en.wikipedia.org/wiki/Wikipedia:Stub), help the wiki by [contributing](/contributing.md) and expanding it. +This section will cover the networking protocol used by the Execution Layer (EL). +First, we will provide some background on computer networks and then we will dive into the +specifics of the EL's networking protocol. -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. +## Computer networks background +* Distributed network of nodes +* OSI vs TCP/IP model +## EL's networking specs +* peer-to-peer networking protocol +* gossiping data (1:N) and request/response (1:1) communication +* Client software divided into Execution and Consensus (each one have its own p2p network) +* Execution network propagates transactions +* Two network stacks: + * UDP-based transport layer (discovery and finding peers) + * TCP-based transport layer (devp2p, exchange information) +* Discovery protocol + * bootstrap nodes + * Kademlia + * Hash tables + * PING/PONG hashed messages + * Find neighbours: list of peers -Because libp2p (used by CL) was not ready when Ethereum was created, devp2p was created as Ethereum's own p2p protocol stack. \ No newline at end of file +start client --> connect to bootnode --> bond to bootnode --> find neighbours --> bond to neighbours + +## ENR: Ethereum Node Records +* Node's identity +* Object + * signature (hash) + * sequence number + * arbitrary key-value pairs + +## DevP2P specs +* RLPx: encrypted and authenticated transport protocol + * Handshake messaging + * Encryption + * Authentication +* RLP: Recursive Length Prefix encoding +* Multiplexing: multiple subprotocols +* Subprotocols + * LES: Light Ethereum Subprotocol + * Witness Subprotocol + * Wire Subprotocol + * SHH: Whisper Subprotocol + + +### Further Reading +* [Geth devp2p docs](https://geth.ethereum.org/docs/tools/devp2p) +* [Ethereum devp2p GitHub](https://github.com/ethereum/devp2p)