-
Notifications
You must be signed in to change notification settings - Fork 724
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 electra light client types #6361
base: unstable
Are you sure you want to change the base?
Conversation
…rsist-light-client-updates
…rsist-light-client-updates
…rsist-light-client-updates
…serilev/lighthouse into light-client-electra
…serilev/lighthouse into light-client-electra
…ght-client-electra
consensus/types/src/beacon_state.rs
Outdated
generalized_index: usize, | ||
) -> Result<Vec<Hash256>, Error> { | ||
// 1. Convert generalized index to field index. | ||
let field_index = match generalized_index { |
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.
Just match on the self.fork_unchecked() and pick the right gindex. No need to pass the generalized_index as argument. I guess now that the function is repeated we don't need to list the 1,2,3,4 steps on each function. Same for compute_sync_committee_proof if you split the function into compute_next_sync_committee_proof
and compute_current_sync_committee_proof
they are short functions that are no longer fallible. It simplifies the logic on the caller side too
Issue Addressed
Resolves #6002
Resolves #4022
Proposed Changes
Update light client types to be compatible with electra
Related spec PR:
ethereum/consensus-specs#3811
Blocked by #5915