Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1dc1a93
refactor: remove legacy allocation support
dwerner Dec 11, 2025
210bd13
ci: update actions/checkout and actions/setup-node to v4
dwerner Dec 11, 2025
9c93070
ci: update CodeQL actions to v3
dwerner Dec 11, 2025
c1891fc
ci: update Docker workflow actions to latest versions
dwerner Dec 11, 2025
295440a
ci: upgrade to Node.js 24
dwerner Dec 11, 2025
272d624
trying to fix some tests
dwerner Dec 11, 2025
45f1875
trying to fix some tests 2
dwerner Dec 11, 2025
f769ac8
style: apply prettier formatting
dwerner Dec 11, 2025
69ed65c
fix(cli): remove non-existent 'cost set variables' from test references
dwerner Dec 11, 2025
c6f3ce1
fix(cli): restore test references from main
dwerner Dec 11, 2025
0708c54
common: add helper utilities for single-network resolvers
dwerner Dec 11, 2025
574cd4f
common: make protocolNetwork optional in GraphQL resolvers
dwerner Dec 11, 2025
6db93ac
common: refactor ActionManager and RulesManager for single network
dwerner Dec 11, 2025
dd1506a
common: update IndexerManagementClient for single network
dwerner Dec 11, 2025
7f3bd56
cli: make protocolNetwork optional in CLI commands
dwerner Dec 11, 2025
43682d0
agent: refactor Agent class for single network operation
dwerner Dec 11, 2025
a351de6
tests: update test utilities for single network
dwerner Dec 11, 2025
1991f95
common: remove MultiNetworks class and NetworkMapped type
dwerner Dec 11, 2025
d8844cd
chore: update .gitignore
dwerner Dec 11, 2025
2a1e557
ci: upgrade to Node.js 24
dwerner Dec 11, 2025
6e97989
test: update CLI references to remove cost set variables command
dwerner Dec 11, 2025
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
8 changes: 4 additions & 4 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js v20
uses: actions/setup-node@v2.1.5
uses: actions/checkout@v4
- name: Set up Node.js v24
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: Build and Format
run: yarn
- name: Check Formatting
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
node-version: [20, 22]
node-version: [22, 24]
system:
- os: ubuntu-22.04
runs-on: ${{ matrix.system.os }}
Expand All @@ -32,13 +32,13 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: update OS
run: |
sudo apt-get update
sudo apt install -y --no-install-recommends gcc g++ make build-essential
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
25 changes: 14 additions & 11 deletions .github/workflows/indexer-agent-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,37 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
uses: docker/metadata-action@v5
with:
images: ghcr.io/graphprotocol/indexer-agent
tag-sha: true
tags: |
type=sha
type=ref,event=branch
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up Node.js v20
uses: actions/setup-node@v2.1.5
- name: Set up Node.js v24
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: Build and push Indexer Agent image
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.indexer-agent
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/indexer-cli-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,37 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
uses: docker/metadata-action@v5
with:
images: ghcr.io/graphprotocol/indexer-cli
tag-sha: true
tags: |
type=sha
type=ref,event=branch
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up Node.js v20
uses: actions/setup-node@v2.1.5
- name: Set up Node.js v24
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24
- name: Build and push Indexer CLI image
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.indexer-cli
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ tap-contracts.json
config/config.yaml

commit-changes.sh
**/.claude
44 changes: 1 addition & 43 deletions packages/indexer-agent/src/__tests__/agent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
convertSubgraphBasedRulesToDeploymentBased,
consolidateAllocationDecisions,
} from '../agent'
import { convertSubgraphBasedRulesToDeploymentBased } from '../agent'
import {
INDEXING_RULE_GLOBAL,
IndexingDecisionBasis,
Expand Down Expand Up @@ -169,42 +166,3 @@ describe('Agent convenience function tests', () => {
).toEqual(inputRules)
})
})

describe('consolidateAllocationDecisions function', () => {
it('produces a set with unique deployment ids', () => {
const a = new SubgraphDeploymentID(
'QmXZiV6S13ha6QXq4dmaM3TB4CHcDxBMvGexSNu9Kc28EH',
)
const b = new SubgraphDeploymentID(
'QmRKs2ZfuwvmZA3QAWmCqrGUjV9pxtBUDP3wuc6iVGnjA2',
)
const c = new SubgraphDeploymentID(
'QmULAfA3eS5yojxeSR2KmbyuiwCGYPjymsFcpa6uYsu6CJ',
)

const allocationDecisions = {
'eip155:0': [
{ deployment: a, toAllocate: false },
{ deployment: b, toAllocate: true },
],
'eip155:1': [
{ deployment: b, toAllocate: true },
{ deployment: c, toAllocate: false },
],
'eip155:2': [
{ deployment: c, toAllocate: true },
{ deployment: a, toAllocate: false },
],
}

const expected = new Set([c, b])

const result = consolidateAllocationDecisions(allocationDecisions)

expect(result).toStrictEqual(expected)
expect(result).toHaveProperty('size', 2)
expect(result).toContain(c)
expect(result).toContain(b)
expect(result).not.toContain(a)
})
})
8 changes: 1 addition & 7 deletions packages/indexer-agent/src/__tests__/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
specification,
QueryFeeModels,
defineQueryFeeModels,
MultiNetworks,
loadTestYamlConfig,
} from '@graphprotocol/indexer-common'
import { Sequelize } from 'sequelize'
Expand Down Expand Up @@ -153,11 +152,6 @@ const setup = async () => {
metrics,
)

const multiNetworks = new MultiNetworks(
[network],
(n: Network) => n.specification.networkIdentifier,
)

indexerManagementClient = await createIndexerManagementClient({
models,
graphNode,
Expand All @@ -168,7 +162,7 @@ const setup = async () => {
parallelAllocations: 1,
},
},
multiNetworks,
network,
})

operator = new Operator(logger, indexerManagementClient, networkSpecification)
Expand Down
Loading
Loading