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
{{ message }}
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.
js-libp2p currently uses peer-info to keep a record of the known protocols and multiaddrs of each peer. With the new peerstore, we intend to use it to map protocols and multiaddrs instead of moving peer-info instances around, as discussed on #453
Currently peer-info is being used on the following modules:
Regarding the discovery modules, they only depend on peer-info because the peer-info is currently used for emitting the peer discovered, which is basically obtained from the peer-id. This way, we can simply emit the peer-info and libp2p will be responsible for adding it to the peerStore and track protocols/multiaddrs.
Regarding pubsub, all modules use peer-info to get data related to the peer-id. However, gossipsub also leverages peer-info to validate if the peer to be connected supports the gossipsub protocol. This is currently guaranteed in the MulticodecTopologyvalidations and we do not need to also do this in gossipsub. The only relevant issue is to support floodsub peers into gossipsub, as gossipsub on publish checks if peers are from floodsub, in order to publish to them. This way, the best solution is to provided the peerStore to the gossipsub, same way as the dht is also receiving it.
The text was updated successfully, but these errors were encountered:
js-libp2p
currently usespeer-info
to keep a record of the known protocols and multiaddrs of each peer. With the newpeerstore
, we intend to use it to mapprotocols
andmultiaddrs
instead of movingpeer-info
instances around, as discussed on #453Currently
peer-info
is being used on the following modules:Regarding the discovery modules, they only depend on
peer-info
because thepeer-info
is currently used for emitting the peer discovered, which is basically obtained from thepeer-id
. This way, we can simply emit thepeer-info
andlibp2p
will be responsible for adding it to thepeerStore
and track protocols/multiaddrs.Regarding pubsub, all modules use
peer-info
to get data related to thepeer-id
. However,gossipsub
also leveragespeer-info
to validate if the peer to be connected supports the gossipsub protocol. This is currently guaranteed in theMulticodecTopology
validations and we do not need to also do this in gossipsub. The only relevant issue is to support floodsub peers into gossipsub, as gossipsub on publish checks if peers are from floodsub, in order to publish to them. This way, the best solution is to provided thepeerStore
to thegossipsub
, same way as the dht is also receiving it.The text was updated successfully, but these errors were encountered: