A NameRecord contains the node's IPv4 address, port information, and a sequence number. Currently only IPv4 addresses are supported. There are two wire formats: a legacy format with a single port shared across protocols, and a newer format that supports multiple ports tagged by protocol (TCP, UDP, AuthenticatedUDP) along with a capabilities field. The newer format is used by nodes that have opted into authenticated UDP.
The IP address and ports describe the network endpoints at which other nodes in the network may contact it. A sequence number is necessary to ensure newer name records take priority over older name records. For example, when a node sees a peer's name records with a higher sequence number, it will update its routing table with the new name record.
A node specifies a few bootstrap nodes and their name records when starting up. Bootstrap nodes are not specialized nodes; any node in the network can be a bootstrap node. The node will then advertise its own name record by sending pings to other peers, where the ping message contains its own name record. The node also sends lookup request to its peers when it is missing name records of current active validators. Periodically, the node looks for new nodes or prunes excessive nodes depending on the min and max number of peers configured.