EIP-7636 · Withdrawn · Networking · 2024-02-25
EIP-7636: Extension of EIP-778 for "client" ENR Entry
A withdrawn proposal to add an optional "client" entry to Ethereum Node Records so nodes could announce their software name and version during discovery.
What problem does it solve?
Ethereum nodes find each other through the discv5 discovery protocol, advertising themselves with Ethereum Node Records (ENRs, defined in EIP-778). An ENR is a small signed key/value record holding things like the node's public key, IP address and ports.
What an ENR did not say is which software the node runs. Client diversity and bug triage depend on knowing how many nodes run Geth, Nethermind, Besu and so on, and at which versions. That information was available only through other channels, such as the devp2p handshake. EIP-7636 proposed putting it directly in the ENR so that network health could be measured using discovery alone.
How it works
The proposal adds one optional ENR key, "client", whose value is an RLP list of ASCII strings:
[ClientName, Version, (BuildVersion)]
ClientName: short, no spaces (for exampleGeth).Version: human-readable, semantic versioning recommended.BuildVersion: optional, for example a commit hash.
A single key with a list was chosen over several separate keys to save space in the size-limited record. Nodes that do not understand the key ignore it, so the change is backward compatible and needs no fork.
Sample code
Building the entry value with ethers v6's RLP helpers:
import { encodeRlp, decodeRlp, toUtf8Bytes, toUtf8String, hexlify } from "ethers";
// ["Nethermind", "1.9.53", "7fcb567"] (example values from the spec)
const value = encodeRlp([
hexlify(toUtf8Bytes("Nethermind")),
hexlify(toUtf8Bytes("1.9.53")),
hexlify(toUtf8Bytes("7fcb567")),
]);
// Reading it back from a decoded ENR's "client" field
const [name, version, build] = (decodeRlp(value) as string[]).map((h) => toUtf8String(h));
console.log(name, version, build); // Nethermind 1.9.53 7fcb567
Things to know
- Status is Withdrawn. The stated reason is lack of use and disagreement among client developers about its practicality. Do not expect clients to publish this key.
- The data is self-reported. The spec itself says it must not be used for anything that needs to be reliable; any node can claim to be any client.
- Advertising exact versions can help attackers target nodes running a vulnerable build, which is why the field was optional and operators were expected to be able to opt out.
- For the ENR format itself, see EIP-778; for an earlier example of extending ENRs, see EIP-868.