Simple script that runs the phragmen method on the current validator candidates of a locally running substrate chain.
see the internal mod network
for some configurable parameters.
// TODO: clean function interfaces: probably no more passing string.
// TODO: allow it to read data from remote node (there's an issue with JSON-PRC client).
// TODO: read number of candidates and minimum from the chain.
// TODO: allow tweaking some parameters from cli?