Diffie-Hellman in the wild Say we have a public network and lots of peers.   Each may need to communicate with another peer.

Would there be any huge security issue to each peer making the the public part of their key openly available across the network?   

In this way, any other peer in the system could automatically calculate a secret to communicate with them.   (e.g. using the secret as the AES encryption key)

Any caveats or issues welcome, thank you.
Basically yes, you can do that. Public keys are meant to be shared. The devil is in the details however:


public keys without trust are pretty useless as you don't know who you are performing the key agreement with;
two static keys will always generate the same key for the same partners if you use a naive DH implementation, something you probably don't want;
you need different keys for the sender and receiver
you need message integrity and authentication once you start sending messages


Etc. etc. etc. Different methods of performing DH are described in NIST SP 800-56A Revision 2. That still doesn't describe the authentication framework though. You could do worse than learning TLS 1.2 and 1.3 for starters.