prototype-cjdns-pi icon indicating copy to clipboard operation
prototype-cjdns-pi copied to clipboard

Running ipfs swarm connect on both nodes

Open makew0rld opened this issue 6 years ago • 2 comments

As I found out here, you need to run ipfs swarm connect on both nodes to actually successfully establish a priority connection. We do this in our code with direct mesh peers, but only on startup of the IPFS service.

This means that sometimes this command will only go one way (when a new node joins), or that sometimes the connection is joined much later (when a node sends it out to a node that doesn't have IPFS started, and then that node later starts it and sends it back). I am checking here and previously here how large the window is between call and response, but that still doesn't solve the former problem about when only one node issues the command.

One solution would be to turn ipfs-swarm.sh into a loop, every 30 seconds or whatever the window is. It could also potentially keep track of which nodes it had established priority connections with, and only the contact the ones it hadn't.

makew0rld avatar Jun 04 '19 22:06 makew0rld

I'd rather use some sort of discovery protocol possibly like #385

darkdrgn2k avatar Jul 19 '19 20:07 darkdrgn2k

I'm still confused about how this plays out, I've asked to confirm here.

makew0rld avatar Aug 06 '19 20:08 makew0rld