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

release v0.22.0 #1076

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/networks/arbitrum-sepolia.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.21.11](https://github.com/graphprotocol/indexer/releases/tag/v0.21.11) |
| indexer-cli | [0.21.11](https://github.com/graphprotocol/indexer/releases/tag/v0.21.11) |
| indexer-agent | [0.22.0](https://github.com/graphprotocol/indexer/releases/tag/v0.22.0) |
| indexer-cli | [0.22.0](https://github.com/graphprotocol/indexer/releases/tag/v0.22.0) |
| 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) |
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "0.21.11"
"version": "0.22.0"
}
4 changes: 2 additions & 2 deletions packages/indexer-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/indexer-agent",
"version": "0.21.11",
"version": "0.22.0",
"description": "Indexer agent",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@graphprotocol/common-ts": "2.0.11",
"@graphprotocol/indexer-common": "^0.21.11",
"@graphprotocol/indexer-common": "^0.22.0",
"@thi.ng/heaps": "^1.3.1",
"axios": "0.26.1",
"bs58": "5.0.0",
Expand Down
40 changes: 15 additions & 25 deletions packages/indexer-agent/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,33 +329,24 @@ export class Agent {
sequentialTimerMap(
{ logger, milliseconds: requestIntervalLarge },
async () => {
const deployments = await this.multiNetworks.map(
async ({ network }) => {
if (
this.deploymentManagement === DeploymentManagementMode.AUTO ||
network.networkMonitor.poiDisputeMonitoringEnabled()
) {
logger.trace('Fetching active deployments')
const assignments =
await this.graphNode.subgraphDeploymentsAssignments(
SubgraphStatus.ACTIVE,
)
return assignments.map(assignment => assignment.id)
} else {
logger.info(
"Skipping fetching active deployments fetch since DeploymentManagementMode = 'manual' and POI tracking is disabled",
)
return []
}
},
)
return deployments.values
if (this.deploymentManagement === DeploymentManagementMode.AUTO) {
logger.debug('Fetching active deployments')
const assignments =
await this.graphNode.subgraphDeploymentsAssignments(
SubgraphStatus.ACTIVE,
)
return assignments.map(assignment => assignment.id)
} else {
logger.info(
"Skipping fetching active deployments fetch since DeploymentManagementMode = 'manual' and POI tracking is disabled",
)
return []
}
},
{
onError: error =>
logger.warn(
`Failed to obtain active deployments, trying again later`,
{ error },
`Failed to obtain active deployments, trying again later ${error}`,
),
},
)
Expand Down Expand Up @@ -576,8 +567,7 @@ export class Agent {
{
onError: error =>
logger.warn(
`Failed to obtain target deployments, trying again later`,
{ error },
`Failed to obtain target deployments, trying again later ${error}`,
),
},
)
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-agent/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { AgentConfigs } from '../types'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type AgentOptions = { [key: string]: any } & Argv['argv']

const DEFAULT_SUBGRAPH_MAX_BLOCK_DISTANCE = 0
const DEFAULT_SUBGRAPH_MAX_BLOCK_DISTANCE = 1000
const SUGGESTED_SUBGRAPH_MAX_BLOCK_DISTANCE_ON_L2 =
50 + DEFAULT_SUBGRAPH_MAX_BLOCK_DISTANCE
const DEFAULT_SUBGRAPH_FRESHNESS_SLEEP_MILLISECONDS = 5_000
Expand Down
4 changes: 2 additions & 2 deletions packages/indexer-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/indexer-cli",
"version": "0.21.11",
"version": "0.22.0",
"description": "Indexer CLI for The Graph Network",
"main": "./dist/cli.js",
"files": [
Expand All @@ -27,7 +27,7 @@
},
"dependencies": {
"@graphprotocol/common-ts": "2.0.11",
"@graphprotocol/indexer-common": "^0.21.11",
"@graphprotocol/indexer-common": "^0.22.0",
"@iarna/toml": "2.2.5",
"@thi.ng/iterators": "5.1.74",
"@urql/core": "3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-cli/src/commands/indexer/actions/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ${chalk.bold(

${chalk.dim('Options:')}

-h, --help Show usage informatio
-h, --help Show usage information
-n, --network <STRING> [Required] The protocol network for this action (mainnet, arbitrum-one, sepolia, arbitrum-sepolia)
-o, --output table|json|yaml Choose the output format: table (default), JSON, or YAML
-s, --source <STRING> Specify the source of the action decision
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@graphprotocol/indexer-common",
"version": "0.21.11",
"version": "0.22.0",
"description": "Common library for Graph Protocol indexer components",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion packages/indexer-common/src/indexer-management/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ export class ActionManager {
try {
this.executeBatchActionsPromise = this.executeApprovedActionsInner(network)
updatedActions = await this.executeBatchActionsPromise
} catch (error) {
this.logger.error(`Failed to execute batch of approved actions -> ${error}`)
} finally {
this.executeBatchActionsPromise = undefined
}
Expand Down Expand Up @@ -340,7 +342,7 @@ export class ActionManager {
}
// mark all approved actions as PENDING, this serves as a lock on other processing of them
await this.markActions(approvedActions, transaction, ActionStatus.PENDING)
return prioritizedActions
return approvedActions
},
)

Expand Down
4 changes: 2 additions & 2 deletions packages/indexer-common/src/sequential-timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function sequentialTimerReduce<T, U>(
}
}
// initial call
setTimeout(work, milliseconds)
work()
return output
}

Expand Down Expand Up @@ -152,6 +152,6 @@ export function sequentialTimerMap<U>(
}

// initial call
setTimeout(work, milliseconds)
work()
return output
}
Loading