Skip to main content

Module lookup

Module lookup 

Source

Structsยง

LookupEndpoints
Endpoints the lookup service advertises and binds to.
LookupService

Constantsยง

MAX_ADDRS_PER_PEER
Maximum data-plane addresses a peer may advertise about itself. Legitimate peers only need one per transport (tcp/tls/quic).
MAX_DISCOVERY_ADDRS_PER_PEER
Maximum discovery addresses a peer may advertise about itself. Legitimate peers only need lookup + refresh.
MAX_PEERS_IN_PEERSMSG
Maximum number of peers that can be returned in a PeersMsg.

Functionsยง

advertised_addr ๐Ÿ”’
The PeerAddr to advertise for ep, with its IP replaced by public_ip when both are the same family.
is_reachable ๐Ÿ”’
True if the peer advertises at least one address to reach it on. Peers with only discovery addresses (e.g. bootstrap nodes) count.
validate_peer_msg ๐Ÿ”’
Reject PeerMsgs that advertise more addresses than a legitimate peer would. Caps memory blow-up from malicious or buggy peers.

Type Aliasesยง

KadConnRef ๐Ÿ”’
Framed lookup-plane connection.