11 Commits

Author SHA1 Message Date
pezkuwichain 7468da0f75 fix: update AH startBlock to 582592 (within current state window) 2026-04-11 15:02:38 +03:00
pezkuwichain ad4c9c9331 fix: update startBlock to current chain height to avoid pruned state crash
Both AH (56400→579775) and Relay (57100→708687) startBlocks were
pointing to blocks whose state has been pruned by the chain nodes.
This caused a crash loop: SubQuery couldn't index those blocks because
api.query calls returned 'State already discarded' errors.

Root cause: AH node has ~200 block state window (default pruning).
Fix: set startBlock to current tip - 50 blocks (safely within window).
Also added --state-pruning=archive to AH collator azad on VPS3 so
this doesn't recur as SubQuery re-syncs.
2026-04-11 14:58:09 +03:00
pezkuwichain 9259b68a3d Refactor: remove dead relay staking code, add AH reward handlers
- Delete NewEra.ts (all relay staking code was dead)
- Refactor Rewards.ts: remove relay/parachain handlers, add handleAHRewarded/handleAHSlashed for Asset Hub staking rewards
- Add staking::Rewarded and staking::Slashed handlers to pezkuwi-assethub.yaml
- Remove dead cachedStakingRewardEraIndex from Cache.ts
- Clean unused PEZKUWI_RELAY_GENESIS import from PoolRewards.ts
2026-02-21 14:23:58 +03:00
pezkuwichain dcbd38fb5f fix: set startBlock to current chain height
RPC nodes run in pruned mode (~256 blocks state history).
Setting startBlock to recent blocks ensures all required
state is available. Old blocks have no significant user
transactions to index.
2026-02-19 02:33:47 +03:00
pezkuwichain a7d11ce6a2 feat: add APY computation to AH SubQuery, clean relay SubQuery from AH pool logic 2026-02-18 06:00:45 +03:00
pezkuwichain 7b58fa0e4a feat: add AH GraphQL engine + block handler for pool stakers init
- Add handleBlock to query live chain state for existing pool members
- Add second GraphQL engine container for Asset Hub schema (port 3001)
- Register block handler in pezkuwi-assethub.yaml
2026-02-18 04:07:45 +03:00
pezkuwichain 1c79402d5c feat: track nomination pool members as active stakers
Add handlePoolBonded/handlePoolUnbonded handlers to Asset Hub SubQuery.
When a user bonds to a nomination pool, they are saved as an ActiveStaker
with networkId=AssetHub and stakingType=nomination-pool. This fixes the
wallet showing INACTIVE for HEZ stakers.
2026-02-18 03:14:44 +03:00
pezkuwichain eefae7469d Update genesis hashes and startBlock for mainnet relaunch
- Relay chain: 0xbb4a61ab... -> 0x1aa94987...
- Asset Hub: 0x00d0e1d0... -> 0xe7c15092...
- Reset startBlock to 1 for full re-index from genesis
2026-02-15 22:18:07 +03:00
pezkuwichain 433553e4d0 Set Asset Hub startBlock closer to head for pruned RPC 2026-02-14 02:54:47 +03:00
pezkuwichain a4b711f7b4 Update startBlock to recent values for pruned RPC compatibility 2026-02-14 02:47:03 +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