Skip to content
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
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
14 changes: 3 additions & 11 deletions packages/indexer-agent/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,17 +924,9 @@ export class Agent {
expiredAllocations,
async (allocation: Allocation) => {
try {
if (allocation.isLegacy) {
const onChainAllocation =
await network.contracts.LegacyStaking.getAllocation(allocation.id)
return onChainAllocation.closedAtEpoch == 0n
} else {
const onChainAllocation =
await network.contracts.SubgraphService.getAllocation(
allocation.id,
)
return onChainAllocation.closedAt == 0n
}
const onChainAllocation =
await network.contracts.SubgraphService.getAllocation(allocation.id)
return onChainAllocation.closedAt == 0n
} catch (err) {
this.logger.warn(
`Failed to cross-check allocation state with contracts; assuming it needs to be closed`,
Expand Down
13 changes: 0 additions & 13 deletions packages/indexer-common/src/allocations/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,6 @@ export const uniqueAllocationID = (
throw new Error(`Exhausted limit of 100 parallel allocations`)
}

export const legacyAllocationIdProof = (
signer: Signer,
indexerAddress: string,
allocationId: string,
): Promise<string> => {
const messageHash = solidityPackedKeccak256(
['address', 'address'],
[indexerAddress, allocationId],
)
const messageHashBytes = getBytes(messageHash)
return signer.signMessage(messageHashBytes)
}

export const EIP712_ALLOCATION_ID_PROOF_TYPES = {
AllocationIdProof: [
{ name: 'indexer', type: 'address' },
Expand Down
Loading
Loading