discv5::EnrRecord¶
Parsed Ethereum Node Record as defined by EIP-778. More...
#include <discv5_types.hpp>
Public Attributes¶
| Name | |
|---|---|
| uint64_t | seq Sequence number. Higher value → more recent record. |
| std::vector< uint8_t > | raw_rlp Raw RLP bytes of the complete record (signature + content). Stored so that the signature can be re-verified later. |
| NodeId | node_id 64-byte uncompressed node public key (sans 0x04 prefix). Derived from the "secp256k1" (compressed) field. |
| std::array< uint8_t, kCompressedKeyBytes > | compressed_pubkey 33-byte compressed secp256k1 public key as stored in the record. |
| std::string | ip IPv4 address string (empty if absent). |
| std::string | ip6 IPv6 address string (empty if absent). |
| uint16_t | udp_port UDP discovery port (0 if absent). |
| uint16_t | tcp_port TCP RLPx port (0 if absent). |
| uint16_t | udp6_port UDP discovery port for IPv6 endpoint (0 if absent). |
| uint16_t | tcp6_port TCP port for IPv6 endpoint (0 if absent). |
| std::string | identity_scheme ENR identity scheme name, e.g. "v4" for secp256k1-v4. |
| std::optional< ForkId > | eth_fork_id Optional Ethereum fork identifier parsed from the "eth" entry. |
| std::unordered_map< std::string, std::vector< uint8_t > > | extra_fields Unknown key–value pairs preserved verbatim (key → raw bytes). |
Detailed Description¶
Parsed Ethereum Node Record as defined by EIP-778.
All fields are optional except seq, raw_rlp, and node_id (which are populated whenever a record is successfully parsed by EnrParser).
Key–value pairs that are not natively understood are stored verbatim in extra_fields so that the record can be re-serialised without loss.
Public Attributes Documentation¶
variable seq¶
Sequence number. Higher value → more recent record.
variable raw_rlp¶
Raw RLP bytes of the complete record (signature + content). Stored so that the signature can be re-verified later.
variable node_id¶
64-byte uncompressed node public key (sans 0x04 prefix). Derived from the "secp256k1" (compressed) field.
variable compressed_pubkey¶
33-byte compressed secp256k1 public key as stored in the record.
variable ip¶
IPv4 address string (empty if absent).
variable ip6¶
IPv6 address string (empty if absent).
variable udp_port¶
UDP discovery port (0 if absent).
variable tcp_port¶
TCP RLPx port (0 if absent).
variable udp6_port¶
UDP discovery port for IPv6 endpoint (0 if absent).
variable tcp6_port¶
TCP port for IPv6 endpoint (0 if absent).
variable identity_scheme¶
ENR identity scheme name, e.g. "v4" for secp256k1-v4.
variable eth_fork_id¶
Optional Ethereum fork identifier parsed from the "eth" entry.
variable extra_fields¶
Unknown key–value pairs preserved verbatim (key → raw bytes).
Updated on 2026-04-13 at 23:22:46 -0700