Add VoteInitV2 and new variant in VoteAuthorize to add BLS Pubkey to vote program.#424
Conversation
Co-authored-by: Joe C <jcaulfield135@gmail.com>
buffalojoec
left a comment
There was a problem hiding this comment.
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.
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? |
joncinque
left a comment
There was a problem hiding this comment.
It looks like a few comments weren't actually addressed before merging, but other than that, the rest looks good to me!
| 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], | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Do you mean I should use a wrapper here?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
I'm not sure how this is being used downstream already or how the transition is being planned, but was this breaking change intended?
There was a problem hiding this comment.
Ok great, thanks! Sorry for the noise then
Per SIMD 387, do the following to add BLS Pubkey to vote program:
VoteInitV2, andInitializeAccountV2to create vote accountVoterWithBLSinVoteAuthorizeenum