Skip to content

discv4::discv4_enr_request

ENRRequest packet — discv4 wire type 0x05 (EIP-868). More...

#include <discv4_enr_request.hpp>

Public Functions

Name
std::vector< uint8_t > RlpPayload() const
Encode as packet-type byte

Public Attributes

Name
uint64_t expiration
Unix timestamp after which the packet expires.

Detailed Description

struct discv4::discv4_enr_request;

ENRRequest packet — discv4 wire type 0x05 (EIP-868).

Mirrors go-ethereum v4wire.ENRRequest:

ENRRequest struct {
    Expiration uint64
    Rest []rlp.RawValue `rlp:"tail"`
}

Wire layout (after signing): hash(32) || sig(65) || packet-type(1) || RLP([expiration])

Public Functions Documentation

function RlpPayload

std::vector< uint8_t > RlpPayload() const

Encode as packet-type byte || RLP([expiration]), ready for signing.

Return: Encoded bytes.

Returns an empty vector on encoding failure (mirrors discv4_ping::RlpPayload()).

Public Attributes Documentation

variable expiration

uint64_t expiration = 0U;

Unix timestamp after which the packet expires.


Updated on 2026-04-13 at 23:22:46 -0700