Module config

Source
Expand description

Wrapper around [discv5::Config].

Structs§

Config
Config used to bootstrap [discv5::Discv5].
ConfigBuilder
Builds a Config.

Enums§

BootNode
A boot node can be added either as a string in either ‘enode’ URL scheme or serialized from Enr type.

Constants§

DEFAULT_COUNT_BOOTSTRAP_LOOKUPS
Default number of times to do pulse lookup queries, at bootstrap (pulse intervals, defaulting to 5 seconds).
DEFAULT_DISCOVERY_V5_ADDR
The default address for discv5 via UDP is IPv4.
DEFAULT_DISCOVERY_V5_ADDR_IPV6
The default IPv6 address for discv5 via UDP.
DEFAULT_DISCOVERY_V5_LISTEN_CONFIG
The default [discv5::ListenConfig].
DEFAULT_DISCOVERY_V5_PORT
The default port for discv5 via UDP.
DEFAULT_SECONDS_BOOTSTRAP_LOOKUP_INTERVAL
Default duration of the pulse lookup interval at bootstrap.
DEFAULT_SECONDS_LOOKUP_INTERVAL
Default interval in seconds at which to run a lookup up query.

Functions§

amend_listen_config_wrt_rlpx
Returns the amended [discv5::ListenConfig] based on the RLPx IP address. The ENR is limited to one IP address per IP version (atm, may become spec’d how to advertise different addresses). The RLPx address overwrites the discv5 address w.r.t. IP version.
discv5_sockets_wrt_rlpx_addr
Returns the sockets that can be used for discv5 with respect to the RLPx address. ENR specs only acknowledge one address per IP version.
ipv4
Returns the IPv4 discovery socket if one is configured.
ipv6
Returns the IPv6 discovery socket if one is configured.