-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Document, clean and stabilise phragmen's behavior with dupe candiadtes and voters. #4593
Comments
@kianenigma lets do this together this week |
More precisely:
|
I have found a bug related to this: using offline-phragmen, I realized that this assertion in the reduce code is failing, only in polkadot at the moment:
Which means: Someone submitted a duplicate vote, and it somehow made its way into the reduce code. After tweaking the error message, I find this dude: Surprising is that it seems like seq-phragmen elected both of the duplicate edges. This should have not happened, and needs investigating. |
More evidence:
|
As an additional part of this, Both staking and elections-phragmen should ensure that the votes submitted by the voter are all unique, rather than relying on the underlying election crate to filter it out for them. |
One random note unrelated to this PR per se: this pallet had quite a bad rap for not having a well defined behaviour with duplicate votes and candidates and targets etc. Now, finally, everything that goes through Originally posted by @kianenigma in #8236 (comment) |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
Both staking and elections should not allow duplicate candidates, but still, it happened #4592. A simple fix should make sure that phragmen is internally also dealing with this, in the proper way. Currently, out of luck, the dupes are being ignored, but it should be done in a more mature manner.
The text was updated successfully, but these errors were encountered: