-
Notifications
You must be signed in to change notification settings - Fork 381
flamenco: vote states v4 #7608
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
base: main
Are you sure you want to change the base?
flamenco: vote states v4 #7608
Conversation
a43af0e to
b289efa
Compare
Performance Measurements ⏳
|
|
|
||
| /**********************************************************************/ | ||
| /* Getters */ | ||
| /**********************************************************************/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to remove these banners and instead document the functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh I'd prefer to keep these banners because it delineates the getters / setters cleanly without needing to explicitly document the exact same thing for every method in the file
ripatel-fd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good generally. Found some minor code style issues.
I'm rather concerned about object lifetime management and handling of tail-allocated variable size memory region. But these issues stem from fd_types and cannot trivially be fixed in the scope of this PR. Fuzzing will give us necessary confidence, but hope to make the deserialized vote state struct static size in the future.
Performance Measurements ⏳
|
Performance Measurements ⏳
|
Performance Measurements ⏳
|
Performance Measurements ⏳
|
Performance Measurements ⏳
|
Performance Measurements ⏳
|
Performance Measurements ⏳
|
34d4072 to
b55655e
Compare
b55655e to
f37a5d2
Compare
Performance Measurements ⏳
|
ibhatt-jumptrading
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we take this opportunity to break the fd types dependency on vote states
| case fd_vote_state_versioned_enum_v0_23_5: | ||
| *credits = vsv->inner.v0_23_5.epoch_credits; | ||
| break; | ||
| case fd_vote_state_versioned_enum_v1_14_11: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to ignore the old vote states since it's deprecated. not sure how it's handled in agave
| ulong stake_lamports, | ||
| fd_pubkey_t const * voter_pubkey, | ||
| fd_vote_state_t const * vote_state, | ||
| fd_vote_state_v3_t const * vote_state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align
| expected = FD_VOTE_STATE_V4_SZ; | ||
| break; | ||
| default: | ||
| FD_LOG_CRIT(( "unsupported version: %d", target_version )); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing indent
No description provided.