Skip to content

Commit

Permalink
Misc fixes related to operator management
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix committed Mar 6, 2024
1 parent b2e47d2 commit eea5a78
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions disperser/dataapi/subgraph/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (a *api) QueryOperatorInfoByOperatorIdAtBlockNumber(ctx context.Context, op
// QueryOperatorAddedToQuorum finds operators' quorum opt-in history in range [startBlock, endBlock].
func (a *api) QueryOperatorAddedToQuorum(ctx context.Context, startBlock, endBlock uint32) ([]*OperatorQuorum, error) {
if startBlock > endBlock {
return nil, fmt.Errorf("startBlock must be no less than endBlock, startBlock: %d, endBlock: %d", startBlock, endBlock)
return nil, fmt.Errorf("endBlock must be no less than startBlock, startBlock: %d, endBlock: %d", startBlock, endBlock)
}
variables := map[string]any{
"blockNumber_gt": graphql.Int(startBlock - 1),
Expand All @@ -230,7 +230,7 @@ func (a *api) QueryOperatorAddedToQuorum(ctx context.Context, startBlock, endBlo
// QueryOperatorRemovedFromQuorum finds operators' quorum opt-out history in range [startBlock, endBlock].
func (a *api) QueryOperatorRemovedFromQuorum(ctx context.Context, startBlock, endBlock uint32) ([]*OperatorQuorum, error) {
if startBlock > endBlock {
return nil, fmt.Errorf("startBlock must be no less than endBlock, startBlock: %d, endBlock: %d", startBlock, endBlock)
return nil, fmt.Errorf("endBlock must be no less than startBlock, startBlock: %d, endBlock: %d", startBlock, endBlock)
}
variables := map[string]any{
"blockNumber_gt": graphql.Int(startBlock - 1),
Expand Down
4 changes: 2 additions & 2 deletions disperser/dataapi/subgraph_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type (
}
BatchNonSigningInfo struct {
QuorumNumbers []uint8
ReferenceBlockNumber uint64
ReferenceBlockNumber uint32
// The operatorIds of nonsigners for the batch.
NonSigners []string
}
Expand Down Expand Up @@ -667,7 +667,7 @@ func convertNonSigningInfo(infoGql *subgraph.BatchNonSigningInfo) (*BatchNonSign

return &BatchNonSigningInfo{
QuorumNumbers: quorums,
ReferenceBlockNumber: blockNum,
ReferenceBlockNumber: uint32(blockNum),
NonSigners: nonSigners,
}, nil
}
4 changes: 2 additions & 2 deletions disperser/dataapi/subgraph_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ func TestQueryBatchNonSigningInfoInInterval(t *testing.T) {
assert.Equal(t, 2, len(result[0].QuorumNumbers))
assert.Equal(t, uint8(0), result[0].QuorumNumbers[0])
assert.Equal(t, uint8(1), result[0].QuorumNumbers[1])
assert.Equal(t, uint64(81), result[0].ReferenceBlockNumber)
assert.Equal(t, uint32(81), result[0].ReferenceBlockNumber)
assert.Equal(t, 2, len(result[0].NonSigners))
assert.Equal(t, "0xe22dae12a0074f20b8fc96a0489376db34075e545ef60c4845d264a732568311", result[0].NonSigners[0])
assert.Equal(t, "0xe23cae12a0074f20b8fc96a0489376db34075e545ef60c4845d264b732568312", result[0].NonSigners[1])
Expand All @@ -520,7 +520,7 @@ func TestQueryBatchNonSigningInfoInInterval(t *testing.T) {
assert.Equal(t, 2, len(result[1].QuorumNumbers))
assert.Equal(t, uint8(1), result[1].QuorumNumbers[0])
assert.Equal(t, uint8(2), result[1].QuorumNumbers[1])
assert.Equal(t, uint64(80), result[1].ReferenceBlockNumber)
assert.Equal(t, uint32(80), result[1].ReferenceBlockNumber)
assert.Equal(t, 1, len(result[1].NonSigners))
assert.Equal(t, "0xe22dae12a0074f20b8fc96a0489376db34075e545ef60c4845d264a732568311", result[1].NonSigners[0])
}
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ In general, the `core` project contains implementation of all the important busi
# Directory structure
<pre>
┌── <a href="../api">api</a> Protobuf definitions and contract bindings
├── <a href="../churner">churner</a>: Churner service
├── <a href="../clients">clients</a>: Client-side libraries for users to integrate with EigenDA
├── <a href="../common">common</a>: Common utility libraries
├── <a href="../contracts">contracts</a>
Expand All @@ -24,6 +23,7 @@ In general, the `core` project contains implementation of all the important busi
├── <a href="../inabox">inabox</a>: Inabox test to run EigenDA system on a single machine
|── <a href="../indexer">indexer</a>: A simple indexer for efficiently tracking chain state and maintaining accumulators
├── <a href="../node">node</a>: DA node service
├── <a href="../operators">operators</a>: Operator network management such as Churner and Ejector
├── <a href="../retriever">retriever</a>: Retriever service
|── <a href="../subgraphs">subgraphs</a>: The subgraphs indexer for onchain information
├── <a href="../test">test</a>: Tools for running integration tests
Expand Down

0 comments on commit eea5a78

Please sign in to comment.