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

stops refreshing legacy gossip NodeInstance and Version #4677

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

behzadnouri
Copy link

Problem

Mainnet nodes are running v2.0.15 and v2.1.5 at a minimum, both of which are using the new ContactInfo to look up version:
https://github.com/anza-xyz/agave/blob/v2.0.15/gossip/src/cluster_info.rs#L1336-L1338
https://github.com/anza-xyz/agave/blob/v2.1.5/gossip/src/cluster_info.rs#L1316-L1317

and to check for duplicate instance:
https://github.com/anza-xyz/agave/blob/v2.0.15/gossip/src/cluster_info.rs#L2504-L2505
https://github.com/anza-xyz/agave/blob/v2.1.5/gossip/src/cluster_info.rs#L2481-L2482

So we no longer need to refresh and push legacy gossip NodeInstance and Version.

Summary of Changes

The commit stops refreshing legacy gossip NodeInstance and Version.

@behzadnouri behzadnouri force-pushed the gossip-stop-push-version branch from 5c91965 to 085ab7f Compare January 29, 2025 02:15
Comment on lines +2112 to +2115
if nodes.any(|other| my_contact_info.check_duplicate(other)) {
Err(GossipError::DuplicateNodeInstance)
} else {
Ok(())

Choose a reason for hiding this comment

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

isn't this going to discard all ContactInfo in nodes even if only one of them is a duplicate?

Copy link
Author

Choose a reason for hiding this comment

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

This is not discarding any values.
It just checks for duplicate and returns an error if it finds a duplicate.

Choose a reason for hiding this comment

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

oh ya this function is checking for duplicates of its own contact info. not duplicates of other contact infos. makes sense that it would return early.

Copy link

@gregcusack gregcusack left a comment

Choose a reason for hiding this comment

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

lgtm!

@behzadnouri behzadnouri merged commit 8889b4a into anza-xyz:master Jan 29, 2025
47 checks passed
@behzadnouri behzadnouri deleted the gossip-stop-push-version branch January 29, 2025 16:05
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.

2 participants