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

Make sure the operator quorum events are all fetched #361

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

jianoaix
Copy link
Contributor

@jianoaix jianoaix commented Mar 19, 2024

Why are these changes needed?

By default shurcooL/graphql only returns 100 results. However, when requesting operator opt-in/out quorum events in a block interval [startBlock, endBlock], we want all events. This PR fixes this issue.

In addition, we return block number/timestamp for those events as they are getting needed.

Tested: verified on a local server

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 :(

@@ -527,23 +535,20 @@ func TestQueryOperatorQuorumEvent(t *testing.T) {
assert.Equal(t, 2, len(added1))
assert.Equal(t, "operator-1", added1[0].Operator)
assert.Equal(t, uint32(80), added1[0].BlockNumber)
assert.Equal(t, 2, len(added1[0].QuorumNumbers))
// Note: the quorumId is 48 not 01 is because the string "01" is in UTF-8
Copy link
Contributor Author

Choose a reason for hiding this comment

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

previous assumption wasn't right; based on actual subgraph data, it's just a hex string starting with "0x".

@jianoaix jianoaix merged commit 8fbb862 into Layr-Labs:master Mar 19, 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.

2 participants