From 48fbf1944ab0be337579f14a67b227eb769b9127 Mon Sep 17 00:00:00 2001 From: Christophe Dolivet Date: Fri, 14 Aug 2026 10:58:51 +0200 Subject: [PATCH 1/4] chore: remove deprecated deploy-subgraph workflow Bellecour network has been shut down and we no longer self-host the subgraph, so this manual deployment workflow is no longer needed. --- .github/workflows/deploy-subgraph.yml | 60 --------------------------- 1 file changed, 60 deletions(-) delete mode 100644 .github/workflows/deploy-subgraph.yml diff --git a/.github/workflows/deploy-subgraph.yml b/.github/workflows/deploy-subgraph.yml deleted file mode 100644 index 6b2b706..0000000 --- a/.github/workflows/deploy-subgraph.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Deploy Subgraph - -on: - workflow_dispatch: # Triggered manually but we can also trigger with an release event - inputs: - environment: - description: 'Deployment environment (must match a GitHub Environment name)' - required: true - default: staging - type: choice - options: - - staging - - prod - - tmp - versionLabel: - description: 'Version Label for Subgraph Deployment' - required: true - type: string - -jobs: - build-and-test: - uses: ./.github/workflows/main.yml - with: - node-version: 20 - - deploy: - runs-on: - group: Azure_runners - needs: build-and-test - # Associate the job with a GitHub Environment which has pre-defined variables and secrets. - environment: ${{ github.event.inputs.environment }} - steps: - - name: Checkout - uses: actions/checkout@v5 - - - name: Set up Node.js - uses: actions/setup-node@v5 - with: - node-version: '20' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Deploy Subgraph - env: - NETWORK_NAME: bellecour - VERSION_LABEL: ${{ github.event.inputs.versionLabel }} - GRAPHNODE_URL: ${{ vars.GRAPHNODE_URL }} - IPFS_URL: ${{ vars.IPFS_URL }} - DEPLOY_ENV: ${{ vars.ENV_NAME }} - run: | - echo "Starting deployment with the following parameters:" - echo " Network Name: $NETWORK_NAME" - echo " Version Label: $VERSION_LABEL" - echo " DEPLOY_ENV: $DEPLOY_ENV" - echo " GRAPHNODE_URL: $GRAPHNODE_URL" - echo " IPFS_URL: $IPFS_URL" - npm run all - shell: bash From b5159da2e1fbcb7bc98c6cc24e1a56893f799ba6 Mon Sep 17 00:00:00 2001 From: Le-Caignec Date: Fri, 14 Aug 2026 12:23:08 +0200 Subject: [PATCH 2/4] chore: update Docker workflows and environment configurations --- .github/workflows/docker-push.yml | 2 ++ .github/workflows/docker-test.yml | 5 ++++- .github/workflows/main.yml | 3 +++ .../reusable-subgraph-deployer-docker.yml | 10 +++++++++- config/env.ts | 2 +- package.json | 2 +- test-stack/docker-compose.yml | 4 ++-- test-stack/prepare-test-env.ts | 20 +++++++++++-------- tests/e2e/integration.test.ts | 2 ++ 9 files changed, 36 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml index b4bd7e3..eb8a34b 100644 --- a/.github/workflows/docker-push.yml +++ b/.github/workflows/docker-push.yml @@ -35,3 +35,5 @@ jobs: secrets: docker-username: ${{ secrets.DOCKERHUB_USERNAME }} docker-password: ${{ secrets.DOCKERHUB_PAT }} + dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN_PULL_ONLY }} diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 8ad38fd..e2b9b80 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -4,9 +4,12 @@ on: [pull_request] jobs: build-test: - uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v2.3.1 + uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v3.5.1 with: image-name: 'iexechub/poco-subgraph-deployer' image-tag: ${{ github.sha }} push: false security-scan: true + secrets: + dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN_PULL_ONLY }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e61442..a7ef6cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,3 +50,6 @@ jobs: uses: ./.github/workflows/reusable-subgraph-deployer-docker.yml with: dry-run: true + secrets: + dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN_PULL_ONLY }} diff --git a/.github/workflows/reusable-subgraph-deployer-docker.yml b/.github/workflows/reusable-subgraph-deployer-docker.yml index 283c0d6..56a2f14 100644 --- a/.github/workflows/reusable-subgraph-deployer-docker.yml +++ b/.github/workflows/reusable-subgraph-deployer-docker.yml @@ -18,10 +18,16 @@ on: docker-password: description: 'Docker registry password or PAT (required unless `dry-run: true`)' required: false + dockerhub-username: + description: 'Docker Hub username used to pull base images (avoids rate limiting)' + required: true + dockerhub-password: + description: 'Docker Hub pull-only token' + required: true jobs: docker-publish: - uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v2.3.1 + uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v3.5.1 with: image-name: 'iexechub/poco-subgraph-deployer' security-scan: false @@ -31,3 +37,5 @@ jobs: secrets: username: ${{ secrets.docker-username }} password: ${{ secrets.docker-password }} + dockerhub-username: ${{ secrets.dockerhub-username }} + dockerhub-password: ${{ secrets.dockerhub-password }} diff --git a/config/env.ts b/config/env.ts index 0c8a5cb..0d036e3 100644 --- a/config/env.ts +++ b/config/env.ts @@ -9,7 +9,7 @@ const envSchema = z.object({ message: 'DEPLOY_ENV must be one of: tmp, staging, or empty', }), - NETWORK_NAME: z.string().min(1, 'NETWORK_NAME is required').default('bellecour'), + NETWORK_NAME: z.string().min(1, 'NETWORK_NAME is required').default('arbitrum-sepolia'), GRAPHNODE_URL: z .string() diff --git a/package.json b/package.json index 00817dd..34d556a 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "update-networks": "node update-networks.js", "all": "npm run update-networks && npm run build && npm run create && npm run deploy", "stop-test-stack": "cd test-stack && docker compose down --remove-orphans --volumes", - "start-test-stack": "npm run stop-test-stack && cd test-stack && export NETWORK_NAME=${NETWORK_NAME:-bellecour} && tsx prepare-test-env.ts && docker compose build && docker compose up -d", + "start-test-stack": "npm run stop-test-stack && cd test-stack && export NETWORK_NAME=${NETWORK_NAME:-arbitrum-sepolia} && tsx prepare-test-env.ts && docker compose build && docker compose up -d", "check-format": "prettier \"(src|tests|test-stack)/**/*.{js,ts}\" --check", "format": "prettier \"(src|tests|test-stack)/**/*.{js,ts}\" --write" }, diff --git a/test-stack/docker-compose.yml b/test-stack/docker-compose.yml index 4055509..084fc29 100644 --- a/test-stack/docker-compose.yml +++ b/test-stack/docker-compose.yml @@ -3,7 +3,7 @@ services: restart: "no" image: ghcr.io/foundry-rs/foundry:v1.0.0 entrypoint: anvil - command: "--host 0.0.0.0 --port 8545 --hardfork berlin --fork-url $FORK_URL --fork-block-number $FORK_BLOCK --chain-id 134 --gas-limit 6700000 --gas-price 0" + command: "--host 0.0.0.0 --port 8545 --block-time 1 --fork-url $FORK_URL --fork-block-number $FORK_BLOCK" expose: - 8545 ports: @@ -68,7 +68,7 @@ services: postgres_db: graphnode-db ipfs: ipfs:5001 ethereum: ${NETWORK_NAME}:http://blockchain-fork:8545 - GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER: $FORK_BLOCK + GRAPH_ETHEREUM_GENESIS_BLOCK_NUMBER: $GENESIS_BLOCK depends_on: blockchain-fork: condition: service_healthy diff --git a/test-stack/prepare-test-env.ts b/test-stack/prepare-test-env.ts index db57d21..05ca43d 100644 --- a/test-stack/prepare-test-env.ts +++ b/test-stack/prepare-test-env.ts @@ -7,7 +7,7 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); -const forkUrl = process.env.FORK_URL || 'https://bellecour.iex.ec'; +const forkUrl = process.env.FORK_URL || 'https://sepolia-rollup.arbitrum.io/rpc'; const networkName = process.env.NETWORK_NAME; // Get the network name from env // Path to the networks.json file (one directory up) @@ -42,15 +42,18 @@ async function createEnvFiles(forkBlockNumber: number) { '# blockchain node to use as the reference for the local fork\n' + `FORK_URL=${forkUrl}\n` + '# block number to fork from\n' + - `FORK_BLOCK=${forkBlockNumber}\n`, + `FORK_BLOCK=${forkBlockNumber}\n` + + '# first block indexed by graph-node (the fork block itself is a real network\n' + + '# block whose non-standard transaction receipts cannot be served by anvil)\n' + + `GENESIS_BLOCK=${forkBlockNumber + 1}\n`, ); } /** - * Update networks.json file with the current block number - * @param {number} forkBlockNumber - The block number to fork from + * Update networks.json file with the first block to index + * @param {number} startBlockNumber - The block number to start indexing from */ -async function updateNetworksFile(forkBlockNumber: number) { +async function updateNetworksFile(startBlockNumber: number) { if (!networkName) { console.warn( 'No NETWORK_NAME environment variable provided. The networks.json file will not be updated.', @@ -71,11 +74,11 @@ async function updateNetworksFile(forkBlockNumber: number) { // Check if the specified network exists in the file if (networksData[networkName]) { - console.log(`Updating startBlock for network '${networkName}' to ${forkBlockNumber}`); + console.log(`Updating startBlock for network '${networkName}' to ${startBlockNumber}`); // Update all startBlock values for the specified network Object.keys(networksData[networkName]).forEach((contract) => { - networksData[networkName][contract].startBlock = forkBlockNumber; + networksData[networkName][contract].startBlock = startBlockNumber; }); // Write the updated networks.json file @@ -96,7 +99,8 @@ async function main() { try { const forkBlockNumber = await getCurrentBlockNumber(); await createEnvFiles(forkBlockNumber); - await updateNetworksFile(forkBlockNumber); + // Index from the first block produced by the local fork + await updateNetworksFile(forkBlockNumber + 1); } catch (error) { console.error(`Error in main process: ${error}`); process.exit(1); diff --git a/tests/e2e/integration.test.ts b/tests/e2e/integration.test.ts index 83608eb..bccbd04 100644 --- a/tests/e2e/integration.test.ts +++ b/tests/e2e/integration.test.ts @@ -18,6 +18,8 @@ describe('Integration tests', () => { it('should index a newly created app', async () => { const provider = new JsonRpcProvider(`http://localhost:8545`); const wallet = Wallet.createRandom(provider); + // Fund the random wallet with fork native tokens to pay transaction fees + await provider.send('anvil_setBalance', [wallet.address, '0x21e19e0c9bab2400000']); const iexecProxy = IexecInterfaceToken__factory.connect(iexecProxyAddress, wallet); const appRegistryAddress = await iexecProxy.appregistry(); From 711ca3abb597556664444829c961e66c1810a0d1 Mon Sep 17 00:00:00 2001 From: Le-Caignec Date: Fri, 14 Aug 2026 12:29:46 +0200 Subject: [PATCH 3/4] chore: update README and configuration for local test-stack subgraph --- GraphQL Voyager/README.MD | 2 +- GraphQL Voyager/index.html | 2 +- README.md | 5 ++--- networks.json | 20 +------------------- package.json | 6 +++--- src/Modules/IexecPoco.ts | 10 +--------- 6 files changed, 9 insertions(+), 36 deletions(-) diff --git a/GraphQL Voyager/README.MD b/GraphQL Voyager/README.MD index ff4cf8d..7fdf3c0 100644 --- a/GraphQL Voyager/README.MD +++ b/GraphQL Voyager/README.MD @@ -2,4 +2,4 @@ [GraphQL Voyager](https://github.com/APIs-guru/graphql-voyager) Represent any GraphQL API as an interactive graph. It's time to finally see the graph behind GraphQL. -This GraphQL Voyager is based on bellecour subgraph introspection. +This GraphQL Voyager is based on the local test-stack subgraph introspection (run `npm run start-test-stack` first, or point `index.html` to any deployed PoCo subgraph endpoint). diff --git a/GraphQL Voyager/index.html b/GraphQL Voyager/index.html index dfed623..ea366aa 100644 --- a/GraphQL Voyager/index.html +++ b/GraphQL Voyager/index.html @@ -15,7 +15,7 @@