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

local-cluster: use feature flag for size for vote accounts #31723

Merged

Conversation

AshwinSekar
Copy link
Contributor

Problem

Local cluster assumes that the feature flag vote_state_add_vote_latency is always turned on when creating a new vote account on the cluster. This causes VoteInstruction::InitializeAccount to fail if the feature flag is not actually turned on.

Summary of Changes

Check the status of the feature flag before creating new vote accounts.

Fixes #

@AshwinSekar AshwinSekar force-pushed the fix-new-vote-state-local-cluster branch from f80d837 to cfbf87e Compare May 19, 2023 01:01
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #31723 (cfbf87e) into master (97293fe) will increase coverage by 0.0%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #31723   +/-   ##
=======================================
  Coverage    81.8%    81.9%           
=======================================
  Files         736      736           
  Lines      205950   205950           
=======================================
+ Hits       168673   168690   +17     
+ Misses      37277    37260   -17     

@AshwinSekar AshwinSekar marked this pull request as ready for review May 19, 2023 02:24
@AshwinSekar AshwinSekar requested a review from bw-solana May 19, 2023 02:25
@@ -668,7 +679,8 @@ impl LocalCluster {
},
amount,
vote_instruction::CreateVoteAccountConfig {
space: vote_state::VoteStateVersions::vote_state_size_of(true) as u64,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was fine before because all the multi node local cluster tests used ClusterType::Development which turns on all the flags.

Copy link
Contributor

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

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

LGTM. Nice catch!

@AshwinSekar AshwinSekar merged commit fb09cba into solana-labs:master May 19, 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.

2 participants