neo-project / neo

NEO Smart Economy
MIT License
3.47k stars 1.03k forks source link

[NEO3] Rolling timed system for consensus nodes election. #317

Closed canesin closed 4 years ago

canesin commented 6 years ago

Idea:

Use the Schulze STV ranked voting system or Satisfaction approval voting (SAV) for electing consensus nodes, the ballot on this methods is a simple list of candidates where the user gives the same number votes as in the election quota, recommended here to be 10. Users vote ordering 10 preferred candidates of all the pool (that can be much bigger than 10) or just select 10 nodes they want to vote for. NEO and CoZ wallet could come with ready made suggestions to guarantee the success of bootstrapping in this configuration.

The elections would be rolling, with 10 new nodes elected every 2 months (since the blockchain keeps a clock sync) to a total of 100 nodes elected, after the total 100 nodes are elected the elections continue in normal fashion but instead of adding to the pool the 10 oldest nodes are replaced by the new elected ones - the nodes should be able to register for re-election. This proposal implies 1 NEO = 1 vote, voting should be done with NEO available to be spent at the voter wallet in the ranked case it would be as weight to votes. In the AV case votes would be equally split on the selected candidates.

The candidate registration should cost 1000 NEO (initially) staked in the voting contract, this NEO is to be returned for the candidate after the election round is calculated (first block after 2 months), this would protect from the proliferation of candidates.

Voting should have a PoW cost that results to at least 5s of wait time in high performance servers (memory hard problem preferable) this would protect the network from spam of voting transactions.

Tiebreakers: in the case of ties the resolution order is: 1st - if has already been elected in the past (yes wins). 2nd - oldest candidate registration (older wins). 3rd - alphabetical ordering of public keys (1st wins).

References: Description of the method: https://en.wikipedia.org/wiki/Schulze_STV SAV: https://en.wikipedia.org/wiki/Satisfaction_approval_voting Schulze STV python implementation: https://github.com/canesin/python-vote-core/blob/master/pyvotecore/schulze_stv.py Practical example: https://modernballots.com/

Justification:

Currently implementation of consensus election system is a naive method for selection in multi-seat elections, this setup is of best available on the literature and results in a simple ballot where user experience is simple, familiar and could be readily implemented in wallets with minimal changes from a choice voting.

What it improves upon the current design:

Several aspects of the current implementation are improved, it protects from spam, from the proliferation of candidates and several deficiencies in the voting system.

What are the possible drawbacks and how to mitigate:

It has computational cost to compute (but is non polynomial), to mitigate that this proposal introduces a timed election computation (2 months) so nodes don’t need to compute until 2 months and when checking nodes can readily discard unavailable NEO at wallet address. It also introduces a PoW cost on voting so that the number of wallets voting is controlled.

As discussed in discord both voting methods (STV and AV) are going to be tested in NEONv2 to collect voting data on ranked and non-ranked voting and test several algorithms for counting, this proposal will be updated to reflect that.

canesin commented 4 years ago

@erikzhang I think this can be closed with the new voting on NEO3.