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

Rename remaining ones to replay_vote_{sender,receiver} #29716

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

ryoqun
Copy link
Member

@ryoqun ryoqun commented Jan 15, 2023

(no rush; no need to work on weekend)

Problem

There's remaining instances of stale variable names for the type of ReplayVote{Sender/Receiver}.

hmm, actually, i found that it's not stale after some git log unfolding.... it seems that the var name and type name were inconsistent since the beginning...: https://github.com/solana-labs/solana/pull/11434/files#r1070596384 (#11434)....

(

I think it's a bit off that we call this type as *Replay*Vote{Sender,Receiver} considering its usage inside BankingStage. yet again *gossip*_vote_{sender,receiver} is misnomer too, considering it's not only gossip but all of committed votes in banking stage is sent over the channel (including vote tpu, non-vote tpu origins).... Fixing this is out of scope, I'll just align all to type names.... cc: @carllin

hehe, it's so tempting to rename them all to CommittedVote{Sender,Receiver}. but I'm quite deep at buffered prs. T_T

)

Namely, I want to use gossip_vote_sender in #29196, but it's currently squatted by the stale variables here and there.

Summary of Changes

Rename 'em all with this preparatory pr to ease review of #29196.

Fixes #

@carllin
Copy link
Contributor

carllin commented Jan 15, 2023

ick yeah I made a mess here with the naming.

So both from ReplayStage and BankingStage the votes are being sent to ClusterInfoVoteListener.

I named the type ReplayVoteSender because these votes were originally only being sent from ReplayStage. Maybe it's clearer to rename the type to GossipVoteSender because the target is ClusterInfoVoteListener.

@ryoqun
Copy link
Member Author

ryoqun commented Jan 17, 2023

Maybe it's clearer to rename the type to GossipVoteSender because the target is ClusterInfoVoteListener.

Okay, I'll revisit this whole rename after banking tracer. Firstly, I want to merge the tracer to be backported.

Copy link
Contributor

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

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

Typos should be fixed, but otherwise looks good to me.

Fine to re-evaluate the naming at a later point, but making it consistent with the typename makes things more clear immediately imo.

@@ -2034,7 +2034,7 @@ mod tests {
create_test_recorder(&bank, &blockstore, None, None);
let cluster_info = new_test_cluster_info(Node::new_localhost().info);
let cluster_info = Arc::new(cluster_info);
let (gossip_vote_sender, _gossip_vote_receiver) = unbounded();
let (replay_vote_sender, _repaly_vote_receiver) = unbounded();
Copy link
Contributor

Choose a reason for hiding this comment

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

minor typo:

Suggested change
let (replay_vote_sender, _repaly_vote_receiver) = unbounded();
let (replay_vote_sender, _replay_vote_receiver) = unbounded();

Copy link
Contributor

Choose a reason for hiding this comment

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

looks like all the remaining similar assignments have this typo, probably copy-pasted 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

ugh, thanks for checking my sanity...: 631144c ;)

@mergify mergify bot dismissed apfitzge’s stale review January 18, 2023 02:36

Pull request has been modified.

@ryoqun ryoqun merged commit 55d743c into solana-labs:master Jan 18, 2023
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