Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
Free 30-min Web3 Consultation
Book Now
Smart Contract Security Audits
Learn More
Custom DeFi Protocol Development
Explore
Full-Stack Web3 dApp Development
View Services
LABS
Glossary

Ethereum Node Record (ENR)

An Ethereum Node Record (ENR) is a cryptographically signed data structure that defines a node's identity, network addresses, and capabilities for secure peer-to-peer discovery.
Chainscore © 2026
definition
NETWORKING PROTOCOL

What is Ethereum Node Record (ENR)?

The Ethereum Node Record (ENR) is a standardized format for node identity and metadata in Ethereum's peer-to-peer network.

An Ethereum Node Record (ENR) is a cryptographically signed, self-contained data structure that defines a node's identity and capabilities within the Ethereum network. It serves as the successor to the older multiaddr-based format, providing a more flexible and extensible way for nodes to advertise their connection information, supported protocols, and other metadata to potential peers. Each ENR contains essential details like the node's public key, IP address, TCP and UDP ports, and the Ethereum fork identifier (eth field).

The core innovation of the ENR is its use of a signed record, which prevents spoofing and ensures the integrity of the advertised information. A node generates its ENR by signing a set of key-value pairs with its private key, creating a verifiable attestation of its network identity. Other nodes can then verify this signature using the included public key, establishing trust in the connection details. This mechanism is fundamental to secure peer discovery in protocols like Discv5, Ethereum's main node discovery protocol.

ENRs are highly extensible through their key-value pairs, allowing them to carry application-specific data beyond basic networking info. For example, they can include fields for Layer 2 rollup support, light client data, or custom chain identifiers. This design enables the Ethereum network to evolve without requiring changes to the core discovery protocol, as new client capabilities can be signaled simply by adding new entries to the ENR.

In practice, when a node starts up, it generates or loads its ENR and shares it during the discovery process. Peers exchange these records to learn how to connect to each other directly. The enode URL, a legacy identifier, has largely been superseded by the ENR for modern clients. The shift to ENRs has been crucial for improving the resilience, security, and future-proofing of Ethereum's decentralized peer-to-peer layer.

how-it-works
MECHANISM

How Does an ENR Work?

An Ethereum Node Record (ENR) is a standardized format for node identity and metadata, enabling secure and verifiable peer discovery in decentralized networks like Ethereum and other Ethereum Virtual Machine (EVM) chains.

An Ethereum Node Record (ENR) is a cryptographically signed data structure that serves as a self-contained identity card for a network participant. It contains essential metadata such as the node's public key, IP address, TCP and UDP ports, and supported network protocols. The core innovation is the inclusion of a digital signature, created using the node's private key, which allows any other peer to verify the authenticity and integrity of the information. This prevents spoofing and ensures that connection details are trustworthy.

The ENR's structure is defined by a simple key-value format, where keys are arbitrary strings and values are arbitrary byte sequences, allowing for extensibility. Common standardized keys include id (identity scheme, e.g., v4 for secp256k1), secp256k1 (the compressed public key), and ip/tcp/udp for network addresses. When a node starts, it generates or loads its ENR. This record is then shared during the Node Discovery Protocol via mechanisms like Discv5, where it is propagated through the network in FINDNODE and NODES messages.

The verification process is fundamental to the ENR's security. When a peer receives an ENR, it first decodes the record from its RLP-encoded format. It then extracts the public key from the secp256k1 field and uses it to verify the attached ECDSA signature against the signed portion of the record. If the signature is valid, the peer can trust the enclosed metadata. This creates a secure basis for building a peer-to-peer network's routing table without relying on a central authority.

ENRs are dynamic and can be updated. If a node's information changes—for instance, its IP address is reassigned—it creates a new ENR with an incremented sequence number and re-signs it. The sequence number is a critical field that allows peers to identify the most recent, and therefore authoritative, version of a node's record. This update mechanism is efficiently handled within the discovery protocol, ensuring the network's view of nodes remains current without excessive overhead.

In practice, ENRs enable the Ethereum Node Discovery Protocol (Discv5) to function as a secure, self-organizing directory. Nodes do not need a pre-configured list of bootstrap peers; they can find each other by gossiping ENRs. This system underpins the resilience of Ethereum's peer-to-peer (p2p) layer, allowing clients like Geth, Nethermind, and Besu to form a robust, decentralized mesh network essential for block and transaction propagation across the globe.

key-features
Ethereum Node Record

Key Features of ENR

The Ethereum Node Record (ENR) is a standardized format for node identity and metadata, replacing the older multiaddr-based system to enable secure, authenticated peer discovery in decentralized networks.

01

Self-Certifying Identity

An ENR is a self-certifying record signed by the node's private key, providing cryptographic proof of ownership. The signature is verified using the node's public key, which is included in the record. This prevents spoofing and ensures that node information originates from the legitimate key holder, forming the basis for secure peer-to-peer communication.

02

Structured Key-Value Pairs

The core of an ENR is a set of key-value pairs (KVPs) that encode node metadata. Standardized keys include:

  • id: The identity scheme (e.g., v4 for secp256k1).
  • secp256k1: The compressed public key.
  • ip / tcp / udp: Network addresses and ports.
  • eth: Ethereum network and fork information. This structured format allows for extensible and machine-readable node descriptions.
03

Sequence Number for Freshness

Each ENR contains a sequence number, a monotonically increasing integer that acts as a version counter. When a node updates its metadata (e.g., IP address changes), it increments this number and re-signs the record. Other nodes can compare sequence numbers to identify the most recent and valid record, ensuring they have current connection information.

04

Compact Binary & Text Encoding

ENRs support dual encoding for flexibility in different protocols:

  • RLP Encoding: A compact binary format used for efficient transmission over the wire in protocols like Discv5.
  • Text Encoding (ENR URI): A base64 representation prefixed with enr:, used for manual sharing or configuration (e.g., enr:-IS4Q...). This allows the same record to be easily shared, stored, and parsed.
05

Protocol-Agnostic Design

While created for Ethereum, the ENR format is not limited to a single network. Its extensible KVP system allows it to carry metadata for any P2P protocol. For instance, it can simultaneously contain keys for eth (Ethereum), snap (snap sync), and custom application-layer data, enabling multi-protocol nodes to advertise all capabilities in one record.

evolution-from-rlpx
NETWORKING PROTOCOL

Evolution from RLPx to ENR

The transition from RLPx to the Ethereum Node Record (ENR) marks a fundamental shift in how Ethereum nodes identify and connect to each other, moving from a static, handshake-based system to a flexible, self-certifying data structure.

The Ethereum Node Record (ENR) is a self-certifying, flexible data structure that replaces the static, handshake-based node identity system used in the older RLPx protocol. An ENR is a signed, key-value record containing essential node information like its public keys, IP address, and supported network protocols. This signature, created using the node's private key, allows any peer to cryptographically verify the record's authenticity and integrity, establishing a secure foundation for peer discovery without a prior handshake.

The legacy RLPx protocol relied on a fixed, 512-bit secp256k1 public key as a node's sole identifier, exchanged during a dedicated cryptographic handshake. This design was rigid, as it could not natively convey additional metadata (like a node's listening TCP or UDP ports) or support alternative cryptographic identities (like BLS signatures). The shift to ENRs decouples node identity from the connection protocol, allowing a single record to declare support for multiple transport and discovery protocols, such as discv5, using different key types.

This evolution enables significant protocol agility. A node's ENR can be updated dynamically to reflect changes in its network address or capabilities, and the information is efficiently propagated through the discovery protocol. The structured, extensible format is crucial for supporting Ethereum's roadmap, including light clients and Ethereum 2.0 (the consensus layer), where nodes need to advertise their roles and attestation subnet subscriptions. ENRs form the backbone of modern peer-to-peer networking in the Ethereum ecosystem.

enr-structure-components
TECHNICAL SPECIFICATION

ENR Structure & Common Components

An Ethereum Node Record (ENR) is a standardized, self-certifying data structure that uniquely identifies a network participant. It contains a node's public key, network addresses, and optional metadata.

01

Core Structure (RLP & Signature)

An ENR is a Recursive Length Prefix (RLP) encoded tuple of four elements: [signature, seq, k-v pairs, ...]. The signature (e.g., secp256k1) cryptographically signs the sequence number and key-value pairs, making the record self-certifying. The sequence number (seq) is a 64-bit integer that increments with each update, ensuring the latest record is used.

02

Mandatory Key-Value Pairs

Every ENR must contain these essential keys:

  • id: The identity scheme (e.g., v4 for secp256k1).
  • secp256k1: The compressed 64-byte public key for the v4 scheme.
  • Network Addresses: ip (IPv4) or ip6 (IPv6) and tcp or udp (port numbers). Example: {ip: 192.0.2.1, tcp: 30303}.
03

Optional & Custom Attributes

ENRs can be extended with arbitrary key-value pairs for protocol-specific data. Common examples include:

  • eth: Ethereum fork ID and latest block hash for DevP2P.
  • attnets: Bitfield indicating subscribed Ethereum attestation subnetworks.
  • Custom keys: Projects can define their own (e.g., custom_protocol_data). The format is flexible but keys must be ASCII strings.
04

Encoding & Representation (ENR Text)

For human-readable exchange, the binary RLP-encoded ENR is converted to a base64 URL-safe string and prefixed with enr:. Example: enr:-IS4Q...W2Rg. This ENR text format is used in bootnode lists, peer discovery (Discv5), and client configuration. The enrtree scheme further organizes these strings into a Merkle tree for efficient distribution.

05

Update Mechanism & Gossip

Nodes update their ENR when IP, port, or metadata changes, incrementing the seq number. Updated records are gossiped to peers via the Node Discovery Protocol (Discv5). Peers validate the new signature and sequence number, replacing their local copy only if seq is higher, ensuring the network converges on the current state.

06

Comparison to Multiaddr & Multiaddrs

While a Multiaddr (e.g., /ip4/192.0.2.1/tcp/30303) is a generic, composable network address, an ENR is a signed identity document. An ENR contains network addresses (like Multiaddrs) but adds a persistent node ID (the public key), a sequence number for versioning, and the ability to include arbitrary, verifiable metadata.

role-in-discv5
NETWORK PROTOCOL

ENR's Role in Discv5 Discovery

An explanation of how the Ethereum Node Record (ENR) functions as the core identity and data carrier within Ethereum's decentralized node discovery protocol.

The Ethereum Node Record (ENR) is a standardized, self-certifying data structure that serves as the fundamental identity document for a node participating in the Discv5 discovery protocol. It replaces the older, less flexible ENode format by containing essential network information—such as the node's public key, IP address, and TCP/UDP ports—in a cryptographically signed, extensible format. This signature ensures the data's authenticity, preventing spoofing, while the extensible key-value pairs allow nodes to advertise additional capabilities, like supported network protocols or chain identifiers, without requiring protocol upgrades.

Within the Discv5 protocol, the ENR acts as both a query response and a session token. When a node receives a FINDNODE query, it returns a list of ENRs for peers closest to the target, enabling efficient distributed hash table (DHT) routing. Crucially, the ENR's signature allows any node to verify the information without a prior connection, establishing a trustless basis for the peer-to-peer network. This mechanism is vital for bootstrapping: a new node only needs a few initial bootstrap ENRs to begin discovering and validating the rest of the network's participants.

The extensibility of the ENR is key to its role in multi-network environments. Nodes can include specific key-value pairs, such as eth for Ethereum mainnet fork data or snap to signal support for the snap sync protocol. This allows Discv5 to serve multiple chains and sub-protocols simultaneously. When a node's information changes—for instance, its IP address—it generates a new ENR with an updated sequence number. Other nodes accept only the ENR with the highest sequence number, ensuring the network maintains the most current and accurate routing information for each participant.

ecosystem-usage
IMPLEMENTATION

Ecosystem Usage & Client Support

The Ethereum Node Record (ENR) is a standardized format for node identity and metadata, enabling secure and efficient peer discovery across the network. Its adoption is critical for client interoperability and network health.

01

Core Specification & Format

An ENR is a signed, self-certifying record containing a node's public key, IP address, TCP/UDP ports, and optional key-value pairs for capabilities. It uses a simple, extensible format defined in EIP-778. The signature ensures the data's authenticity, allowing other nodes to verify the origin of the connection information.

  • Structure: signature + sequence_number + key-value pairs.
  • Encoding: Uses RLP (Recursive Length Prefix) serialization for network transmission.
  • Key Example: The eth key advertises supported Ethereum network and fork IDs.
02

Discv5: The Discovery Protocol

Discv5 (Node Discovery Protocol v5) is the primary system that uses ENRs for locating peers in Ethereum's peer-to-peer (p2p) network. It replaces the older, less secure Discv4. Nodes exchange and store ENRs in a distributed hash table (DHT), enabling them to find peers without central coordinators.

  • Kademlia-based: Uses a structured routing table for efficient lookups.
  • Topic Advertisement: Nodes can advertise their support for specific network sub-protocols (e.g., eth/66, les/2).
  • NAT Traversal: Helps nodes discover their external IP address.
03

Client Implementation & Interoperability

All major Ethereum execution and consensus clients implement ENR and Discv5, forming the backbone of network connectivity. This standardization is crucial for a heterogeneous network.

  • Execution Clients: Geth, Nethermind, Besu, and Erigon all generate and parse ENRs.
  • Consensus Clients: Prysm, Lighthouse, Teku, Nimbus, and Lodestar use ENRs to find beacon chain peers.
  • Interop: A uniform format prevents client-specific discovery silos, ensuring a resilient network.
04

Key-Value Pairs & Capability Advertising

The extensible key-value section of an ENR allows nodes to advertise their capabilities and network affiliation dynamically. This enables feature discovery and protocol negotiation during the handshake phase.

  • Common Keys:
    • id: Identity scheme (e.g., v4 for secp256k1).
    • secp256k1: The node's compressed public key.
    • ip / tcp / udp: Network addresses.
    • eth: Ethereum fork hash and supported protocol versions.
    • attnets: Attestation subnet subscriptions (consensus layer).
  • Custom Data: Clients can add custom keys for experimental features.
05

Security & Identity Model

ENR provides a cryptographically verifiable identity model for nodes. The ECDSA signature (using the secp256k1 curve) over the record's content binds the metadata to a specific node identity, preventing spoofing.

  • Self-Certifying: The record's content is inseparable from its signature.
  • Sequence Numbers: A monotonically increasing seq field allows for safe record updates and prevents replay attacks.
  • Trust Basis: The public key in the ENR becomes the node's persistent identity, used for ongoing secure sessions.
06

Bootstrapping & Network Entry

New nodes (bootnodes) use hardcoded ENRs of trusted bootstrap nodes to initially join the network. These bootstrap ENRs are distributed with client software and provide the entry points into the Discv5 DHT.

  • Process: A client reads a bootstrap ENR, connects to that node, and queries its routing table for more peers.
  • Decentralization: Multiple bootstrap nodes from different clients and operators prevent single points of failure.
  • Maintenance: The list of bootstrap ENRs is updated with client releases to reflect network changes.
PROTOCOL COMPARISON

ENR vs. Legacy RLPx Node Record

A technical comparison of the Ethereum Node Record (ENR) format and its predecessor, the legacy RLPx node record, highlighting key differences in extensibility, security, and data structure.

FeatureEthereum Node Record (ENR)Legacy RLPx Node Record

Core Format

RLP-encoded key-value pairs with signature

RLP-encoded list of fixed fields

Extensibility

Cryptographic Signature

ECDSA (secp256k1) over record hash

None (unsigned)

Identity Scheme Support

Multiple (e.g., v4, v5)

Single (secp256k1 public key only)

Data Integrity

Signature provides tamper-proofing

No inherent integrity protection

Key-Value Pairs

Arbitrary, custom fields allowed

Fixed, predefined fields only

Protocol Versioning

Explicit 'id' field specifies scheme

Implicit, tied to RLPx discovery version

Primary Use Case

Modern DevP2P, Discv5, multi-network

Legacy RLPx v4 node discovery

security-considerations
ETHEREUM NODE RECORD (ENR)

Security Considerations

While ENRs are fundamental for secure peer discovery, their implementation and management introduce specific attack vectors and privacy concerns that node operators must address.

02

ENR Forgery & Spoofing

Since ENRs are signed by the node's key, they are tamper-evident. However, the content of an ENR can be spoofed to misrepresent a node's capabilities or location.

  • A malicious node can advertise incorrect multiaddr entries or listening ports, causing connection failures or routing traffic through proxies.
  • Spoofing the eth field with an incorrect chain ID or genesis hash can partition a node into a fake network.
  • Defenses require validating ENR data against actual connection capabilities and cross-referencing network information.
03

Privacy Leakage & Fingerprinting

ENRs broadcast identifying node metadata by design, creating significant privacy risks.

  • The combination of public IP address, listening ports, and client identifiers (eth, les) creates a unique fingerprint for a node, making it trackable across sessions.
  • Persistent node IDs (the ENR's signing key) allow long-term behavioral tracking and correlation of network activity.
  • P2P Privacy Solutions like Dandelion++ or using proxies/Tor can help, but often conflict with the ENR's purpose of providing reachable addresses.
04

Key Management & Compromise

The security of an ENR is entirely dependent on the node's private key used to sign it. Compromise of this key has severe consequences.

  • A stolen private key allows an attacker to generate valid ENRs impersonating the victim node, enabling identity theft on the P2P network.
  • The node must generate a new key and a new Node ID, effectively losing its established peer relationships and reputation.
  • Secure key storage (e.g., HSMs) and regular key rotation policies are essential for high-value node operators.
06

Implementation Bugs & Client Diversity

Bugs in ENR parsing, serialization, or signature verification logic within Ethereum clients can lead to denial-of-service or remote code execution.

  • A malformed ENR could trigger a parsing bug that crashes the client.
  • Lack of client diversity means a bug in a dominant client (e.g., Geth) could affect a large portion of the network's nodes simultaneously.
  • Rigorous fuzz testing of ENR code paths and promoting a healthy mix of client software are critical defensive measures.
ETHEREUM NODE RECORD

Frequently Asked Questions (FAQ)

Common questions about Ethereum Node Records (ENR), the standard format for node identity and metadata in the Ethereum network.

An Ethereum Node Record (ENR) is a standardized, cryptographically verifiable data structure that uniquely identifies a node on the Ethereum network and advertises its capabilities. It works by encoding key-value pairs—such as the node's public key, IP address, and supported network protocols—into a signed, base64-encoded string. When a node connects to the network, it shares its ENR with peers, allowing them to verify its identity via its secp256k1 signature and discover how to communicate with it. This replaces the older, less flexible multiaddr format used in earlier versions of the devp2p protocol.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected direct pipeline
Ethereum Node Record (ENR) - Definition & Key Features | ChainScore Glossary