Skip to content

Add VoteInitV2 and new variant in VoteAuthorize to add BLS Pubkey to vote program.#424

Merged
wen-coding merged 9 commits into
anza-xyz:masterfrom
wen-coding:add_vote_init_v2
Nov 21, 2025
Merged

Add VoteInitV2 and new variant in VoteAuthorize to add BLS Pubkey to vote program.#424
wen-coding merged 9 commits into
anza-xyz:masterfrom
wen-coding:add_vote_init_v2

Conversation

@wen-coding
Copy link
Copy Markdown
Contributor

Per SIMD 387, do the following to add BLS Pubkey to vote program:

  • Add VoteInitV2, and InitializeAccountV2 to create vote account
  • Add new variant VoterWithBLS in VoteAuthorize enum

Comment thread vote-interface/src/instruction.rs Outdated
Comment thread vote-interface/src/instruction.rs Outdated
Comment thread vote-interface/src/instruction.rs Outdated
Comment thread vote-interface/src/state/vote_state_v4.rs Outdated
Comment thread vote-interface/src/state/vote_instruction_data.rs Outdated
Comment thread vote-interface/src/state/vote_instruction_data.rs
wen-coding and others added 2 commits November 4, 2025 08:33
Co-authored-by: Joe C <jcaulfield135@gmail.com>
Comment thread vote-interface/src/state/vote_instruction_data.rs
Comment thread vote-interface/src/state/vote_instruction_data.rs
@wen-coding wen-coding requested a review from jstarry November 5, 2025 04:57
@wen-coding wen-coding requested a review from joncinque November 12, 2025 21:09
Copy link
Copy Markdown
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Nice, this is looking great. Looks like we just need to fix up the serialization of the BLS types and add some documentation for the "authorize" variants, then we're good.

Let's firm up the SIMD and then we can move to ship this.

Comment thread vote-interface/src/state/vote_instruction_data.rs
Comment thread vote-interface/src/state/vote_instruction_data.rs Outdated
Comment thread vote-interface/Cargo.toml Outdated
Comment thread vote-interface/src/instruction.rs
Copy link
Copy Markdown
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Lgtm!

@wen-coding
Copy link
Copy Markdown
Contributor Author

Lgtm!

SIMD 387 is finally merged, I'm merging this now. Is the next step doing a release so we can continue developing in agave repo?

@wen-coding wen-coding merged commit 739e2bd into anza-xyz:master Nov 21, 2025
24 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Alpenglow Nov 21, 2025
@wen-coding wen-coding deleted the add_vote_init_v2 branch November 21, 2025 16:38
Copy link
Copy Markdown
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

It looks like a few comments weren't actually addressed before merging, but other than that, the rest looks good to me!

Comment thread vote-interface/src/state/vote_instruction_data.rs
Comment thread vote-interface/src/state/vote_instruction_data.rs
Comment on lines +258 to +265
impl Default for VoterWithBLSArgs {
fn default() -> Self {
Self {
bls_pub_key: [0u8; BLS_PUBLIC_KEY_COMPRESSED_SIZE],
bls_proof_of_possession: [0u8; BLS_SIGNATURE_COMPRESSED_SIZE],
}
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks like this could also get similar Default treatment as the other struct, by deriving it from newtypes instead of doing it by hand

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you mean I should use a wrapper here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah that's what I was getting at, but it looks like the final decision was to not use wrapper structs, so no need to do anything here

}
}

pub fn new(vote_init: &VoteInitV2, clock: &Clock) -> Self {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure how this is being used downstream already or how the transition is being planned, but was this breaking change intended?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ok great, thanks! Sorry for the noise then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants