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

Switch build_tpu_quic_client to actually connect to the given validator #4151

Merged
merged 3 commits into from
Dec 19, 2024

Conversation

carllin
Copy link

@carllin carllin commented Dec 17, 2024

Problem

Current fn get_validator_client(&self, pubkey: &Pubkey) -> Option<QuicTpuClient>; in local-cluster/src/cluster.rs always builds a client connected to the entrypoint validator, even if a different validator is specified

Summary of Changes

Grab the correct ContactInfo from the cluster and conenct to the correct valdiator

Fixes #

Copy link

@AshwinSekar AshwinSekar left a comment

Choose a reason for hiding this comment

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

LGTM will wait for greg's approval

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.

looks mostly look good just wondering if we need the two extra methods

Comment on lines 49 to 50
fn build_entrypoint_tpu_quic_client(&self) -> Result<QuicTpuClient>;
fn build_entrypoint_tpu_quic_client_with_commitment(
Copy link

@gregcusack gregcusack Dec 17, 2024

Choose a reason for hiding this comment

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

do we need these two if we can just pass in the pubkey of the entrypoint? we always know entrypoint pubkey since it is s public member of LocalCluster

Copy link
Author

@carllin carllin Dec 18, 2024

Choose a reason for hiding this comment

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

haha yeah i didn't have these two at first, but a bunch of call sites were using the original default method, so figured might as well expose a convenient way to do this.

Removed the two unnecessary methods

@carllin carllin requested a review from gregcusack December 18, 2024 01:30
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! thank you!

@carllin carllin merged commit 4bb6c4a into anza-xyz:master Dec 19, 2024
40 checks passed
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