Expand description
Definitions of Zebra network constants, including:
- network protocol versions,
- network protocol user agents,
- peer address limits,
- peer connection limits, and
- peer connection timeouts.
Structs§
- INITIAL_
MIN_ NETWORK_ PROTOCOL_ VERSION - The minimum network protocol version accepted by this crate for each network, represented as a network upgrade.
- PORT_
IN_ USE_ ERROR - OS-specific error when the port attempting to be opened is already in use.
Constants§
- ADDR_
RESPONSE_ LIMIT_ DENOMINATOR - The fraction of addresses Zebra sends in response to a
Peers
request. - CONCURRENT_
ADDRESS_ CHANGE_ PERIOD - The maximum time difference for two address book changes to be considered concurrent.
- CURRENT_
NETWORK_ PROTOCOL_ VERSION - The Zcash network protocol version implemented by this crate, and advertised during connection setup.
- DEFAULT_
CRAWL_ NEW_ PEER_ INTERVAL - The default peer address crawler interval.
- DEFAULT_
MAX_ CONNS_ PER_ IP - The default maximum number of peer connections Zebra will keep for a given IP address before it drops any additional peer connections with that IP.
- DEFAULT_
PEERSET_ INITIAL_ TARGET_ SIZE - The default peerset target size.
- DNS_
LOOKUP_ TIMEOUT - The timeout for DNS lookups.
- EWMA_
DECAY_ TIME_ NANOS - The decay time for the EWMA response time metric used for load balancing.
- EWMA_
DEFAULT_ RTT - The default RTT estimate for peer responses.
- GET_
ADDR_ FANOUT - The number of GetAddr requests sent when crawling for new peers.
- HANDSHAKE_
TIMEOUT - The timeout for connections and handshakes when connecting to new peers.
- HEARTBEAT_
INTERVAL - Regular interval for sending keepalive
Ping
messages to each connected peer. - INBOUND_
PEER_ LIMIT_ MULTIPLIER - A multiplier used to calculate the inbound connection limit for the peer set,
- INVENTORY_
ROTATION_ INTERVAL - Zebra rotates its peer inventory registry every time this interval elapses.
- MAX_
ADDRS_ IN_ ADDRESS_ BOOK - The maximum number of addresses Zebra will keep in its address book.
- MAX_
ADDRS_ IN_ MESSAGE - The maximum number of addresses allowed in an
addr
oraddrv2
message. - MAX_
BANNED_ IPS - The maximum number of banned IP addresses to be stored in-memory at any time.
- MAX_
OVERLOAD_ DROP_ PROBABILITY - The maximum probability of dropping a peer connection when it receives an
Overloaded
error. - MAX_
PEER_ ACTIVE_ FOR_ GOSSIP - The maximum duration since a peer was last seen to consider it reachable.
- MAX_
PEER_ DISK_ CACHE_ SIZE - The maximum number of addresses in the peer disk cache.
- MAX_
PEER_ MISBEHAVIOR_ SCORE - The maximum number of peer misbehavior incidents before a peer is disconnected and banned.
- MAX_
RECENT_ PEER_ AGE - The maximum duration since a peer was last seen to consider reconnecting to it.
- MIN_
INBOUND_ PEER_ CONNECTION_ INTERVAL - The minimum time between successful inbound peer connections, implemented by
peer_set::initialize::accept_inbound_connections
. - MIN_
INBOUND_ PEER_ FAILED_ CONNECTION_ INTERVAL - The minimum time between failed inbound peer connections, implemented by
peer_set::initialize::accept_inbound_connections
. - MIN_
OUTBOUND_ PEER_ CONNECTION_ INTERVAL - The minimum time between outbound peer connections, implemented by
CandidateSet::next
. - MIN_
OVERLOAD_ DROP_ PROBABILITY - The minimum probability of dropping a peer connection when it receives an
Overloaded
error. - MIN_
PEER_ GET_ ADDR_ INTERVAL - The minimum time between successive calls to
CandidateSet::update
. - MIN_
PEER_ RECONNECTION_ DELAY - We expect to receive a message from a live peer at least once in this time duration.
- MIN_
PEER_ SET_ LOG_ INTERVAL - The minimum interval between logging peer set status updates.
- NANOS_
PER_ 🔒SECOND - The number of nanoseconds in one second.
- OUTBOUND_
PEER_ LIMIT_ MULTIPLIER - A multiplier used to calculate the outbound connection limit for the peer set,
- OVERLOAD_
PROTECTION_ INTERVAL - The duration it takes for the drop probability of an overloaded connection to
reach
MIN_OVERLOAD_DROP_PROBABILITY
. - PEERSET_
BUFFER_ SIZE - The buffer size for the peer set.
- PEER_
ADDR_ RESPONSE_ LIMIT - The maximum number of peers we will add to the address book after each
getaddr
request. - PEER_
DISK_ CACHE_ UPDATE_ INTERVAL - The peer address disk cache update interval.
- PEER_
GET_ ADDR_ TIMEOUT - The combined timeout for all the requests in
CandidateSet::update
. - REQUEST_
TIMEOUT - The timeout for sending a message to a remote peer, and receiving a response from a remote peer.
- TIMESTAMP_
TRUNCATION_ SECONDS - Truncate timestamps in outbound address messages to this time interval.