-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix compute budget overflow on SlotHistory reading #25
Conversation
pub fn confirmed_blocks_in_epoch( | ||
start_slot: u64, | ||
end_slot: u64, | ||
slot_history: SlotHistory, |
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.
pass by ref
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.
cluster_history_account.set_blocks(epoch - 1, num_blocks)?; | ||
// recreates SlotHistory with same heap memory chunk | ||
Box::new(SlotHistory { | ||
bits: bitvec_inner.into(), |
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.
shouldn't this be for the new epoch? weird bitvec_inner generated by start_slot, end_slot here from previous epoch then we use it below fo the current epoch
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.
SlotHistory contains last 1,048,576 slots so it will always contain all slots from last epoch and this epoch. Recreating it here to avoid copying + ownership issues. Can add a comment about how it contains both epochs of slots
programs/validator-history/src/instructions/copy_cluster_info.rs
Outdated
Show resolved
Hide resolved
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.
few qs
No description provided.