Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GetENR #3861

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions specs/phase0/p2p-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ It consists of four main sections:
- [BeaconBlocksByRoot](#beaconblocksbyroot)
- [Ping](#ping)
- [GetMetaData](#getmetadata)
- [GetENR](#getenr)
- [The discovery domain: discv5](#the-discovery-domain-discv5)
- [Integration into libp2p stacks](#integration-into-libp2p-stacks)
- [ENR structure](#enr-structure)
Expand Down Expand Up @@ -931,6 +932,29 @@ The response MUST be encoded as an SSZ-container.

The response MUST consist of a single `response_chunk`.

##### GetENR

**Protocol ID:** `/eth2/beacon_chain/req/enr/1/`

No Request Content.

Response Content:

```
(
ENR
)
```

Requests the [ENR](https://github.com/ethereum/devp2p/blob/master/enr.md) of a peer.
The request opens and negotiates the stream without sending any request content.
Once established the receiving peer responds with
it's local most up-to-date ENR.

The response MUST be encoded as an RLP-encoded ENR, treated as an SSZ-list of bytes (`List[byte, 300]`).

The response MUST consist of a single `response_chunk`.

### The discovery domain: discv5

Discovery Version 5 ([discv5](https://github.com/ethereum/devp2p/blob/master/discv5/discv5.md)) (Protocol version v5.1) is used for peer discovery.
Expand Down