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 ContactInfo handling for shred versioning #34286

Merged

Conversation

gregcusack
Copy link
Contributor

Problem

No support for new ClusterInfo for shred versioning/matching

Summary of Changes

add in ContactInfo support

Fixes #

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (60c09d3) 81.9% compared to head (d20cb8f) 81.9%.
Report is 169 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #34286   +/-   ##
=======================================
  Coverage    81.9%    81.9%           
=======================================
  Files         819      819           
  Lines      219741   219747    +6     
=======================================
+ Hits       180062   180089   +27     
+ Misses      39679    39658   -21     

gossip/src/cluster_info.rs Outdated Show resolved Hide resolved
gossip/src/cluster_info.rs Outdated Show resolved Hide resolved
CrdsData::ContactInfo(node) => {
// Can't insert into self.nodes since not all validators support ContactInfo yet
// Querying self.nodes (get_nodes_contact_infos()) assumes we're pulling LegactContactInfo
self.shred_versions.insert(pubkey, node.shred_version());
Copy link
Contributor

Choose a reason for hiding this comment

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

hmmm, wondering if we should hold off updating self.shred_versions for now until we have switched to use the new contact-info.
e.g. you may get legacy and new contact-infos from the same node with different shred-versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahhh i see ya that makes sense. crds.get_shred_version() is not aware of the differences between ContactInfo and LegacyContactInfo so i could see how this would get mixed up. and ya the insert would just overwrite the other shred version for the same pubkey. will remove

@github-actions github-actions bot added stale [bot only] Added to stale content; results in auto-close after a week. and removed stale [bot only] Added to stale content; results in auto-close after a week. labels Dec 18, 2023
Copy link
Contributor

@behzadnouri behzadnouri left a comment

Choose a reason for hiding this comment

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

lgtm, thanks.
I think we want this to be backported to v1.17 as well.

@behzadnouri behzadnouri added the v1.17 PRs that should be backported to v1.17 label Dec 21, 2023
Copy link
Contributor

mergify bot commented Dec 21, 2023

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

@gregcusack gregcusack merged commit 8ed149a into solana-labs:master Dec 21, 2023
34 checks passed
mergify bot pushed a commit that referenced this pull request Dec 21, 2023
* handle ContactInfo in places where only LegacyContactInfo was used

* missed a spot

* missed a spot

* import contact info for crds lookup

* cargo fmt

* rm contactinfo from crds_entry. not supported yet

* typo

* remove crds.nodes insert for ContactInfo. not supported yet

* forgot to remove clusterinfo in remove()

* move around contactinfo match arm

* remove contactinfo updating crds.shred_version

(cherry picked from commit 8ed149a)
gregcusack added a commit that referenced this pull request Dec 21, 2023
) (#34570)

Add ContactInfo handling for shred versioning (#34286)

* handle ContactInfo in places where only LegacyContactInfo was used

* missed a spot

* missed a spot

* import contact info for crds lookup

* cargo fmt

* rm contactinfo from crds_entry. not supported yet

* typo

* remove crds.nodes insert for ContactInfo. not supported yet

* forgot to remove clusterinfo in remove()

* move around contactinfo match arm

* remove contactinfo updating crds.shred_version

(cherry picked from commit 8ed149a)

Co-authored-by: Greg Cusack <greg.cusack@solana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1.17 PRs that should be backported to v1.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants