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

Add Validator Gossiper #2015

Merged
merged 5 commits into from
Sep 13, 2023
Merged

Conversation

joshua-kim
Copy link
Contributor

Why this should be merged

We currently throttle inbound requests for our tx gossip, so it doesn't make sense for us to request gossip if we're not a current validator.

How this works

  1. Renames the Gossiper to PullGossiper
  2. Creates a Gossiper interface since we now have multiple Gossiper implementations.
  3. Add a ValidatorGossiper that only gossips if we are a valdiator.

How this was tested

Added a unit test

@StephenButtolph StephenButtolph added this to the v1.10.10 milestone Sep 13, 2023
@StephenButtolph StephenButtolph added networking This involves networking sdk This involves SDK tooling or frameworks labels Sep 13, 2023
@joshua-kim joshua-kim self-assigned this Sep 13, 2023
@StephenButtolph StephenButtolph merged commit d1ad965 into ava-labs:dev Sep 13, 2023
15 checks passed
}

func (v ValidatorGossiper) Gossip(ctx context.Context) error {
if !v.Validators.Has(ctx, v.NodeID) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not interfere with push gossip that may otherwise be going on, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The bloom filter gossip stuff is sandboxed in its own implementation so it runs in parallel to the existing push gossip. The push gossip stuff also doesn't implement the Gossiper interface so it shouldn't ever be affected by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
networking This involves networking sdk This involves SDK tooling or frameworks
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants