Currently, the election-provider-multi-phase pallet has a very very strict check that any solution must be of a certain size to pass the feasibility check.
This is not needed. In staking, we actually two values:
Validators: akin to
We need to change the
fn desired_targets API to actually return two numbers, analogous to the two values above.
MinimumValidators is not reached, we raise an error. More than
Validators is also not allowed. The range between
[MinimumValidators, Validators] is allowed, where we prefer the larger solutions.
I think we don't need to actually encode
where we prefer the larger solutions.
In any way. A solution that has more validators probably also higher
ElectionScore by nature. Else, we can explicitly sort/compare based on the number of winners first, then