Skip to content
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

flamenco: no more custom votes anywhere #4202

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

ibhatt-jumptrading
Copy link
Contributor

No description provided.

@ibhatt-jumptrading ibhatt-jumptrading changed the title flamenco: no more custom votes anywhere [wip] flamenco: no more custom votes anywhere Feb 13, 2025
topointon-jump
topointon-jump previously approved these changes Feb 13, 2025
// Insert into the temporary vote states cache
fd_vote_info_pair_t_mapnode_t * new_vote_state_node = fd_vote_info_pair_t_map_acquire( temp_info->vote_states_pool );
fd_memcpy( &new_vote_state_node->elem.account, vote_account_pubkey, sizeof(fd_pubkey_t) );
fd_memcpy( &new_vote_state_node->elem.state, vote_state, sizeof(fd_vote_state_versioned_t) );
fd_vote_info_pair_t_map_insert( temp_info->vote_states_pool, &temp_info->vote_states_root, new_vote_state_node );
} else {
FD_LOG_NOTICE(("WHATS HAPPENING HERE"));
Copy link
Contributor

Choose a reason for hiding this comment

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

good question

@@ -347,13 +345,15 @@ fd_refresh_vote_accounts( fd_exec_slot_ctx_t * slot_ctx,
fd_pubkey_t const * vote_account_pubkey = &elem->elem.key;
fd_vote_state_versioned_t vote_state[1] = {0};
if( FD_LIKELY( !deserialize_and_update_vote_account( slot_ctx, elem, root, pool, vote_account_pubkey, vote_state, runtime_spad ) ) ) {
FD_TEST( vote_state->inner.current.epoch_credits );
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Comment on lines +2379 to +2396
switch( vsv->discriminant ) {
case fd_vote_state_versioned_enum_v0_23_5:
node_pubkey = vsv->inner.v0_23_5.node_pubkey;
last_ts_slot = vsv->inner.v0_23_5.last_timestamp.slot;
break;
case fd_vote_state_versioned_enum_v1_14_11:
node_pubkey = vsv->inner.v1_14_11.node_pubkey;
last_ts_slot = vsv->inner.v1_14_11.last_timestamp.slot;
break;
case fd_vote_state_versioned_enum_current:
node_pubkey = vsv->inner.current.node_pubkey;
last_ts_slot = vsv->inner.current.last_timestamp.slot;
break;
default:
__builtin_unreachable();
}

Copy link
Contributor

Choose a reason for hiding this comment

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

might be nice in future prs to define getters for these fields, possibly in fd types

@ibhatt-jumptrading ibhatt-jumptrading added this pull request to the merge queue Feb 13, 2025
Merged via the queue into main with commit fbe571f Feb 13, 2025
11 checks passed
@ibhatt-jumptrading ibhatt-jumptrading deleted the no_more_custom_votes branch February 13, 2025 19:30
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