Skip to content

simd-0387: bls pubkey management in vote account#8007

Merged
0x0ece merged 1 commit into
firedancer-io:mainfrom
0x0ece:0x0ece/simd-0387
Feb 10, 2026
Merged

simd-0387: bls pubkey management in vote account#8007
0x0ece merged 1 commit into
firedancer-io:mainfrom
0x0ece:0x0ece/simd-0387

Conversation

@0x0ece
Copy link
Copy Markdown
Contributor

@0x0ece 0x0ece commented Jan 26, 2026

@0x0ece 0x0ece force-pushed the 0x0ece/simd-0387 branch 6 times, most recently from 00bdaf6 to 3e73ea1 Compare January 28, 2026 16:56
@0x0ece 0x0ece force-pushed the 0x0ece/simd-0387 branch 6 times, most recently from 71cd099 to 73d0c1b Compare February 4, 2026 21:38

/* https://github.com/firedancer-io/agave/blob/v4.0.0-prerelease/programs/vote/src/vote_state/handler.rs#L528-L530 */
if( FD_LIKELY( bls_pubkey!=NULL ) ) {
memcpy( &self->bls_pubkey_compressed, bls_pubkey, sizeof(fd_bls_pubkey_compressed_t) );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't we need to also set self->has_bls_pubkey_compressed = 1; here?

@topointon-jump topointon-jump mentioned this pull request Feb 5, 2026
19 tasks
Comment on lines +1728 to +1732
/* If the BLS pubkey feature is active, reject the instruction
https://github.com/firedancer-io/agave/blob/v4.0.0-prerelease/programs/vote/src/vote_processor.rs#L106-L108 */
if( FD_UNLIKELY( is_bls_pubkey_feature_enabled ) ) {
return FD_EXECUTOR_INSTR_ERR_INVALID_INSTR_DATA;
}
Copy link
Copy Markdown
Contributor

@topointon-jump topointon-jump Feb 6, 2026

Choose a reason for hiding this comment

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

Latest main on Agave disables this if these feature gates have all been activated:

fn is_init_account_v2_enabled(invoke_context: &InvokeContext) -> bool {
    let feature_set = invoke_context.get_feature_set();
    feature_set.vote_state_v4
        && feature_set.commission_rate_in_basis_points
        && feature_set.custom_commission_collector
        && feature_set.block_revenue_sharing
        && feature_set.bls_pubkey_management_in_vote_account
}

As these feature gates are in flux imo we should just leave a FIXME here for commission_rate_in_basis_points, custom_commission_collector and block_revenue_sharing.

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.

ok let some FIXME. the code matches v4.0.0-prerelease, but we know already it won't match v4.0.0 (it doesn't match current agave master).

Comment on lines +2267 to +2269
if( FD_UNLIKELY( !is_bls_pubkey_feature_enabled ) ) {
return FD_EXECUTOR_INSTR_ERR_INVALID_INSTR_DATA;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same comment here about feature gates - this is only enabled when all of the gates are active:

fn is_init_account_v2_enabled(invoke_context: &InvokeContext) -> bool {
    let feature_set = invoke_context.get_feature_set();
    feature_set.vote_state_v4
        && feature_set.commission_rate_in_basis_points
        && feature_set.custom_commission_collector
        && feature_set.block_revenue_sharing
        && feature_set.bls_pubkey_management_in_vote_account
}

Again can just leave a FIXME

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.

same as above.

Comment on lines +820 to +822
if( FD_UNLIKELY( is_bls_pubkey_feature_enabled ) ) {
return FD_EXECUTOR_INSTR_ERR_INVALID_INSTR_DATA;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agave also has a check for vote_state.has_bls_pubkey() here, do we need that?

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.

added, together with its impl. I checked agave code and there's no other place (but tests) where this fn is used.

@0x0ece 0x0ece merged commit dcab556 into firedancer-io:main Feb 10, 2026
13 checks passed
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