Expand description
Wrapper around [discv5::Discv5
].
Re-exports§
pub use config::BootNode;
pub use config::Config;
pub use config::ConfigBuilder;
pub use config::DEFAULT_COUNT_BOOTSTRAP_LOOKUPS;
pub use config::DEFAULT_DISCOVERY_V5_ADDR;
pub use config::DEFAULT_DISCOVERY_V5_ADDR_IPV6;
pub use config::DEFAULT_DISCOVERY_V5_LISTEN_CONFIG;
pub use config::DEFAULT_DISCOVERY_V5_PORT;
pub use config::DEFAULT_SECONDS_BOOTSTRAP_LOOKUP_INTERVAL;
pub use config::DEFAULT_SECONDS_LOOKUP_INTERVAL;
pub use enr::enr_to_discv4_id;
pub use error::Error;
pub use filter::FilterOutcome;
pub use filter::MustNotIncludeKeys;
pub use network_stack_id::NetworkStackId;
pub use discv5;
Modules§
- config
- Wrapper around [
discv5::Config
]. - enr
- Interface between node identification on protocol version 5 and 4. Specifically, between types
[
discv5::enr::NodeId
] and [PeerId
]. - error
- Errors interfacing with [
discv5::Discv5
]. - filter
- Predicates to constraint peer lookups.
- metrics
- Tracks peer discovery for
Discv5
. - network_
stack_ id - Keys of ENR
ForkId
kv-pair. Identifies which network stack a node belongs to.
Structs§
- Discovered
Peer - Result of successfully processing a peer discovered by [
discv5::Discv5
]. - Discv5
- Transparent wrapper around [
discv5::Discv5
].
Enums§
- IpMode
- Sets the socket type to be established and also determines the type of ENRs that we will store
in our routing table.
We store ENR’s that have a
get_contractable_addr()
based on theIpMode
set.
Constants§
- DEFAULT_
MIN_ TARGET_ KBUCKET_ INDEX - Default lowest kbucket index to attempt filling, in periodic look up query to populate kbuckets.
- MAX_
KBUCKET_ INDEX - Max kbucket index is 255.
Functions§
- bootstrap
- Bootstraps underlying [
discv5::Discv5
] node with configured peers. - build_
local_ enr - Builds the local ENR with the supplied key.
- get_
lookup_ target - Gets the next lookup target, based on which bucket is currently being targeted.
- lookup
- Runs a [
discv5::Discv5
] lookup query. - spawn_
populate_ kbuckets_ bg - Backgrounds regular look up queries, in order to keep kbuckets populated.