From d9fa2bf654b7fec7c7ab356863e3ee4b23153281 Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Thu, 20 Mar 2025 11:38:43 -0700 Subject: [PATCH 1/4] common: fix endpoints that still required protocolNetwork bump version to 0.23.3 common: attempt to fix actions and tests work on fixing protocolnetwork --- docs/networks/arbitrum-sepolia.md | 4 +-- lerna.json | 2 +- packages/indexer-agent/package.json | 4 +-- packages/indexer-agent/src/agent.ts | 7 ++-- packages/indexer-cli/package.json | 4 +-- packages/indexer-cli/src/actions.ts | 2 -- .../src/commands/indexer/actions/approve.ts | 1 - packages/indexer-common/package.json | 2 +- packages/indexer-common/src/actions.ts | 3 -- .../__tests__/resolvers/actions.test.ts | 19 +++-------- .../resolvers/indexing-rules.test.ts | 1 - .../src/indexer-management/__tests__/util.ts | 1 + .../src/indexer-management/client.ts | 15 ++++---- .../models/indexing-rule.ts | 2 -- .../resolvers/allocations.ts | 16 +-------- .../resolvers/indexer-status.ts | 34 +++---------------- .../resolvers/indexing-rules.ts | 6 ++-- .../src/indexer-management/rules.ts | 2 +- packages/indexer-common/src/operator.ts | 19 ++++++----- packages/indexer-common/src/subgraphs.ts | 8 +++-- 20 files changed, 49 insertions(+), 103 deletions(-) diff --git a/docs/networks/arbitrum-sepolia.md b/docs/networks/arbitrum-sepolia.md index 666979d5f..cb9ff27b2 100644 --- a/docs/networks/arbitrum-sepolia.md +++ b/docs/networks/arbitrum-sepolia.md @@ -7,8 +7,8 @@ The Graph Network's testnet is on Arbitrum Sepolia (eip155:421614). Sepolia netw | Component | Release | | ------------------ | ------------------------------------------------------------------------------------ | | contracts | [5.3.3](https://github.com/graphprotocol/contracts/releases/tag/v5.3.3) | -| indexer-agent | [0.23.2](https://github.com/graphprotocol/indexer/releases/tag/v0.23.2) | -| indexer-cli | [0.23.2](https://github.com/graphprotocol/indexer/releases/tag/v0.23.2) | +| indexer-agent | [0.23.3](https://github.com/graphprotocol/indexer/releases/tag/v0.23.3) | +| indexer-cli | [0.23.3](https://github.com/graphprotocol/indexer/releases/tag/v0.23.3) | | indexer-service-rs | [1.0.0](https://github.com/graphprotocol/indexer-rs/releases/tag/v1.0.0) | | tap-agent | [1.0.0](https://github.com/graphprotocol/indexer-rs/releases/tag/v1.0.0) | | graph-node | [0.35.1](https://github.com/graphprotocol/graph-node/releases/tag/v0.35.1) | diff --git a/lerna.json b/lerna.json index 1d9555bb3..14eb1d0aa 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ ], "npmClient": "yarn", "useWorkspaces": true, - "version": "0.23.2" + "version": "0.23.3" } diff --git a/packages/indexer-agent/package.json b/packages/indexer-agent/package.json index 8aa3ff96c..d3226671b 100644 --- a/packages/indexer-agent/package.json +++ b/packages/indexer-agent/package.json @@ -1,6 +1,6 @@ { "name": "@graphprotocol/indexer-agent", - "version": "0.23.2", + "version": "0.23.3", "description": "Indexer agent", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -29,7 +29,7 @@ }, "dependencies": { "@graphprotocol/common-ts": "2.0.11", - "@graphprotocol/indexer-common": "^0.23.2", + "@graphprotocol/indexer-common": "^0.23.3", "@thi.ng/heaps": "^1.3.1", "axios": "0.26.1", "bs58": "5.0.0", diff --git a/packages/indexer-agent/src/agent.ts b/packages/indexer-agent/src/agent.ts index f3caa6908..166756623 100644 --- a/packages/indexer-agent/src/agent.ts +++ b/packages/indexer-agent/src/agent.ts @@ -669,7 +669,7 @@ export class Agent { eligibleAllocations: Allocation[], ): Promise { const logger = this.logger.child({ function: 'reconcileDeployments' }) - logger.debug('Reconcile deployments') + logger.debug('Reconcile deployments', { targetDeployments }) // ---------------------------------------------------------------------------------------- // Ensure the network subgraph deployment is _always_ indexed // ---------------------------------------------------------------------------------------- @@ -915,7 +915,7 @@ export class Agent { network.specification.indexerOptions.allocationManagementMode === AllocationManagementMode.MANUAL ) { - this.logger.trace( + this.logger.debug( `Skipping allocation reconciliation since AllocationManagementMode = 'manual'`, { protocolNetwork: network.specification.networkIdentifier, @@ -948,7 +948,6 @@ export class Agent { // Do nothing if there are already approved actions in the queue awaiting execution const approvedActions = await operator.fetchActions({ status: ActionStatus.APPROVED, - protocolNetwork: network.specification.networkIdentifier, }) if (approvedActions.length > 0) { this.logger.info( @@ -964,7 +963,7 @@ export class Agent { const activeAllocations: Allocation[] = await network.networkMonitor.allocations(AllocationStatus.ACTIVE) - this.logger.trace(`Reconcile allocation actions`, { + this.logger.debug(`Reconcile allocation actions`, { protocolNetwork: network.specification.networkIdentifier, epoch, maxAllocationEpochs, diff --git a/packages/indexer-cli/package.json b/packages/indexer-cli/package.json index 9de67b833..e27c3c6aa 100644 --- a/packages/indexer-cli/package.json +++ b/packages/indexer-cli/package.json @@ -1,6 +1,6 @@ { "name": "@graphprotocol/indexer-cli", - "version": "0.23.2", + "version": "0.23.3", "description": "Indexer CLI for The Graph Network", "main": "./dist/cli.js", "files": [ @@ -27,7 +27,7 @@ }, "dependencies": { "@graphprotocol/common-ts": "2.0.11", - "@graphprotocol/indexer-common": "^0.23.2", + "@graphprotocol/indexer-common": "^0.23.3", "@iarna/toml": "2.2.5", "@thi.ng/iterators": "5.1.74", "@urql/core": "3.1.0", diff --git a/packages/indexer-cli/src/actions.ts b/packages/indexer-cli/src/actions.ts index bc3b6f961..cf670bbed 100644 --- a/packages/indexer-cli/src/actions.ts +++ b/packages/indexer-cli/src/actions.ts @@ -10,7 +10,6 @@ import { nullPassThrough, OrderDirection, parseBoolean, - validateNetworkIdentifier, } from '@graphprotocol/indexer-common' import { validatePOI, validateRequiredParams } from './command-helpers' import gql from 'graphql-tag' @@ -207,7 +206,6 @@ const ACTION_PARAMS_PARSERS: Record any> type: x => validateActionType(x), status: x => validateActionStatus(x), reason: nullPassThrough, - protocolNetwork: x => validateNetworkIdentifier(x), } /** diff --git a/packages/indexer-cli/src/commands/indexer/actions/approve.ts b/packages/indexer-cli/src/commands/indexer/actions/approve.ts index 22387a4d5..240a3b239 100644 --- a/packages/indexer-cli/src/commands/indexer/actions/approve.ts +++ b/packages/indexer-cli/src/commands/indexer/actions/approve.ts @@ -58,7 +58,6 @@ module.exports = { if (actionIDs.join() == 'queued') { const queuedActions = await fetchActions(client, { status: ActionStatus.QUEUED, - protocolNetwork: 'deprecated', }) numericActionIDs = queuedActions.map(action => action.id) diff --git a/packages/indexer-common/package.json b/packages/indexer-common/package.json index b71f1d2bc..1a4141d36 100644 --- a/packages/indexer-common/package.json +++ b/packages/indexer-common/package.json @@ -1,6 +1,6 @@ { "name": "@graphprotocol/indexer-common", - "version": "0.23.2", + "version": "0.23.3", "description": "Common library for Graph Protocol indexer components", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/indexer-common/src/actions.ts b/packages/indexer-common/src/actions.ts index a14d57acb..ecdc23b37 100644 --- a/packages/indexer-common/src/actions.ts +++ b/packages/indexer-common/src/actions.ts @@ -18,7 +18,6 @@ export interface ActionItem { type: ActionType reason: string status?: ActionStatus - protocolNetwork: string } export interface ActionUpdateInput { @@ -30,7 +29,6 @@ export interface ActionUpdateInput { type?: ActionType status?: ActionStatus reason?: string - protocolNetwork?: string } export interface ActionInput { @@ -146,7 +144,6 @@ export interface ActionFilter { source?: string reason?: string updatedAt?: WhereOperators - protocolNetwork?: string } export const actionFilterToWhereOptions = (filter: ActionFilter): WhereOptions => { diff --git a/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts b/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts index 48650f201..e79cc79c0 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/resolvers/actions.test.ts @@ -53,7 +53,6 @@ const QUEUE_ACTIONS_MUTATION = gql` transaction failureReason status - protocolNetwork } } ` @@ -74,7 +73,6 @@ const APPROVE_ACTIONS_MUTATION = gql` transaction failureReason status - protocolNetwork } } ` @@ -95,7 +93,6 @@ const CANCEL_ACTIONS_MUTATION = gql` transaction failureReason status - protocolNetwork } } ` @@ -116,7 +113,6 @@ const UPDATE_ACTIONS_MUTATION = gql` transaction failureReason status - protocolNetwork } } ` @@ -141,7 +137,6 @@ const ACTIONS_QUERY = gql` transaction failureReason status - protocolNetwork } } ` @@ -487,7 +482,6 @@ describe.skip('Actions', () => { ['source', 'String'], ['reason', 'String'], ['priority', 'Int'], - ['protocolNetwork', 'String'], ] const graphQLErrors = expectedFieldNamesAndTypes.map( ([fieldName, fieldType]) => @@ -504,7 +498,7 @@ describe.skip('Actions', () => { test('Reject action with invalid params for action type', async () => { const inputAction = invalidReallocateAction - const expected = { ...inputAction, protocolNetwork: 'eip155:421614' } + const expected = inputAction const fields = JSON.stringify(expected) await expect( client.mutation(QUEUE_ACTIONS_MUTATION, { actions: [inputAction] }).toPromise(), @@ -715,6 +709,7 @@ describe.skip('Actions', () => { priority: 0, } as ActionInput + // models still store a protocolNetwork await managementModels.Action.create( { ...failedAction, protocolNetwork: 'whatever' }, { @@ -725,7 +720,7 @@ describe.skip('Actions', () => { const result = await client .mutation(QUEUE_ACTIONS_MUTATION, { - actions: [{ ...proposedAction, protocolNetwork: 'whatever' }], + actions: [proposedAction], }) .toPromise() @@ -760,8 +755,6 @@ describe.skip('Actions', () => { source: 'indexerAgent', reason: 'indexingRule', priority: 0, - // When writing directly to the database, `protocolNetwork` must be in the CAIP2-ID format. - protocolNetwork: 'eip155:421614', } as ActionInput const proposedAction = { @@ -772,9 +765,9 @@ describe.skip('Actions', () => { source: 'indexerAgent', reason: 'indexingRule', priority: 0, - protocolNetwork: 'arbitrum-sepolia', } as ActionInput + // models still store a protocolNetwork await managementModels.Action.create( { ...successfulAction, protocolNetwork: 'whatever' }, { @@ -816,8 +809,6 @@ describe.skip('Actions', () => { source: 'indexerAgent', reason: 'indexingRule', priority: 0, - // When writing directly to the database, `protocolNetwork` must be in the CAIP2-ID format. - protocolNetwork: 'eip155:421614', } as ActionInput const queuedAllocateAction = { @@ -829,9 +820,9 @@ describe.skip('Actions', () => { source: 'indexerAgent', reason: 'indexingRule', priority: 0, - protocolNetwork: 'arbitrum-sepolia', } as ActionInput + // models still store a protocolNetwork await managementModels.Action.create( { ...queuedUnallocateAction, protocolNetwork: 'whatever' }, { diff --git a/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts b/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts index 5a13b8bdc..3117bf4a1 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts @@ -44,7 +44,6 @@ const SET_INDEXING_RULE_MUTATION = gql` decisionBasis requireSupported safety - protocolNetwork } } ` diff --git a/packages/indexer-common/src/indexer-management/__tests__/util.ts b/packages/indexer-common/src/indexer-management/__tests__/util.ts index 1a9fe6f4a..353cadb4e 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/util.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/util.ts @@ -80,6 +80,7 @@ export const defaults: IndexerManagementDefaults = { parallelAllocations: 1, requireSupported: true, safety: true, + protocolNetwork: 'deprecated', }, } diff --git a/packages/indexer-common/src/indexer-management/client.ts b/packages/indexer-common/src/indexer-management/client.ts index 3aa97ce92..5db42b2dd 100644 --- a/packages/indexer-common/src/indexer-management/client.ts +++ b/packages/indexer-common/src/indexer-management/client.ts @@ -146,7 +146,6 @@ const SCHEMA_SDL = gql` source: String! reason: String! priority: Int! - protocolNetwork: String! } input ActionUpdateInput { @@ -370,11 +369,11 @@ const SCHEMA_SDL = gql` identifier: IndexingRuleIdentifier! merged: Boolean! = false ): IndexingRule - indexingRules(merged: Boolean! = false, protocolNetwork: String): [IndexingRule!]! - indexerRegistration(protocolNetwork: String!): IndexerRegistration! + indexingRules(merged: Boolean! = false): [IndexingRule!]! + indexerRegistration: IndexerRegistration! indexerDeployments: [IndexerDeployment]! - indexerAllocations(protocolNetwork: String!): [IndexerAllocation]! - indexerEndpoints(protocolNetwork: String): [IndexerEndpoints!]! + indexerAllocations: [IndexerAllocation]! + indexerEndpoints: [IndexerEndpoints!]! costModels(deployments: [String!]): [CostModel!]! costModel(deployment: String!): CostModel @@ -413,21 +412,21 @@ const SCHEMA_SDL = gql` deployment: String! amount: String! indexNode: String - protocolNetwork: String! ): CreateAllocationResult! + closeAllocation( allocation: String! poi: String force: Boolean - protocolNetwork: String! ): CloseAllocationResult! + reallocateAllocation( allocation: String! poi: String amount: String! force: Boolean - protocolNetwork: String! ): ReallocateAllocationResult! + submitCollectReceiptsJob(allocation: String!, protocolNetwork: String!): Boolean! updateAction(action: ActionInput!): Action! diff --git a/packages/indexer-common/src/indexer-management/models/indexing-rule.ts b/packages/indexer-common/src/indexer-management/models/indexing-rule.ts index 60534d73e..8e67ce838 100644 --- a/packages/indexer-common/src/indexer-management/models/indexing-rule.ts +++ b/packages/indexer-common/src/indexer-management/models/indexing-rule.ts @@ -30,8 +30,6 @@ export interface IndexingRuleAttributes { decisionBasis: IndexingDecisionBasis requireSupported: boolean safety: boolean - - // TODO: deprecate protocolNetwork: string } diff --git a/packages/indexer-common/src/indexer-management/resolvers/allocations.ts b/packages/indexer-common/src/indexer-management/resolvers/allocations.ts index 3af7e6f8f..c614ac457 100644 --- a/packages/indexer-common/src/indexer-management/resolvers/allocations.ts +++ b/packages/indexer-common/src/indexer-management/resolvers/allocations.ts @@ -34,7 +34,6 @@ interface AllocationFilter { status: 'active' | 'closed' allocation: string | null subgraphDeployment: string | null - protocolNetwork: string | null } enum AllocationQuery { @@ -60,7 +59,6 @@ interface AllocationInfo { indexingRewards: string queryFeesCollected: string status: string - protocolNetwork: string } const ALLOCATION_QUERIES = { @@ -185,7 +183,6 @@ async function queryAllocations( maxAllocationEpochs: number blocksPerEpoch: number avgBlockTime: number - protocolNetwork: string }, ): Promise { logger.trace('Query Allocations', { @@ -288,7 +285,6 @@ async function queryAllocations( indexingRewards: allocation.indexingRewards, queryFeesCollected: allocation.queryFeesCollected, status: allocation.status, - protocolNetwork: context.protocolNetwork, } }, ) @@ -308,14 +304,6 @@ export default { ) } - // Return early if a different protocol network is specifically requested - if ( - filter.protocolNetwork && - filter.protocolNetwork !== network.specification.networkIdentifier - ) { - return [] - } - const { networkMonitor, networkSubgraph, @@ -351,7 +339,6 @@ export default { maxAllocationEpochs, blocksPerEpoch: epochLength.toNumber(), avgBlockTime: 13000, - protocolNetwork: network.specification.networkIdentifier, } const allocationsResult = await queryAllocations( @@ -368,14 +355,13 @@ export default { { deployment, amount, - protocolNetwork, }: { deployment: string amount: string - protocolNetwork: string }, { network, graphNode, logger, models }: IndexerManagementResolverContext, ): Promise => { + const protocolNetwork = network.specification.networkIdentifier logger.debug('Execute createAllocation() mutation', { deployment, amount, diff --git a/packages/indexer-common/src/indexer-management/resolvers/indexer-status.ts b/packages/indexer-common/src/indexer-management/resolvers/indexer-status.ts index e1e3eae95..ac3ab2a08 100644 --- a/packages/indexer-common/src/indexer-management/resolvers/indexer-status.ts +++ b/packages/indexer-common/src/indexer-management/resolvers/indexer-status.ts @@ -4,12 +4,7 @@ import geohash from 'ngeohash' import gql from 'graphql-tag' import { IndexerManagementResolverContext } from '../client' import { SubgraphDeploymentID } from '@graphprotocol/common-ts' -import { - indexerError, - IndexerErrorCode, - Network, - validateNetworkIdentifier, -} from '@graphprotocol/indexer-common' +import { indexerError, IndexerErrorCode, Network } from '@graphprotocol/indexer-common' interface Test { test: (url: string) => string run: (url: string) => Promise @@ -61,7 +56,7 @@ const URL_VALIDATION_TEST: Test = { export default { indexerRegistration: async ( - _: { protocolNetwork: string | null }, + _: {}, { network }: IndexerManagementResolverContext, ): Promise => { if (!network) { @@ -98,7 +93,7 @@ export default { }, indexerDeployments: async ( - _: { protocolNetwork: string | null }, + _: {}, { graphNode }: IndexerManagementResolverContext, ): Promise => { const result = await graphNode.indexingStatus([]) @@ -109,7 +104,7 @@ export default { }, indexerAllocations: async ( - _: { protocolNetwork: string | null }, + _: {}, { network, logger }: IndexerManagementResolverContext, ): Promise => { if (!network) { @@ -184,7 +179,7 @@ export default { }, indexerEndpoints: async ( - { protocolNetwork: unvalidatedProtocolNetwork }: { protocolNetwork: string | null }, + _: {}, { network, logger }: IndexerManagementResolverContext, ): Promise => { if (!network) { @@ -193,25 +188,6 @@ export default { ) } const endpoints: Endpoints[] = [] - let networkIdentifier: string | null = null - - // Validate protocol network - try { - if (unvalidatedProtocolNetwork) { - networkIdentifier = validateNetworkIdentifier(unvalidatedProtocolNetwork) - } - } catch (parseError) { - throw new Error( - `Invalid protocol network identifier: '${unvalidatedProtocolNetwork}'. Error: ${parseError}`, - ) - } - - if ( - networkIdentifier && - networkIdentifier !== network.specification.networkIdentifier - ) { - return endpoints - } try { const networkEndpoints = await endpointForNetwork(network) endpoints.push(networkEndpoints) diff --git a/packages/indexer-common/src/indexer-management/resolvers/indexing-rules.ts b/packages/indexer-common/src/indexer-management/resolvers/indexing-rules.ts index a4d326dcb..a8680f1f0 100644 --- a/packages/indexer-common/src/indexer-management/resolvers/indexing-rules.ts +++ b/packages/indexer-common/src/indexer-management/resolvers/indexing-rules.ts @@ -58,7 +58,7 @@ export default { }, indexingRules: async ( - { merged }: { merged: boolean; protocolNetwork: string | undefined }, + { merged }: { merged: boolean }, { models }: IndexerManagementResolverContext, ): Promise => { return await fetchIndexingRules(models, merged) @@ -72,7 +72,7 @@ export default { throw Error('Cannot set indexingRule without identifier') } - rule.protocolNetwork = network.networkMonitor.networkCAIPID + rule.protocolNetwork = network.specification.networkIdentifier const [identifier] = await processIdentifier(rule.identifier, { all: false, @@ -94,7 +94,7 @@ export default { global: true, }) - const protocolNetwork = network.networkMonitor.networkCAIPID + const protocolNetwork = network.specification.networkIdentifier const validatedRuleIdentifier = { protocolNetwork, diff --git a/packages/indexer-common/src/indexer-management/rules.ts b/packages/indexer-common/src/indexer-management/rules.ts index fc967851e..0cc28cbdb 100644 --- a/packages/indexer-common/src/indexer-management/rules.ts +++ b/packages/indexer-common/src/indexer-management/rules.ts @@ -15,7 +15,7 @@ export const fetchIndexingRules = async ( const logger = new Logger({ name: 'indexer-common' }) logger.info(`Fetching indexing rules for current network `) - const whereClause = {} // protocolNetwork ?{ protocolNetwork }: {} + const whereClause = {} const rules = await models.IndexingRule.findAll({ where: whereClause, order: [ diff --git a/packages/indexer-common/src/operator.ts b/packages/indexer-common/src/operator.ts index 1bd46e4e0..35db175c1 100644 --- a/packages/indexer-common/src/operator.ts +++ b/packages/indexer-common/src/operator.ts @@ -108,7 +108,6 @@ export class Operator { custom decisionBasis requireSupported - protocolNetwork } } `, @@ -119,7 +118,7 @@ export class Operator { if (result.error) { throw result.error } - this.logger.trace('Fetched indexing rules', { + this.logger.debug('Fetched indexing rules', { count: result.data.indexingRules.length, rules: result.data.indexingRules.map((rule: IndexingRuleAttributes) => { return { @@ -154,7 +153,6 @@ export class Operator { allocationAmount decisionBasis requireSupported - protocolNetwork } } `, @@ -166,7 +164,7 @@ export class Operator { this.logger.info(`Creating default "global" indexing rule`) const defaults = { - ...identifier, + identifier: INDEXING_RULE_GLOBAL, identifierType: SubgraphIdentifierType.GROUP, allocationAmount: this.specification.indexerOptions.defaultAllocationAmount.toString(), @@ -196,7 +194,6 @@ export class Operator { decisionBasis requireSupported safety - protocolNetwork } } `, @@ -277,7 +274,6 @@ export class Operator { source: 'indexerAgent', reason: action.reason, priority: 0, - protocolNetwork: action.protocolNetwork, } this.logger.trace(`Queueing action input`, { actionInput, @@ -303,6 +299,10 @@ export class Operator { .toPromise() if (actionResult.error) { + this.logger.error(`Failed to queue action`, { + action, + error: actionResult.error, + }) if (actionResult.error instanceof CombinedError) { if (actionResult.error.message.includes('Duplicate')) { this.logger.warn( @@ -324,6 +324,10 @@ export class Operator { this.logger.info(`Queued ${action.type} action for execution`, { queuedAction: actionResult.data.queueActions, }) + } else { + this.logger.warn(`Failed to queue action`, { + action, + }) } return actionResult.data.queueActions @@ -371,7 +375,6 @@ export class Operator { }, type: ActionType.ALLOCATE, reason: deploymentAllocationDecision.reasonString(), - protocolNetwork: deploymentAllocationDecision.protocolNetwork, }) return @@ -409,7 +412,6 @@ export class Operator { }, type: ActionType.UNALLOCATE, reason: deploymentAllocationDecision.reasonString(), - protocolNetwork: deploymentAllocationDecision.protocolNetwork, } as ActionItem) }, { concurrency: 1 }, @@ -445,7 +447,6 @@ export class Operator { }, type: ActionType.REALLOCATE, reason: `${deploymentAllocationDecision.reasonString()}:allocationExpiring`, // Need to update to include 'ExpiringSoon' - protocolNetwork: deploymentAllocationDecision.protocolNetwork, }) }, { diff --git a/packages/indexer-common/src/subgraphs.ts b/packages/indexer-common/src/subgraphs.ts index 9ffb3fb06..d77200ad4 100644 --- a/packages/indexer-common/src/subgraphs.ts +++ b/packages/indexer-common/src/subgraphs.ts @@ -197,9 +197,11 @@ export function evaluateDeployments( networkDeployments: SubgraphDeployment[], rules: IndexingRuleAttributes[], ): AllocationDecision[] { - return networkDeployments.map((deployment) => - isDeploymentWorthAllocatingTowards(logger, deployment, rules), - ) + return networkDeployments.map((deployment) => { + const worth = isDeploymentWorthAllocatingTowards(logger, deployment, rules) + logger.debug('Deployment worth', { deployment: deployment.id.display, worth }) + return worth + }) } export function isDeploymentWorthAllocatingTowards( From 06a37982748c6f88000fa3eae02e4066fb52f119 Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Tue, 25 Mar 2025 09:40:09 -0700 Subject: [PATCH 2/4] common: fix global indexing rule creation --- packages/indexer-common/src/operator.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/indexer-common/src/operator.ts b/packages/indexer-common/src/operator.ts index 35db175c1..63d28fc52 100644 --- a/packages/indexer-common/src/operator.ts +++ b/packages/indexer-common/src/operator.ts @@ -172,6 +172,7 @@ export class Operator { decisionBasis: 'rules', requireSupported: true, safety: true, + protocolNetwork: this.specification.networkIdentifier, } const defaultGlobalRule = await this.indexerManagement From beed3a7a188aba175c17da4ec9b4a14ce1c32969 Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Mon, 31 Mar 2025 07:17:59 -0700 Subject: [PATCH 3/4] cli: remove protocolNetwork from allocations commands --- packages/indexer-cli/src/allocations.ts | 43 ++----------------- .../src/commands/indexer/allocations/close.ts | 24 +---------- .../commands/indexer/allocations/collect.ts | 24 +---------- .../commands/indexer/allocations/create.ts | 19 +------- .../src/commands/indexer/allocations/get.ts | 2 - .../indexer/allocations/reallocate.ts | 17 +------- 6 files changed, 12 insertions(+), 117 deletions(-) diff --git a/packages/indexer-cli/src/allocations.ts b/packages/indexer-cli/src/allocations.ts index 16cd86fdd..68bd1b556 100644 --- a/packages/indexer-cli/src/allocations.ts +++ b/packages/indexer-cli/src/allocations.ts @@ -10,7 +10,6 @@ import { CloseAllocationResult, CreateAllocationResult, ReallocateAllocationResult, - resolveChainAlias, } from '@graphprotocol/indexer-common' export interface IndexerAllocation { @@ -29,7 +28,6 @@ export interface IndexerAllocation { indexingRewards: BigNumber queryFeesCollected: BigNumber status: string - protocolNetwork: string } const ALLOCATION_CONVERTERS_FROM_GRAPHQL: Record< @@ -53,7 +51,6 @@ const ALLOCATION_CONVERTERS_FROM_GRAPHQL: Record< indexingRewards: nullPassThrough((x: string) => BigNumber.from(x)), queryFeesCollected: nullPassThrough((x: string) => BigNumber.from(x)), status: x => x, - protocolNetwork: x => x, } const ALLOCATION_FORMATTERS: Record< @@ -76,7 +73,6 @@ const ALLOCATION_FORMATTERS: Record< indexingRewards: x => utils.commify(formatGRT(x)), queryFeesCollected: x => utils.commify(formatGRT(x)), status: x => x, - protocolNetwork: resolveChainAlias, } /** @@ -175,7 +171,6 @@ export const createAllocation = async ( deployment: string, amount: BigNumber, indexNode: string | undefined, - protocolNetwork: string, ): Promise => { const result = await client .mutation( @@ -183,19 +178,16 @@ export const createAllocation = async ( mutation createAllocation( $deployment: String! $amount: String! - $protocolNetwork: String! $indexNode: String ) { createAllocation( deployment: $deployment amount: $amount - protocolNetwork: $protocolNetwork indexNode: $indexNode ) { allocation deployment allocatedTokens - protocolNetwork } } `, @@ -203,7 +195,6 @@ export const createAllocation = async ( deployment, amount: amount.toString(), indexNode, - protocolNetwork, }, ) .toPromise() @@ -220,28 +211,16 @@ export const closeAllocation = async ( allocationID: string, poi: string | undefined, force: boolean, - protocolNetwork: string, ): Promise => { const result = await client .mutation( gql` - mutation closeAllocation( - $allocation: String! - $poi: String - $force: Boolean - $protocolNetwork: String! - ) { - closeAllocation( - allocation: $allocation - poi: $poi - force: $force - protocolNetwork: $protocolNetwork - ) { + mutation closeAllocation($allocation: String!, $poi: String, $force: Boolean) { + closeAllocation(allocation: $allocation, poi: $poi, force: $force) { allocation allocatedTokens indexingRewards receiptsWorthCollecting - protocolNetwork } } `, @@ -249,7 +228,6 @@ export const closeAllocation = async ( allocation: allocationID, poi, force, - protocolNetwork, }, ) .toPromise() @@ -267,7 +245,6 @@ export const reallocateAllocation = async ( poi: string | undefined, amount: BigNumber, force: boolean, - protocolNetwork: string, ): Promise => { const result = await client .mutation( @@ -277,21 +254,18 @@ export const reallocateAllocation = async ( $poi: String $amount: String! $force: Boolean - $protocolNetwork: String! ) { reallocateAllocation( allocation: $allocation poi: $poi amount: $amount force: $force - protocolNetwork: $protocolNetwork ) { closedAllocation indexingRewardsCollected receiptsWorthCollecting createdAllocation createdAllocationStake - protocolNetwork } } `, @@ -300,7 +274,6 @@ export const reallocateAllocation = async ( poi, amount: amount.toString(), force, - protocolNetwork, }, ) .toPromise() @@ -315,24 +288,16 @@ export const reallocateAllocation = async ( export const submitCollectReceiptsJob = async ( client: IndexerManagementClient, allocationID: string, - protocolNetwork: string, ): Promise => { const result = await client .mutation( gql` - mutation submitCollectReceiptsJob( - $allocation: String! - $protocolNetwork: String! - ) { - submitCollectReceiptsJob( - allocation: $allocation - protocolNetwork: $protocolNetwork - ) + mutation submitCollectReceiptsJob($allocation: String!) { + submitCollectReceiptsJob(allocation: $allocation) } `, { allocation: allocationID, - protocolNetwork, }, ) .toPromise() diff --git a/packages/indexer-cli/src/commands/indexer/allocations/close.ts b/packages/indexer-cli/src/commands/indexer/allocations/close.ts index 796493939..985f526a2 100644 --- a/packages/indexer-cli/src/commands/indexer/allocations/close.ts +++ b/packages/indexer-cli/src/commands/indexer/allocations/close.ts @@ -5,7 +5,6 @@ import { loadValidatedConfig } from '../../../config' import { createIndexerManagementClient } from '../../../client' import { closeAllocation } from '../../../allocations' import { validatePOI, printObjectOrArray } from '../../../command-helpers' -import { validateNetworkIdentifier } from '@graphprotocol/indexer-common' const HELP = ` ${chalk.bold('graph indexer allocations close')} [options] @@ -15,9 +14,6 @@ ${chalk.dim('Options:')} -h, --help Show usage information -f, --force Bypass POIaccuracy checks and submit transaction with provided data -o, --output table|json|yaml Choose the output format: table (default), JSON, or YAML - -${chalk.dim('Networks:')} - mainnet, arbitrum-one, sepolia or arbitrum sepolia ` module.exports = { @@ -46,7 +42,7 @@ module.exports = { return } - const [network, id, unformattedPoi] = parameters.array || [] + const [id, unformattedPoi] = parameters.array || [] if (id === undefined) { spinner.fail(`Missing required argument: 'id'`) @@ -55,22 +51,6 @@ module.exports = { return } - let protocolNetwork: string - if (!network) { - spinner.fail(`Missing required argument: 'network'`) - print.info(HELP) - process.exitCode = 1 - return - } else { - try { - protocolNetwork = validateNetworkIdentifier(network) - } catch (error) { - spinner.fail(`Invalid value for argument 'network': '${network}' `) - process.exitCode = 1 - return - } - } - let poi: string | undefined try { poi = validatePOI(unformattedPoi) @@ -84,7 +64,7 @@ module.exports = { try { const config = loadValidatedConfig() const client = await createIndexerManagementClient({ url: config.api }) - const closeResult = await closeAllocation(client, id, poi, toForce, protocolNetwork) + const closeResult = await closeAllocation(client, id, poi, toForce) spinner.succeed('Allocation closed') printObjectOrArray(print, outputFormat, closeResult, [ diff --git a/packages/indexer-cli/src/commands/indexer/allocations/collect.ts b/packages/indexer-cli/src/commands/indexer/allocations/collect.ts index 4730988d2..781951e66 100644 --- a/packages/indexer-cli/src/commands/indexer/allocations/collect.ts +++ b/packages/indexer-cli/src/commands/indexer/allocations/collect.ts @@ -4,7 +4,6 @@ import chalk from 'chalk' import { loadValidatedConfig } from '../../../config' import { createIndexerManagementClient } from '../../../client' import { submitCollectReceiptsJob } from '../../../allocations' -import { validateNetworkIdentifier } from '@graphprotocol/indexer-common' const HELP = ` ${chalk.bold('graph indexer allocations collect')} [options] @@ -13,9 +12,6 @@ ${chalk.dim('Options:')} -h, --help Show usage information -o, --output table|json|yaml Choose the output format: table (default), JSON, or YAML - -${chalk.dim('Networks:')} - mainnet, arbitrum-one, sepolia or arbitrum sepolia ` module.exports = { @@ -43,7 +39,7 @@ module.exports = { return } - const [network, id] = parameters.array || [] + const [id] = parameters.array || [] if (id === undefined) { spinner.fail(`Missing required argument: 'id'`) @@ -52,27 +48,11 @@ module.exports = { return } - let protocolNetwork: string - if (!network) { - spinner.fail(`Missing required argument: 'network'`) - print.info(HELP) - process.exitCode = 1 - return - } else { - try { - protocolNetwork = validateNetworkIdentifier(network) - } catch (error) { - spinner.fail(`Invalid value for argument 'network': '${network}' `) - process.exitCode = 1 - return - } - } - spinner.text = `Collecting receipts for allocation '${id}` try { const config = loadValidatedConfig() const client = await createIndexerManagementClient({ url: config.api }) - await submitCollectReceiptsJob(client, id, protocolNetwork) + await submitCollectReceiptsJob(client, id) spinner.succeed('Submitted collect receipts job') } catch (error) { diff --git a/packages/indexer-cli/src/commands/indexer/allocations/create.ts b/packages/indexer-cli/src/commands/indexer/allocations/create.ts index 6986bfbe2..a71ac2319 100644 --- a/packages/indexer-cli/src/commands/indexer/allocations/create.ts +++ b/packages/indexer-cli/src/commands/indexer/allocations/create.ts @@ -5,26 +5,19 @@ import { loadValidatedConfig } from '../../../config' import { createIndexerManagementClient } from '../../../client' import { BigNumber } from 'ethers' import { createAllocation } from '../../../allocations' -import { - processIdentifier, - SubgraphIdentifierType, - validateNetworkIdentifier, -} from '@graphprotocol/indexer-common' +import { processIdentifier, SubgraphIdentifierType } from '@graphprotocol/indexer-common' import { printObjectOrArray } from '../../../command-helpers' const HELP = ` ${chalk.bold( 'graph indexer allocations create', -)} [options] +)} [options] ${chalk.dim('Options:')} -h, --help Show usage information -f, --force Bypass POI accuracy checks and submit transaction with provided data -o, --output table|json|yaml Choose the output format: table (default), JSON, or YAML - -${chalk.dim('Networks:')} - mainnet, arbitrum-one, sepolia or arbitrum sepolia ` module.exports = { @@ -62,13 +55,6 @@ module.exports = { ) } - // This nested try block is necessary to complement the parsing error with the 'network' field. - try { - validateNetworkIdentifier(protocolNetwork) - } catch (parsingError) { - throw new Error(`Invalid 'network' provided. ${parsingError}`) - } - const [deploymentString, type] = await processIdentifier(deploymentID, { all: false, global: false, @@ -89,7 +75,6 @@ module.exports = { deploymentString, allocationAmount, indexNode, - protocolNetwork, ) spinner.succeed('Allocation created') diff --git a/packages/indexer-cli/src/commands/indexer/allocations/get.ts b/packages/indexer-cli/src/commands/indexer/allocations/get.ts index 39cb77316..47f41446d 100644 --- a/packages/indexer-cli/src/commands/indexer/allocations/get.ts +++ b/packages/indexer-cli/src/commands/indexer/allocations/get.ts @@ -96,7 +96,6 @@ module.exports = { query allocations($filter: AllocationFilter!) { allocations(filter: $filter) { id - protocolNetwork indexer subgraphDeployment allocatedTokens @@ -141,7 +140,6 @@ module.exports = { let displayProperties: (keyof IndexerAllocation)[] = [ 'id', - 'protocolNetwork', 'indexer', 'subgraphDeployment', 'allocatedTokens', diff --git a/packages/indexer-cli/src/commands/indexer/allocations/reallocate.ts b/packages/indexer-cli/src/commands/indexer/allocations/reallocate.ts index 08abaccc2..25612043c 100644 --- a/packages/indexer-cli/src/commands/indexer/allocations/reallocate.ts +++ b/packages/indexer-cli/src/commands/indexer/allocations/reallocate.ts @@ -8,17 +8,12 @@ import { reallocateAllocation } from '../../../allocations' import { printObjectOrArray, validatePOI } from '../../../command-helpers' const HELP = ` -${chalk.bold( - 'graph indexer allocations reallocate', -)} [options] +${chalk.bold('graph indexer allocations reallocate')} [options] ${chalk.dim('Options:')} -h, --help Show usage information -f, --force Bypass POI accuracy checks and submit transaction with provided data - -${chalk.dim('Networks:')} - mainnet, arbitrum-one, sepolia or arbitrum sepolia ` module.exports = { @@ -48,14 +43,7 @@ module.exports = { } // eslint-disable-next-line prefer-const - let [network, id, amount, poi] = parameters.array || [] - - if (network === undefined) { - spinner.fail(`Missing required argument: 'network'`) - print.info(HELP) - process.exitCode = 1 - return - } + let [id, amount, poi] = parameters.array || [] if (id === undefined) { spinner.fail(`Missing required argument: 'id'`) @@ -84,7 +72,6 @@ module.exports = { poi, allocationAmount, toForce, - network, ) spinner.succeed('Reallocated') From e823e60864cc4fffc4142190dfd1292a86b53a78 Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Mon, 31 Mar 2025 07:40:13 -0700 Subject: [PATCH 4/4] cli: removing protocolNetwork from actions commands output --- packages/indexer-cli/src/actions.ts | 1 - .../src/commands/indexer/actions/approve.ts | 7 +------ .../src/commands/indexer/actions/cancel.ts | 7 ------- .../src/commands/indexer/actions/execute.ts | 7 ------- .../src/commands/indexer/actions/queue.ts | 1 - .../src/commands/indexer/actions/update.ts | 1 - .../src/commands/indexer/allocations/create.ts | 7 +++---- .../__tests__/resolvers/indexing-rules.test.ts | 14 -------------- 8 files changed, 4 insertions(+), 41 deletions(-) diff --git a/packages/indexer-cli/src/actions.ts b/packages/indexer-cli/src/actions.ts index cf670bbed..a011c6db3 100644 --- a/packages/indexer-cli/src/actions.ts +++ b/packages/indexer-cli/src/actions.ts @@ -387,7 +387,6 @@ export async function fetchActions( first: $first ) { id - protocolNetwork type allocationID deploymentID diff --git a/packages/indexer-cli/src/commands/indexer/actions/approve.ts b/packages/indexer-cli/src/commands/indexer/actions/approve.ts index 240a3b239..65e98c5f3 100644 --- a/packages/indexer-cli/src/commands/indexer/actions/approve.ts +++ b/packages/indexer-cli/src/commands/indexer/actions/approve.ts @@ -9,7 +9,7 @@ import { parseOutputFormat, } from '../../../command-helpers' import { approveActions, fetchActions } from '../../../actions' -import { ActionStatus, resolveChainAlias } from '@graphprotocol/indexer-common' +import { ActionStatus } from '@graphprotocol/indexer-common' const HELP = ` ${chalk.bold('graph indexer actions approve')} [options] [ ...] @@ -92,15 +92,10 @@ module.exports = { const queuedAction = await approveActions(client, numericActionIDs) // Format Actions 'protocolNetwork' field to display human-friendly chain aliases instead of CAIP2-IDs - queuedAction.forEach( - action => (action.protocolNetwork = resolveChainAlias(action.protocolNetwork)), - ) - actionSpinner.succeed(`Actions approved`) printObjectOrArray(print, outputFormat, queuedAction, [ 'id', 'type', - 'protocolNetwork', 'deploymentID', 'allocationID', 'amount', diff --git a/packages/indexer-cli/src/commands/indexer/actions/cancel.ts b/packages/indexer-cli/src/commands/indexer/actions/cancel.ts index d5b74701c..4e090fee4 100644 --- a/packages/indexer-cli/src/commands/indexer/actions/cancel.ts +++ b/packages/indexer-cli/src/commands/indexer/actions/cancel.ts @@ -1,6 +1,5 @@ import { GluegunToolbox } from 'gluegun' import chalk from 'chalk' -import { resolveChainAlias } from '@graphprotocol/indexer-common' import { loadValidatedConfig } from '../../../config' import { createIndexerManagementClient } from '../../../client' import { fixParameters, printObjectOrArray } from '../../../command-helpers' @@ -67,14 +66,8 @@ module.exports = { actionSpinner.succeed(`Actions canceled`) - // Format Actions 'protocolNetwork' field to display human-friendly chain aliases instead of CAIP2-IDs - queuedAction.forEach( - action => (action.protocolNetwork = resolveChainAlias(action.protocolNetwork)), - ) - printObjectOrArray(print, outputFormat, queuedAction, [ 'id', - 'protocolNetwork', 'type', 'deploymentID', 'allocationID', diff --git a/packages/indexer-cli/src/commands/indexer/actions/execute.ts b/packages/indexer-cli/src/commands/indexer/actions/execute.ts index a742f21cd..326a7c96f 100644 --- a/packages/indexer-cli/src/commands/indexer/actions/execute.ts +++ b/packages/indexer-cli/src/commands/indexer/actions/execute.ts @@ -1,6 +1,5 @@ import { GluegunToolbox } from 'gluegun' import chalk from 'chalk' -import { resolveChainAlias } from '@graphprotocol/indexer-common' import { loadValidatedConfig } from '../../../config' import { createIndexerManagementClient } from '../../../client' import { fixParameters, printObjectOrArray } from '../../../command-helpers' @@ -60,14 +59,8 @@ module.exports = { spinner.succeed(`Executed approved actions`) - // Format Actions 'protocolNetwork' field to display human-friendly chain aliases instead of CAIP2-IDs - executedActions.forEach( - action => (action.protocolNetwork = resolveChainAlias(action.protocolNetwork)), - ) - printObjectOrArray(print, outputFormat, executedActions, [ 'id', - 'protocolNetwork', 'status', 'type', 'deploymentID', diff --git a/packages/indexer-cli/src/commands/indexer/actions/queue.ts b/packages/indexer-cli/src/commands/indexer/actions/queue.ts index dcdd28aeb..cc0853b06 100644 --- a/packages/indexer-cli/src/commands/indexer/actions/queue.ts +++ b/packages/indexer-cli/src/commands/indexer/actions/queue.ts @@ -95,7 +95,6 @@ module.exports = { printObjectOrArray(print, outputFormat, queuedAction, [ 'id', - 'protocolNetwork', 'type', 'deploymentID', 'allocationID', diff --git a/packages/indexer-cli/src/commands/indexer/actions/update.ts b/packages/indexer-cli/src/commands/indexer/actions/update.ts index f18807156..4beaaaaf2 100644 --- a/packages/indexer-cli/src/commands/indexer/actions/update.ts +++ b/packages/indexer-cli/src/commands/indexer/actions/update.ts @@ -98,7 +98,6 @@ module.exports = { const displayProperties: (keyof Action)[] = [ 'id', 'type', - 'protocolNetwork', 'deploymentID', 'allocationID', 'amount', diff --git a/packages/indexer-cli/src/commands/indexer/allocations/create.ts b/packages/indexer-cli/src/commands/indexer/allocations/create.ts index a71ac2319..d17cb273a 100644 --- a/packages/indexer-cli/src/commands/indexer/allocations/create.ts +++ b/packages/indexer-cli/src/commands/indexer/allocations/create.ts @@ -45,13 +45,13 @@ module.exports = { return } - const [deploymentID, protocolNetwork, amount, indexNode] = parameters.array || [] + const [deploymentID, amount, indexNode] = parameters.array || [] try { - if (!deploymentID || !amount || !protocolNetwork) { + if (!deploymentID || !amount) { throw new Error( 'Must provide a deployment ID, a network identifier and allocation amount' + - `(deploymentID: '${deploymentID}', network: '${protocolNetwork}' allocationAmount: '${amount}')`, + `(deploymentID: '${deploymentID}', allocationAmount: '${amount}')`, ) } @@ -82,7 +82,6 @@ module.exports = { 'allocation', 'deployment', 'allocatedTokens', - 'protocolNetwork', ]) } catch (error) { spinner.fail(error.toString()) diff --git a/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts b/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts index 3117bf4a1..580a4d2cc 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/resolvers/indexing-rules.test.ts @@ -78,7 +78,6 @@ const INDEXING_RULE_QUERY = gql` decisionBasis requireSupported safety - protocolNetwork } } ` @@ -101,7 +100,6 @@ const INDEXING_RULES_QUERY = gql` decisionBasis requireSupported safety - protocolNetwork } } ` @@ -170,7 +168,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.RULES, requireSupported: true, safety: true, - protocolNetwork: 'eip155:421614', } // Update the rule and ensure the right data is returned @@ -207,12 +204,10 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.RULES, requireSupported: true, safety: true, - protocolNetwork: 'arbitrum-sepolia', } const expected = { ...input, - protocolNetwork: 'eip155:421614', } // Update the rule @@ -254,7 +249,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.RULES, requireSupported: true, safety: true, - protocolNetwork: 'eip155:421614', } // Write the original @@ -320,7 +314,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.OFFCHAIN, requireSupported: true, safety: true, - protocolNetwork: 'eip155:421614', } // Write the original @@ -438,7 +431,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.NEVER, requireSupported: true, safety: true, - protocolNetwork: 'eip155:421614', } const deploymentExpected = { @@ -454,7 +446,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.OFFCHAIN, requireSupported: false, safety: true, - protocolNetwork: 'eip155:421614', } deploymentExpected.identifier = 'QmZSJPm74tvhgr8uzhqvyQm2J6YSbUEj4nF6j8WxxUQLsC' @@ -529,7 +520,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.RULES, requireSupported: true, safety: true, - protocolNetwork: 'eip155:421614', } // Write the rule @@ -593,7 +583,6 @@ describe('Indexing rules', () => { minAverageQueryFees: null, custom: null, decisionBasis: IndexingDecisionBasis.RULES, - protocolNetwork: 'eip155:421614', } // Write the rule @@ -676,7 +665,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.NEVER, requireSupported: true, safety: false, - protocolNetwork: 'eip155:421614', } const deploymentExpected = { @@ -692,7 +680,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.OFFCHAIN, requireSupported: false, safety: true, - protocolNetwork: 'eip155:421614', } const deploymentMergedExpected = { @@ -708,7 +695,6 @@ describe('Indexing rules', () => { decisionBasis: IndexingDecisionBasis.OFFCHAIN, requireSupported: false, safety: true, - protocolNetwork: 'eip155:421614', } // Write the orginals