Module constants

Source
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 or addrv2 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.