forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 1k
(Alpenglow) Allow creating v4 account in genesis, upstream Consensus Pool. #8122
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
Merged
wen-coding
merged 13 commits into
anza-xyz:master
from
wen-coding:upstream_consensus_pool
Sep 25, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
66eed6e
Allow creating v4 account in genesis, upstream Consensus Pool.
wen-coding d45b624
Remove accidentally added pub keyword.
wen-coding 6bf65db
Fix the keypair used.
wen-coding 3ad8f17
Remove unused functions.
wen-coding 942e153
Merge branch 'master' into upstream_consensus_pool
wen-coding 05522e8
Merge branch 'master' into upstream_consensus_pool
wen-coding 97a4195
Add stake_state::create_alpenglow_account which can is only called in…
wen-coding 89e0954
Upstream changes in Alpenglow #460.
wen-coding f3fb6af
Merge branch 'master' into upstream_consensus_pool
wen-coding e9eae6b
Merge branch 'master' into upstream_consensus_pool
wen-coding f49ff13
Merge branch 'master' into upstream_consensus_pool
wen-coding 7ad25b8
Merge branch 'master' into upstream_consensus_pool
wen-coding 5904506
Merge branch 'master' into upstream_consensus_pool
wen-coding File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| use thiserror::Error; | ||
|
|
||
| #[derive(Debug, Error)] | ||
| pub enum AlpenglowCommitmentError { | ||
| #[error("Failed to send commitment data, channel disconnected")] | ||
| ChannelDisconnected, | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently adding the implementation of v4 to the Vote program, and I think this change will have to get captured in that PR, so that it coincides with the feature gate I'm adding. In fact, I believe I need to add this now to get it to pass CI.
Is it feasible to rebase this onto #8163?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure we are on the same page:
What we needed for Alpenglow upstreaming:
create_v4_account_with_authorizedwas added in Add create_v4_account_with_authorized and actually populate bls_pubkey_to_rank_map in EpochStakes. #8103 as a temp workardound, but after vote-program: handler: init v4 support #8120 we should convert it tocreate_new_vote_state_v4_for_tests2.1 We are adding genesis util functions here
2.2 To make stake account creation work we are performing the operation here, you are saying once vote-program: outfit to fully support vote state v4 #8163 lands we should convert that to
let mut vote_state = VoteStateHandler::deserialize_and_convert(vote_account, VoteStateTargetVersion::V4)?;Of course we can do that. Do you know when #8163 will land?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh,
create_v4_account_with_authorizedusescreate_new_vote_state_v4_for_tests, so I guess we are good there. Is the only difference on #8163 to change:let vote_state_v4 = VoteStateV4::deserialize(vote_account.data(), voter_pubkey).unwrap();to
let vote_state = VoteStateHandler::deserialize_and_convert(vote_account, VoteStateTargetVersion::V4)?;?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly, and that should be covered by my PR once it's fully updated, since I'll need to update any callsites that don't yet know about the v4 state feature gate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, so sounds like it works both ways, if you manage to submit #8163 first, then I'll sync and change to the above call. If we submit this PR first, then it's just one-line change, so shouldn't be a big deal either.
In that case, is it okay if we ship this first to unblock other Alpenglow upstreaming?
Does rest of this PR look roughly correct to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can really only attest to the program stuff. I can't offer much of a review on the consensus side. But if you need the change immediately, sure, you can ship.