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`.
eth-r
previously approved these changes
Oct 13, 2020
eth-r
previously approved these changes
Oct 13, 2020
pdyraga
approved these changes
Oct 27, 2020
| await pool.selectSetGroup(3, seed, minimumBondableValue, {from: owner}) | ||
| }) | ||
|
|
||
| it("reverts when operator gets banned in the sortition pool", async () => { |
Member
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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