2018-03-20 15:10:58 +00:00
|
|
|
---
|
2018-03-21 12:51:05 +00:00
|
|
|
eip: 868
|
|
|
|
title: Node Discovery v4 ENR Extension
|
|
|
|
author: Felix Lange <fjl@ethereum.org>
|
2018-03-21 15:55:18 +00:00
|
|
|
type: Standards Track
|
2018-03-21 12:51:05 +00:00
|
|
|
category: Networking
|
|
|
|
status: Draft
|
|
|
|
created: 2018-02-02
|
2018-03-21 13:10:08 +00:00
|
|
|
requires: 8, 778
|
2018-03-20 15:10:58 +00:00
|
|
|
---
|
2018-02-02 13:16:59 +00:00
|
|
|
|
|
|
|
# Abstract
|
|
|
|
|
|
|
|
This EIP defines an extension to Node Discovery Protocol v4 to enable authoritative
|
|
|
|
resolution of Ethereum Node Records (ENR).
|
|
|
|
|
|
|
|
# Motivation
|
|
|
|
|
|
|
|
To bridge current and future discovery networks and to aid the implementation of other
|
|
|
|
relay mechanisms for ENR such as DNS, we need a way to request the most up-to-date version
|
|
|
|
of a node record.
|
|
|
|
|
|
|
|
# Specification
|
|
|
|
|
|
|
|
Implementations of Node Discovery Protocol v4 should support two new packet types, a request
|
|
|
|
and reply of the node record. The new packets are:
|
|
|
|
|
|
|
|
### enrRequest (0x05)
|
|
|
|
|
|
|
|
RLP: `[ expiration ]`
|
|
|
|
|
|
|
|
When a packet of this type is received, the node should reply with an enrResponse packet
|
|
|
|
containing the current version of its record.
|
|
|
|
|
|
|
|
To guard against amplification attacks, the sender of enrRequest should have replied to a
|
|
|
|
ping packet recently. The expiration field, a UNIX timestamp, should be handled as for all
|
|
|
|
other existing packets, i.e. no reply should be sent if it refers to a time in the past.
|
|
|
|
|
|
|
|
### enrResponse (0x06)
|
|
|
|
|
|
|
|
RLP: `[ requestHash, ENR ]`
|
|
|
|
|
2018-03-20 15:10:58 +00:00
|
|
|
This packet is the response to enrRequest.
|
2018-02-02 13:16:59 +00:00
|
|
|
|
|
|
|
- `requestHash` is the hash of the entire enrRequest packet being replied to.
|
|
|
|
- `ENR` is the node record.
|
|
|
|
|
|
|
|
The recipient of the packet should verify that the node record is signed by node who
|
|
|
|
sent enrResponse.
|
|
|
|
|
|
|
|
# Copyright
|
|
|
|
|
|
|
|
Copyright and related rights waived via CC0.
|