-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-148 adding devp2p to side bar and setting up devp2p page
- Loading branch information
Showing
1 changed file
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |