Just breezing through the docs for both crates, I can see that they both provide an implementation of phragmen's election algorithm, where sp_npos_elections
provides an additional PhragMMS
and Balancing
algorithms, which I assume are different ways of electing from a voter snapshot.
In the substrate code base, we can see that for election_provider_multi_phase
config, it takes a Solver
from frame_election_provider_support
. I could only see pallet_election_phragmen
however being used in the pallet_tips
Config.
I am confused why two separate implementations of phragmen election would be provided. If I were to look at this code for the first time my guess would've been that the Solver
type should be define like so type Solver = Elections
where Elections -> pallet_election_phragmen. But apparently that's not the case.
So between frame_election_provider_support
, sp_npos_elections
, and pallet-elections-phragmen
, which is appropriate for what scenario?