Skip to content
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

Allow non primary network validators to request all peers #3491

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

cam-schultz
Copy link
Contributor

@cam-schultz cam-schultz commented Oct 23, 2024

Why this should be merged

Network.Peers currently only allows primary network validators to request the list of all peers across all L1's. This is primarily a bootstrapping optimization to prevent large numbers of peers for changing validator sets from being circulated as the P-Chain is synced.

Removing this check would simplify peer discovery for non-validators that need p2p connections with arbitrary nodes. One example is ICM signature aggregators - with the current semantics, they are only able to request peers for tracked subnets, which is capped at 16.

How this works

Removes the above restriction.

How this was tested

CI, added unit test

Copy link
Contributor

@marun marun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this change is desirable, I'll leave it to others to confirm that.

network/network_test.go Show resolved Hide resolved
network/network.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants