Add self-hosted SubQuery node with @pezkuwi aliases

- Custom Dockerfile.node that aliases @polkadot/* to @pezkuwi/* packages
- Updated docker-compose.yml to build custom node image
- Added chainTypes/pezkuwi.json with Pezkuwi type definitions
- Updated pezkuwi.yaml manifest with chaintypes reference
- Added @subql/common-substrate dependency

This allows running SubQuery node with Pezkuwi chain recognition
instead of showing "Unknown Network" error.
This commit is contained in:
2026-02-13 02:17:48 +03:00
parent 0b0519bff8
commit 30899df0a4
6 changed files with 104 additions and 10 deletions
+53
View File
@@ -0,0 +1,53 @@
{
"types": {
"DispatchErrorModule": "DispatchErrorModuleU8",
"FullIdentification": "()",
"Keys": "SessionKeys7B",
"Weight": "WeightV1"
},
"typesBundle": {
"spec": {
"pezkuwi": {
"types": [
{
"minmax": [0, 200],
"types": {
"DispatchErrorModule": "DispatchErrorModuleU8",
"FullIdentification": "()",
"Keys": "SessionKeys7B",
"Weight": "WeightV1",
"AccountInfo": "AccountInfoWithDualRefCount",
"Address": "AccountId",
"LookupSource": "AccountId"
}
},
{
"minmax": [201, 214],
"types": {
"DispatchErrorModule": "DispatchErrorModuleU8",
"FullIdentification": "()",
"Keys": "SessionKeys7B",
"Weight": "WeightV1",
"AccountInfo": "AccountInfoWithDualRefCount"
}
},
{
"minmax": [215, 228],
"types": {
"DispatchErrorModule": "DispatchErrorModuleU8",
"FullIdentification": "()",
"Keys": "SessionKeys6",
"Weight": "WeightV1"
}
},
{
"minmax": [229, null],
"types": {
"Weight": "WeightV1"
}
}
]
}
}
}
}
+10 -9
View File
@@ -1,13 +1,12 @@
version: "3" version: "3"
services: services:
postgres: postgres:
container_name: "postgres-${PROJECT_PATH}" container_name: "postgres-pezkuwi"
image: postgres:16-alpine image: postgres:16-alpine
ports: ports:
- 5432:5432 - 5432:5432
volumes: volumes:
- .data/postgres:/var/lib/postgresql/data - .data/postgres:/var/lib/postgresql/data
- ./docker/init:/docker-entrypoint-initdb.d/
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s interval: 5s
@@ -17,8 +16,10 @@ services:
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
subquery-node: subquery-node:
container_name: "node-${PROJECT_PATH}" container_name: "node-pezkuwi"
image: onfinality/subql-node:v5.6.0 build:
context: ./docker
dockerfile: Dockerfile.node
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
@@ -28,16 +29,16 @@ services:
DB_PASS: postgres DB_PASS: postgres
DB_DATABASE: postgres DB_DATABASE: postgres
DB_HOST: postgres DB_HOST: postgres
DB_POST: 5432 DB_PORT: 5432
volumes: volumes:
- ./:/app - ./:/app/project
command: command:
- -f=/app/${PROJECT_PATH} - -f=/app/project/pezkuwi.yaml
- --disable-historical=true - --disable-historical=true
- --batch-size=1 - --batch-size=30
graphql-engine: graphql-engine:
container_name: "query-${PROJECT_PATH}" container_name: "query-pezkuwi"
image: onfinality/subql-query:v1.5.0 image: onfinality/subql-query:v1.5.0
ports: ports:
- 3000:3000 - 3000:3000
+23
View File
@@ -0,0 +1,23 @@
FROM node:20-alpine
WORKDIR /app
# Install @subql/node with @polkadot aliased to @pezkuwi
RUN npm init -y && \
npm install @subql/node \
@polkadot/api@npm:@pezkuwi/api@^16.5.36 \
@polkadot/api-augment@npm:@pezkuwi/api-augment@^16.5.36 \
@polkadot/api-derive@npm:@pezkuwi/api-derive@^16.5.36 \
@polkadot/types@npm:@pezkuwi/types@^16.5.36 \
@polkadot/types-augment@npm:@pezkuwi/types-augment@^16.5.36 \
@polkadot/types-codec@npm:@pezkuwi/types-codec@^16.5.36 \
@polkadot/types-create@npm:@pezkuwi/types-create@^16.5.36 \
@polkadot/types-known@npm:@pezkuwi/types-known@^16.5.36 \
@polkadot/rpc-core@npm:@pezkuwi/rpc-core@^16.5.36 \
@polkadot/rpc-provider@npm:@pezkuwi/rpc-provider@^16.5.36 \
@polkadot/util@npm:@pezkuwi/util@^14.0.25 \
@polkadot/util-crypto@npm:@pezkuwi/util-crypto@^14.0.25 \
@polkadot/keyring@npm:@pezkuwi/keyring@^14.0.25 \
@polkadot/networks@npm:@pezkuwi/networks@^14.0.25
ENTRYPOINT ["/app/node_modules/.bin/subql-node"]
+1
View File
@@ -34,6 +34,7 @@
}, },
"devDependencies": { "devDependencies": {
"@subql/cli": "latest", "@subql/cli": "latest",
"@subql/common-substrate": "^4.5.5",
"@subql/types": "latest", "@subql/types": "latest",
"@types/jest": "^29.5.1", "@types/jest": "^29.5.1",
"jest": "^29.5.0", "jest": "^29.5.0",
+2
View File
@@ -17,6 +17,8 @@ network:
endpoint: endpoint:
- wss://rpc.pezkuwichain.io - wss://rpc.pezkuwichain.io
- wss://mainnet.pezkuwichain.io - wss://mainnet.pezkuwichain.io
chaintypes:
file: ./chainTypes/pezkuwi.json
dataSources: dataSources:
- name: main - name: main
kind: substrate/Runtime kind: substrate/Runtime
+15 -1
View File
@@ -2322,6 +2322,19 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@subql/common-substrate@npm:^4.5.5":
version: 4.5.5
resolution: "@subql/common-substrate@npm:4.5.5"
dependencies:
"@subql/common": "npm:~5.8.2"
"@subql/types": "npm:~3.15.0"
peerDependencies:
class-transformer: ^0.5.1
class-validator: 0.14.1
checksum: 10c0/e2c1e5cb2fc80ce1a7abf3b1540126c541397e4a462dcc9ec6d5a74c991aae5298a18ca1bcf6335ee5e82f56bb1138493c5370c092985a5aa9bc094027eb0b7d
languageName: node
linkType: hard
"@subql/common@npm:~5.8.2": "@subql/common@npm:~5.8.2":
version: 5.8.2 version: 5.8.2
resolution: "@subql/common@npm:5.8.2" resolution: "@subql/common@npm:5.8.2"
@@ -2395,7 +2408,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@subql/types@npm:latest": "@subql/types@npm:latest, @subql/types@npm:~3.15.0":
version: 3.15.0 version: 3.15.0
resolution: "@subql/types@npm:3.15.0" resolution: "@subql/types@npm:3.15.0"
dependencies: dependencies:
@@ -8159,6 +8172,7 @@ __metadata:
"@pezkuwi/util": "npm:^14.0.25" "@pezkuwi/util": "npm:^14.0.25"
"@pezkuwi/util-crypto": "npm:^14.0.25" "@pezkuwi/util-crypto": "npm:^14.0.25"
"@subql/cli": "npm:latest" "@subql/cli": "npm:latest"
"@subql/common-substrate": "npm:^4.5.5"
"@subql/types": "npm:latest" "@subql/types": "npm:latest"
"@types/jest": "npm:^29.5.1" "@types/jest": "npm:^29.5.1"
jest: "npm:^29.5.0" jest: "npm:^29.5.0"