-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag mesh peers on graft, remove tags on prune #380
Comments
Do other implementations have this feature? I don't recall seeing it. Speaking for Lodestar we have more complex logic to decide the value of the peer so this feature won't be useful at all. Gossipsub also has it's own scoring system, which indirectly affects if a peer is meshed or not tho. |
See the referenced issue in the OP for context.
If that's the case lodestar may wish to tag high value peers as well. |
If I understand this feature is relevant because the connection manager may choose to disconnect peers at will right? Can consumers completely disable that so peer management is done 100% by the consumer? |
Yes, just leave |
To prevent the connection manager pruning connections to high-value peers, modules that need connections to certain peers should tag them to ensure they don't get culled by the connection manager when connection limits have been specified and reached.
When this module grafts mesh peers for a given topic, it should use the peerStore.tagPeer method to tag them with a value:
When they are pruned from a mesh peerStore.unTagPeer should be used:
Refs: libp2p/js-libp2p#369
The text was updated successfully, but these errors were encountered: