Open nampc1 opened 5 months ago
Use activeEra instead of currentEra for fetching last-14-eras points. Because when currentEra jumps to a new era, activeEra is still in the previous era, and the era point is still distributed.
@bluezdot please describe the Validator selection algorithm
@Sokol142196 The algorithm to select the top 50% validator is in the following step:
n
, I fetch all validators's point information from era n-14
to era n-1
(14 eras in total).validator_address: total_point
.Above is the algorithm from background logic. The remaining algorithm to select 16 validators is implemented by @lw-cdm.
Validation passed. Check with Polkadot: Top 50% validator
Needs discussion and improvement in case there is already a stake
We should implement an algorithm to automatically select the best validators for user staking directly through nomination