-
Notifications
You must be signed in to change notification settings - Fork 0
systemcontract: apply blacklist policy to governance election #242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
With this policy check, the total gas cost of |
I think we'd better increase the syscall GAS limit. |
30499bf to
e753b75
Compare
|
@AnnaShaleva OK, now I have a good new idea to apply blacklist. |
e753b75 to
a88db31
Compare
a88db31 to
448d885
Compare
d56de4b to
6819c4c
Compare
6819c4c to
080c45a
Compare
AnnaShaleva
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
| if (receivedVotes[candidate] > 0) { | ||
| totalVotes += receivedVotes[candidate]; | ||
| } | ||
| emit Activate(candidate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And just a minor note: if now we use a single notification for both usual registration and activation, then probably "Registered" is more preferable than "Activate"? Because in 99% cases it's a usual candidate registration, so users may be confused by receiving "Activate" notification rather than "Registered".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine, IMO.
| function deactivateCandidate(address candidate) external { | ||
| if (msg.sender != POLICY) revert Errors.SideCallNotAllowed(); | ||
| if (_deactivateCandidate(candidate)) blacklistedCandidates += 1; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And a final note regarding blocked accounts: suppose candidate is in the list and is currently a CN. Once committee blocks this account, then this candidate won't be kicked off from the CN list immediately, instead it will remain there until the next epoch. We have a similar bug in NeoGo (nspcc-dev/neo-go#3449), and C# node handles this situation properly.
We may create an issue to handle that in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ref. #248.
Close #239. Testing with 2000
candidateLimit...