10 Commits

Author SHA1 Message Date
pezkuwichain 6b188858db fix: prevent crash loop on pruned state — patch getExtrinsicSuccess and events.toArray
When SubQuery restarts and hits pruned blocks, events are empty (from patch 4).
This caused two downstream crashes:
- getExtrinsicSuccess(undefined) → TypeError on findIndex
- wrapBlock with events.toArray() → TypeError on undefined

Patches 5-6 handle undefined events gracefully.
2026-03-10 00:40:45 +03:00
pezkuwichain 45784e1196 fix: handle pruned state in event fetch to prevent crash loops
When SubQuery restarts and the last processed block's state has been
pruned by the RPC node, fetchEventsRange would crash the indexer in a
loop. Now returns empty events for pruned blocks so the indexer can
skip forward gracefully.
2026-02-21 17:30:34 +03:00
pezkuwichain 0130c5984a fix: also patch @polkadot/api Init.js for pruned state
The _getBlockRegistryViaHash method in @polkadot/api calls
getRuntimeVersion.raw(header.parentHash) which fails for genesis
and other pruned blocks. Add fallback to current runtime version.
2026-02-19 02:28:40 +03:00
pezkuwichain d270504c9a fix: handle pruned RPC state in SubQuery node
Substrate nodes prune historical state by default (~256 blocks).
When SubQuery restarts and tries to fetch runtime version for old
blocks, it crashes with "State already discarded". This patch adds
a fallback to current runtime version when historical state is
unavailable, preventing crash loops on pruned RPC endpoints.

Also removes --pull from deploy workflow to avoid unnecessary
full rebuilds on every push.
2026-02-19 02:22:52 +03:00
pezkuwichain a8b7d16b97 Patch api-augment exports map instead of filesystem shim
Node.js checks package.json exports before filesystem, so the
mkdir+echo shim didn't work. Now patches the exports map with
node -e to add ./substrate pointing to pezkuwi augmentation.
2026-02-14 04:33:32 +03:00
pezkuwichain 01ec544b84 Add rpc-augment alias and substrate shim to Dockerfile.node
- Add missing @polkadot/rpc-augment alias to @pezkuwi/rpc-augment
- Create substrate shim for @polkadot/api-augment/substrate that
  re-exports @pezkuwi/api-augment's pezkuwi augmentation, fixing
  ERR_PACKAGE_PATH_NOT_EXPORTED when @subql/node requires it
2026-02-14 04:27:04 +03:00
pezkuwichain a18cb0019e Fix wasm-crypto package versions (7.5.x) 2026-02-13 02:28:15 +03:00
pezkuwichain dcf901660a Add wasm-crypto packages to SubQuery node aliases 2026-02-13 02:27:09 +03:00
pezkuwichain 30899df0a4 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.
2026-02-13 02:17:48 +03:00
pezkuwichain 0812cf9e7a Initial commit: Pezkuwi SubQuery indexer
- pezkuwi.yaml: Relay chain staking indexer (rewards, slashes, pools, transfers, era info)
- pezkuwi-assethub.yaml: Asset Hub indexer (NominationPools, asset transfers)
- GraphQL schema for staking data entities
- Handler mappings from Nova SubQuery base
2026-02-12 23:55:13 +03:00