Skip to content

subscribe_and_join() times out in local_discovery, but not discovery_n0 #90

@guilherme-ds-matos

Description

@guilherme-ds-matos

Hello there,

I've been recently looking into projects for my Master's degree dissertation, and found p2p networks very interesting of a topic.
I decided to try, then, using iroh for some p2p networking and followed the examples Number 0 provided both in the repos as well as the website. I reached for this particular project, iroh-gossip, as a way to rapidly set up connections between two peers.

My project would leverage iroh-gossip for group-chat-like conversations. Granted, I understand iroh-gossip is better suited for single producer multiple consumer, but I wanted to try regardless; so I based it off n0's Chat example.

When I attempted using the n0 discovery service, it worked perfectly: my two machines would connect.

I then changed it to local-discovery, and, upon calling the function subscribe_and_join(), the program would hang, and after a while, the logs would indicate that the dialing failed with peer timed out, and it wouldn't try again.

I tried then, to adapt the local-discoveries and echo examples; my two machines connected using the echo protocol, with no hitch; not even a single timeout.

I wonder then, what does the iroh-gossip protocol do different that would make it so that, upon using a ticket and calling subscribe_and_join() on a local network, a connection times out? The connecting peer never quite seems to receive the address of the starting peer according to the logs. Would it be helpful if I pasted the logs here? They seem mostly to contain warnings about the Relay, more than anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions