Closed steamraven closed 1 year ago
Are they transient v2 connections? Pubsub ignores such conns.
@vyzo I am not sure about the transient part. I am connecting the peers using thier .../p2p-circuit mulltiaddresses. I am using all defaults, so I believe it is connecting with Circuit Relay v2. Since this is a full connection, I would assume that it is not transient, but I don't have enough experience with libp2p to know
Unless you relay is explicitly specifying unlimited, ie if there is any limit, this is transient then. Pubsub is not interested in transient connections at all.
@vyzo Thank you. The keyword transient got me pointed in the right direction. It appears V2 is only used for lightweight protocols like identity, ping, and hole-punching. And not for heavy protocols like pubsub. I see I need to enable the extra step of hole-punching to create a direct connection.
I wish the documentation on the circuit relay V2 and pubsub was a little more explicit on thos.
Thank you so much for your help
I am having trouble getting pubsub messages to route when the peers are connected over Circuit Relay From my understanding, this is not using PubSub relay functionality, but using libp2p Circuit Relay transports to make a direct connection between the two peers
When I connect two peers directly, the pubsub messages seem to be routed correctly. But as soon as I force the connection to go over a Circuit Relay, messages stop flowing.
Here is a simple demo
https://gist.github.com/steamraven/41ec1867b7677d380555cc541c2bd2e7
The one thing I noticed in the PubSub tracing. When connected directly, I see a SendRPC to the other peer:
But when connecting over Circuit Relay, the trace shows SendRPCs to the intermediate peers but not to the final connected peer
Am I doing something wrong?