I am new to LibP2P and have successfully got something up and running in NodeJS where I can start up nodes and they connect to a hardcoded node’s multi-address. I’ve also got the pubsub set up to use Gossipsub as in the examples.
When reviewing the spec (specs/gossipsub-v1.1.md at master · libp2p/specs · GitHub) and also the concepts (Publish/Subscribe :: libp2p Documentation) it looks like out-of-the-box peers should immediately start connecting to other peers, grafting, pruning, etc but in my environment they only connect to the hardcoded node.
Node1 starts up
Node2, 3, 4, 5 start up and is configured to connect to Node1
At this point if any node sends a message it goes to Node 1 sends the message to all the other nodes.
However when I look at the connectivity Node 2, 3, 4, 5 are only connected to Node 1 and not aware of the other nodes.
Based on the documentation I was hoping/expecting that as Nodes 2, 3, 4, 5, etc connected to Node 1 they would automatically discover the other nodes and start dialing/connecting directly but perhaps I am missing something easy.
Sorry if I haven’t explained myself well, thanks for the help and thanks for putting together this great set of code!