Skip to content

discv5::IBootnodeSource

Abstract interface for providers of bootstrap seed records. More...

#include <discv5_bootnodes.hpp>

Inherited by discv5::StaticEnodeBootnodeSource, discv5::StaticEnrBootnodeSource

Public Functions

Name
virtual ~IBootnodeSource() =default
virtual std::vector< std::string > fetch() const =0
Return all bootstrap ENR URIs available from this source.
virtual std::string name() const =0
Human-readable name of this source, for logging.

Detailed Description

class discv5::IBootnodeSource;

Abstract interface for providers of bootstrap seed records.

A concrete implementation may serve static ENR strings, static enode URIs, or query a remote registry. The crawler calls fetch() once at startup to obtain the initial seed set.

Implementations must be const-correct and noexcept on fetch().

Public Functions Documentation

function ~IBootnodeSource

virtual ~IBootnodeSource() =default

function fetch

virtual std::vector< std::string > fetch() const =0

Return all bootstrap ENR URIs available from this source.

Return: Vector of URI strings. May be empty if no seeds are available.

Reimplemented by: discv5::StaticEnodeBootnodeSource::fetch, discv5::StaticEnrBootnodeSource::fetch

ENR URIs are preferred; the crawler will attempt to parse each one via EnrParser. Enode URIs are also accepted and will be converted to a minimal ValidatedPeer without an EnrRecord.

function name

virtual std::string name() const =0

Human-readable name of this source, for logging.

Reimplemented by: discv5::StaticEnodeBootnodeSource::name, discv5::StaticEnrBootnodeSource::name


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