Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@kianenigma
Copy link
Contributor

@kianenigma kianenigma commented Mar 21, 2019

Treats some leftover review from #1915.

  • Adds an automatic self-vote to each validator. This is an entirely artificial edge in Phragmen and will be removed at the end of the algorithm (meaning that it is NOT counted when slashing/rewarding).
  • Improves the performance by removing a layer of iteration in every inner loop of the main algorithm (--at the expense of storing two sets of indexes in each Edge). This basically makes the complexity of this implementation exactly the same when compared to the reference implementation.
  • Adds the Phragmen equalise() post-processing, the parameters of which are currently configured statically in the code and NOT via a storage item (I think it will be constant --should refactor to a storage item if not).
  • Some other minor fixes.
  • Few more tests to verify the above.

Things that I am not satisfied with

  • How to react to potential overflows.
  • Maybe storing the direct reference of a Candidate in Edge is better, given that it will probably create a mess of lifetime.

@kianenigma kianenigma added the A3-in_progress Pull request is in progress. No review needed at this stage. label Mar 21, 2019
@parity-cla-bot
Copy link

It looks like @kianenigma signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

1 similar comment
@parity-cla-bot
Copy link

It looks like @kianenigma signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@kianenigma kianenigma closed this Mar 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A3-in_progress Pull request is in progress. No review needed at this stage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants