-
Notifications
You must be signed in to change notification settings - Fork 5
Ban operator in FullyBackedSortitionPool #96
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
Added a functionality of operators banning in FullyBackedSortitionPool contract. A pool owner can call a function to ban an operator. Once an operator gets banned it is removed from the pool. The operator won't get selected to new groups. Operator can be banned even if it has never been registered or is not currently registered in the pool. A banned operator cannot join a pool.
We use an modifier that is already defined to check if a function is called by a pool owner. The change results in a revert message change from `Only owner may select groups` to `Caller is not the owner`.
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.
Looks good to me once the tests are sorted out
| await pool.selectSetGroup(3, seed, minimumBondableValue, {from: owner}) | ||
| }) | ||
|
|
||
| it("reverts when operator gets banned in the sortition pool", async () => { |
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.
We could improve the test name a little. We are not failing selection because some operator has been banned and removed from the pool but because of this ban, we no longer have enough unique operators to perform the selection.
Added functionality of operators banning in FullyBackedSortitionPool contract.
A pool owner can call a function to ban an operator. Once an operator gets banned it is removed from the pool. The operator won't get selected to new groups.
An operator can be banned even if it has never been registered or is not currently registered in the pool.
A banned operator cannot join a pool.
Depends on #89
Depends on #97
Refs keep-network/keep-ecdsa#483