You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, identify operates at a peer level. However, this doesn't match up with reality. In practice, there are some protocols we only want to speak over connections with specific properties. Mostly with respect to transient connections, but we may end up having, e.g., network, interface, or even IP-based restrictions.
To solve this, we should:
Run identify on all connections (we already do this).
When creating a new stream, find the best connection that supports the given protocol.
Whenever a connection is created/destroyed, emit a "protocol change" event describing the connection-specific protocols lost/gained.
Provide a way to set a protocol handler with some set of constraints. Ideally an arbitrary function that's called on each new connection (during identify) and on a stream's connection before the handler is invoked. That shouldn't be that slow and it's really flexible.
Why? Bitswap, for example only wants non-transient connections and it doesn't even want to hear about peers with transient-only connections. Honestly, this applies to pretty much all of our protocols except the DHT and hole-punching protocols.
The text was updated successfully, but these errors were encountered:
Nothing else that I can think of today. The only other reason to do this right now is to remove the protocol list from the peer store. See number two above. But this probably isn't a priority.
Currently, identify operates at a peer level. However, this doesn't match up with reality. In practice, there are some protocols we only want to speak over connections with specific properties. Mostly with respect to transient connections, but we may end up having, e.g., network, interface, or even IP-based restrictions.
To solve this, we should:
Why? Bitswap, for example only wants non-transient connections and it doesn't even want to hear about peers with transient-only connections. Honestly, this applies to pretty much all of our protocols except the DHT and hole-punching protocols.
The text was updated successfully, but these errors were encountered: