darkfi::net::protocol

Module protocol_address

Source
Expand description

Protocol for address and get-address messages.

Implements how nodes exchange connection information about other nodes on the network. Address and get-address messages are exchanged continually alongside ping-pong messages as part of a network connection.

Protocol starts by creating a subscription to address and get-address messages. Then the protocol sends out a get-address message and waits for an address message. Upon receiving address messages, nodes validate and add the address information to their local store.

Structsยง

Constantsยง

  • PROTO_NAME ๐Ÿ”’
  • TRANSPORT_COMBOS ๐Ÿ”’
    A vector of all currently accepted transports and valid transport combinations. Should be updated if and when new transports are added. Creates a upper bound on the number of transports a given peer can request.