Documentation
¶
Overview ¶
Package delegate_rewards is a TypeWorker plugin that maintains the per-candidate cumulative rewards rollup table `delegate_rewards`. It replaces the legacy iotex-analytics sync_delegate_rewards() proc that was dropped during the migration to iotex-analyser, and unbreaks iotex-kit's getDelegateRewards() (hub "All Time" rewards view).
Each tick re-aggregates hermes_account_rewards (block/epoch/foundation) and staking_actions burn-drop DepositToStake into a single INSERT ... ON CONFLICT UPDATE keyed by candidate address. Because the query is idempotent, missed ticks are self-healing; a daily cadence is enough for the "All Time" use case.
Click to show internal directories.
Click to hide internal directories.