[][src]Struct discv5::config::Discv5Config

pub struct Discv5Config {
    pub request_timeout: Duration,
    pub query_peer_timeout: Duration,
    pub query_timeout: Duration,
    pub request_retries: u8,
    pub session_timeout: Duration,
    pub session_establish_timeout: Duration,
    pub enr_update: bool,
    pub enr_peer_update_min: usize,
    pub query_parallelism: usize,
    pub ip_limit: bool,
    pub table_filter: fn(_: &RawEnr<CombinedKey>) -> bool,
    pub ping_interval: Duration,
}

Configuration parameters that define the performance of the gossipsub network.

Fields

request_timeout: Duration

The request timeout for each UDP request. Default: 4 seconds.

query_peer_timeout: Duration

The timeout after which a QueryPeer in an ongoing query is marked unresponsive. Unresponsive peers don't count towards the parallelism limits for a query. Hence, we may potentially end up making more requests to good peers.

query_timeout: Duration

The timeout for an entire query.

request_retries: u8

The number of retries for each UDP request. Default: 1.

session_timeout: Duration

The session timeout for each node. Default: 1 day.

session_establish_timeout: Duration

The timeout for a session to be established before being removed. Default: 15 seconds.

enr_update: bool

Updates the local ENR IP and port based on PONG responses from peers. Default: true.

enr_peer_update_min: usize

The minimum number of peer's who agree on an external IP port before updating the local ENR. Default: 10.

query_parallelism: usize

The number of peers to request in parallel in a single query. Default: 3.

ip_limit: bool

Limits the number of IP addresses from the same /24 subnet in the kbuckets table. This is to mitigate eclipse attacks. Default: false.

table_filter: fn(_: &RawEnr<CombinedKey>) -> bool

A filter used to decide whether to insert nodes into our local routing table. Nodes can be excluded if they do not pass this filter. The default is to accept all nodes.

ping_interval: Duration

The time between pings to ensure connectivity amongst connected nodes. Duration: 300 seconds.

Trait Implementations

impl Clone for Discv5Config[src]

impl Debug for Discv5Config[src]

impl Default for Discv5Config[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> From<T> for T[src]

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,