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

Extract nextSyncCommitteeIndexes from BeaconState #2661

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Jun 9, 2021

Motivation

  • We have "Invalid state root" issue when syncing oonoonba at sync committee period boundary
  • It's because we don't have correct sync committee indices

Description

  • getNextSyncCommitteeIndices should only be called at epoch transition (when we haven't increased the slot) while we called it in rotateEpochs, except for at ALTAIR_FORK_EPOCH
  • having incorrect epoch means incorrect active validator indices
  • instead we should only extract sync committee indices from BeaconState and the cached pubkey2indices since nextSyncCommittee is calculated at epoch transition (sync committee period transition) already
    Closes Oonoonba sync - Invalid state root #2631

Steps to test or reproduce

  • sync oonoonba network

@codeclimate
Copy link

codeclimate bot commented Jun 9, 2021

Code Climate has analyzed commit 5073887 and detected 0 issues on this pull request.

View more on Code Climate.

@twoeths
Copy link
Contributor Author

twoeths commented Jun 9, 2021

synced to head with this branch and #2662

@twoeths twoeths marked this pull request as ready for review June 9, 2021 06:14
Copy link
Contributor

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

🎉

@wemeetagain wemeetagain merged commit 1a9e6e6 into master Jun 9, 2021
@wemeetagain wemeetagain deleted the tuyen/invalid-state-root branch June 9, 2021 14:31
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.

Oonoonba sync - Invalid state root
4 participants