Skip to content

Commit

Permalink
gh-148 adding devp2p to side bar and setting up devp2p page
Browse files Browse the repository at this point in the history
  • Loading branch information
raa-dev committed May 25, 2024
1 parent c6cc8af commit fe90286
Showing 1 changed file with 47 additions and 4 deletions.
51 changes: 47 additions & 4 deletions docs/wiki/EL/devp2p.md
Original file line number Diff line number Diff line change
@@ -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.
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)

0 comments on commit fe90286

Please sign in to comment.