-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat!: protocols filter peers per shard #1756
Conversation
size-limit report 📦
|
6f94d6b
to
49ce99d
Compare
@danisharora099 there are some conflicts, is it ok to review with them? |
1e793dd
to
fb1ce98
Compare
=
Yes! However, I've resolved the conflicts now :) While reviewing per commit would have been ideal, the commits from the PR got lost in a rebase/force-push I did, can't retrieve them through Thank you! |
26cee75
to
7a74adb
Compare
…ku into feat/shard-peer-selection
Problem
The
getPeers
functionality forBaseProtocol
currently only picked peers according to the protocol found and thus not taking account if the node is part of TWN, and runs on a shard.Solution
This PR also filters on the basis of the shard a particular node is part of, if they support sharding.
Notes
There is a requirement to wait for ~50/100ms after a
peer:connect
event is fired as the Metadata Protocol is an async operation for which we need to wait to populate shard info, or disconnect if shard info is incorrect.This, along with fixes for the CI tests & some improvements are part of: #1759
Followup: