Skip to content

fix: genesis: feature-gated vote state#9467

Merged
buffalojoec merged 5 commits intoanza-xyz:masterfrom
buffalojoec:genesis-feature-gated-vote-state
Jan 9, 2026
Merged

fix: genesis: feature-gated vote state#9467
buffalojoec merged 5 commits intoanza-xyz:masterfrom
buffalojoec:genesis-feature-gated-vote-state

Conversation

@buffalojoec
Copy link

@buffalojoec buffalojoec commented Dec 9, 2025

Problem

As described in #9377, development clusters who deactivate the vote state v4 feature are stalling since the genesis config will create vote state v4 accounts anyway.

Summary of Changes

Changes the no-features variant (create_genesis_config_with_leader_ex_no_features) to first check the provided initial_accounts for the vote account, and default to vote state V3 if not provided. For the variant with all features enabled (create_genesis_config_with_leader_ex), use vote state V4.

Also removes the BLS pubkey arg from the no-features variant since it's unused.

Fixes #9377

@mergify
Copy link

mergify bot commented Dec 9, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 41.42857% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.5%. Comparing base (ec8ba13) to head (f080d70).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9467       +/-   ##
===========================================
- Coverage    82.7%    67.5%    -15.2%     
===========================================
  Files         901      803       -98     
  Lines      324743   225552    -99191     
===========================================
- Hits       268704   152471   -116233     
- Misses      56039    73081    +17042     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@buffalojoec buffalojoec marked this pull request as ready for review December 9, 2025 23:38
@mergify
Copy link

mergify bot commented Dec 11, 2025

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/kit (example)

Thank you for keeping the RPC clients in sync with the server API @buffalojoec.

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, cc @t-nelson for approval since I believe we want to backport this to 3.1

@AshwinSekar AshwinSekar added the v3.1 Backport to v3.1 branch label Dec 12, 2025
@mergify
Copy link

mergify bot commented Dec 12, 2025

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.

@t-nelson
Copy link

can we get the feature set plumbing changes factored out of the first commit and i think the last two commits of ag slop dropped?

@buffalojoec
Copy link
Author

can we get the feature set plumbing changes factored out of the first commit and i think the last two commits of ag slop dropped?

Ok so you basically want just a simpler fix here for the sake of backport? I'll probably just rewrite the commits.

@buffalojoec buffalojoec force-pushed the genesis-feature-gated-vote-state branch from 63c88b8 to 3899768 Compare December 17, 2025 06:20
@buffalojoec
Copy link
Author

can we get the feature set plumbing changes factored out of the first commit and i think the last two commits of ag slop dropped?

Ok so you basically want just a simpler fix here for the sake of backport? I'll probably just rewrite the commits.

@t-nelson I think this new commit will backport better, and avoids any unnecessary refactoring.

@buffalojoec buffalojoec force-pushed the genesis-feature-gated-vote-state branch from 3899768 to c16465b Compare December 17, 2025 10:10
initial_accounts: Vec<(Pubkey, AccountSharedData)>,
mut initial_accounts: Vec<(Pubkey, AccountSharedData)>,
) -> GenesisConfig {
if cluster_type == ClusterType::Development {

Choose a reason for hiding this comment

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

this isn't really the dependency tho. we should

  1. factor feature gate activation as early as possible
  2. plumb the feature set to where it needs to be
  3. select the correct account format based on the feature gate status

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 precisely what my first PR was doing - maybe I misunderstood your request, but you said you wanted feature set plumbing factored out of the commit?

Choose a reason for hiding this comment

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

yeah I just wanted it in separate commits so it was actually reviewable

Copy link
Author

Choose a reason for hiding this comment

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

Ok I pushed up commits as you requested.


#[cfg(test)]
pub fn create_account_with_authorized(
pub fn create_v3_account_with_authorized(

Choose a reason for hiding this comment

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

this is what modules are for

@buffalojoec buffalojoec force-pushed the genesis-feature-gated-vote-state branch from c16465b to f6eacf8 Compare December 23, 2025 17:35
@buffalojoec buffalojoec force-pushed the genesis-feature-gated-vote-state branch from f6eacf8 to f080d70 Compare January 7, 2026 15:29
@buffalojoec buffalojoec requested a review from t-nelson January 7, 2026 23:31
Copy link

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

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

much more reviewable, thanks!

)
} else {
// Vote state v4 feature inactive. Create a v3 account.
if bls_pubkey_compressed.is_some() {
Copy link

Choose a reason for hiding this comment

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

probably for a followup, but this can probably be enforced by clap. if not, it should at least be moved up to where cli args are initially resolved

@buffalojoec buffalojoec added this pull request to the merge queue Jan 9, 2026
Merged via the queue into anza-xyz:master with commit 50c813a Jan 9, 2026
58 checks passed
@buffalojoec buffalojoec deleted the genesis-feature-gated-vote-state branch January 9, 2026 00:37
mergify bot pushed a commit that referenced this pull request Jan 9, 2026
* factor feature gate activation as early as possible

* plumb the feature set to where it needs to be

* select the proper account format based on the feature gate status

* cleanup

* apply similar patch to solana-genesis

(cherry picked from commit 50c813a)

# Conflicts:
#	genesis/src/main.rs
#	test-validator/src/lib.rs
buffalojoec added a commit that referenced this pull request Jan 9, 2026
* factor feature gate activation as early as possible

* plumb the feature set to where it needs to be

* select the proper account format based on the feature gate status

* cleanup

* apply similar patch to solana-genesis
buffalojoec added a commit that referenced this pull request Jan 12, 2026
fix: genesis: feature-gated vote state (#9467)

* factor feature gate activation as early as possible

* plumb the feature set to where it needs to be

* select the proper account format based on the feature gate status

* cleanup

* apply similar patch to solana-genesis

Co-authored-by: Joe C <joe.caulfield@anza.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v3.1 Backport to v3.1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature gate genesis vote account creation

4 participants