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.
Staking pallet (index 9), FastUnstake (15), and VoterBagsList (100)
were removed from the relay chain. The relay indexer now only tracks
transfers and signed extrinsics. Added safety try-catch to staking
queries in case handlers are accidentally re-enabled.
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.
The event-based StakersElected handler had a bug where paged exposure
data wasn't properly extracted. Add handleRelayBlock that queries
erasStakersPaged directly from live chain state on first block to
ensure all validators and nominators are captured.