-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: reregistration delay #246
Conversation
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.
I believe there's a ~medium-severity issue here -- see my comment.
I would definitely like to resolve this discussion before merging.
if( | ||
operatorInfo.status == OperatorStatus.REGISTERED && | ||
!quorumsToRemove.isEmpty() && | ||
quorumsToRemove.isSubsetOf(currentBitmap) | ||
){ |
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.
so there's still some weird race condition where an operator can deregister from a subset of quorums to avoid being ejected for more, right?
I guess I can accept that, but it would certainly be nice to resolve if there's an easy solution.
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.
perhaps we can just take the submitted 'quorumNumbers' and actually pass on a combination ('and'ing) of them with the operator's current quorums in the subsequent call?
I could see merging this now. Am pushing a bit on fixing the remaining race condition here, at least if it's easy enough, because it would be a nice improvement. |
* @dev The owner can eject operators without recording of stake ejection | ||
*/ | ||
function ejectOperators(bytes32[][] memory _operatorIds) external returns (uint32[] memory){ | ||
function ejectOperators(bytes32[][] memory _operatorIds) external { |
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.
wdyt about refactoring the ejection logic
- That doesn't enforce the rate limit that is callable by the owner
- That is callable by the ejector and enforces the rate limit
This should clean up some of the branchy conditionals in this function
Adds a delay for registration to any quorum after an operator has been ejected