When a relay or HSP broadcasts its key (non exit node), how does a TOR client find it?
How is the propagation of exit nodes and relay nodes (or HSPs) shared?
All relays publish their descriptor to the directory servers.
All hidden services publish their service to the hidden service directory.
When a Tor client builds a circuit, it asks the directory server for a guard, middle, and exit relay. When you connect to a hidden service, it asks the hidden service directory for the required information to connect.