Closed diegomrsantos closed 2 weeks ago
addresses issue https://github.com/vacp2p/nim-libp2p/issues/1102
This PR depends on this being fixed https://github.com/vacp2p/nim-libp2p/issues/1115, if we want to send idontwant
only to peers that support 1.2.
idontwant
only to peers that support GossipSub 1.2This will be moved to a new PR cause of https://github.com/vacp2p/nim-libp2p/issues/1115.
I'm not an expert on GS by any means, but I'm expecting something like if GossipSubCodec_12 in g.codecs: # do something GS1.2 related
. From what I understand, we just add the codecs (which needed to be done) but there's no difference between GossipSubCodec_10, GossipSubCodec_11 and GossipSubCodec_12.
I'm not an expert on GS by any means, but I'm expecting something like
if GossipSubCodec_12 in g.codecs: # do something GS1.2 related
. From what I understand, we just add the codecs (which needed to be done) but there's no difference between GossipSubCodec_10, GossipSubCodec_11 and GossipSubCodec_12.
I believe g.codecs
are the versions supported by the current code, instead of the one negotiated with the peer - pubsubpeer.codec
. Behaving like 1.2 - sending idontwant
- will be implemented in a new PR as mentioned here: https://github.com/vacp2p/nim-libp2p/pull/1106#issuecomment-2149411500.
It seems that our current code can negotiate 1.0 but will still behave like 1.1, as there's no check on how the protocol should behave depending on the version negotiated with a remote peer.
template exclIfIt*[T](set: var HashSet[T], condition: untyped)
closes https://github.com/vacp2p/nim-libp2p/issues/1102