Conversation
| const inflationConfig = (await astar.api.query.inflation.activeInflationConfig()).toJSON() as Record<string, any> | ||
| const noRewardsConfig = { | ||
| ...inflationConfig, | ||
| collatorRewardPerBlock: 0n, | ||
| treasuryRewardPerBlock: 0n, | ||
| dappRewardPoolPerEra: 0n, | ||
| baseStakerRewardPoolPerEra: 0n, | ||
| adjustableStakerRewardPoolPerEra: 0n, | ||
| bonusRewardPoolPerPeriod: 0n, | ||
| } |
There was a problem hiding this comment.
@ipapandinas what's the point of this modification?
There was a problem hiding this comment.
To make snapshots more deterministic. Advancing to the next era emits rewards, which affects total issuance and the tier thresholds. With potential future decayed emissions, this would vary more and make snapshots unpredictable. I am controlling the inputs to isolate and test the tier threshold calculations directly. Another option is to make the assertions more lenient for tier thresholds.
There was a problem hiding this comment.
Ok, I see.
To keep it same as it was before decay, only the decay could be configured to be 1.00 instead.
Personally, I don't prefer this since it is not a scenario you'd expect in the wild, and this is an e2e test. But ok.
This PR adds a minimal test to ensure that staking reward payouts, if any exist, are correctly distributed based on the new decay factor introduced in AstarNetwork/Astar#1536