simd-0387: bls pubkey management in vote account#8007
Conversation
00bdaf6 to
3e73ea1
Compare
71cd099 to
73d0c1b
Compare
|
|
||
| /* 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) ); |
There was a problem hiding this comment.
Don't we need to also set self->has_bls_pubkey_compressed = 1; here?
73d0c1b to
7b2f235
Compare
| /* 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; | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
| if( FD_UNLIKELY( !is_bls_pubkey_feature_enabled ) ) { | ||
| return FD_EXECUTOR_INSTR_ERR_INVALID_INSTR_DATA; | ||
| } |
There was a problem hiding this comment.
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
| if( FD_UNLIKELY( is_bls_pubkey_feature_enabled ) ) { | ||
| return FD_EXECUTOR_INSTR_ERR_INVALID_INSTR_DATA; | ||
| } |
There was a problem hiding this comment.
Agave also has a check for vote_state.has_bls_pubkey() here, do we need that?
There was a problem hiding this comment.
added, together with its impl. I checked agave code and there's no other place (but tests) where this fn is used.
7b2f235 to
6fc5785
Compare
#7985
Agave: anza-xyz/agave#9310