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

Index operator state by quorum id not quorum index #399

Merged
merged 2 commits into from
Mar 27, 2024

Conversation

mooselumph
Copy link
Contributor

Why are these changes needed?

Uses the quorumID instead of the quorum index in the operatorState returned by the chainState implementation.

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

Comment on lines +373 to +377
quorumIds := BitmapToQuorumIds(quorumBitmap)

state := make(core.OperatorStakes, len(state_))
for i := range state_ {
quorumID := core.QuorumID(i)
quorumID := quorumIds[i]
Copy link
Contributor

Choose a reason for hiding this comment

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

So we're assuming BitmapToQuorumIds returned an ordered list of quorums in ascending order, and the quorums in state_ is in the same order, which is true in the current implementation.

@mooselumph mooselumph merged commit c0b8121 into Layr-Labs:master Mar 27, 2024
5 checks passed
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.

None yet

3 participants