Skip to content
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

chore: repo cleanup #139

Merged
merged 5 commits into from
Jan 11, 2024
Merged

chore: repo cleanup #139

merged 5 commits into from
Jan 11, 2024

Conversation

@wadealexc wadealexc changed the title chore: unify StakeRegistry state variable typing, and split RegistryC… chore: repo cleanup Jan 11, 2024
@wadealexc wadealexc marked this pull request as ready for review January 11, 2024 18:02
Comment on lines 119 to 120
* @notice Registers msg.sender as an operator for one or more quorums. If any quorum excees its maximum
* operator capacity after the operator is registered, this method will fail.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: excees => exceeds

* they are deregistered.
* @notice Updates the StakeRegistry's view of one or more operators' stakes. If any operator
* is found to be below the minimum stake for the quorum, they are deregistered.
* @dev stakes are queryed from the Eigenlayer core DelegationManager contract
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quark-sized nit but I believe it should be queried instead of queryed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment on updateOperatorsForQuorum 😅

* @dev stakes are queryed from the Eigenlayer core DelegationManager contract
* @param operatorsPerQuorum for each quorum in `quorumNumbers`, this has a corresponding list of operators to update.
* @dev Each list of operator addresses MUST be sorted in ascending order
* @dev Each list of operator addresses MUST represent the entire list of registered operators for the corresponding quorum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might not hurt to acknowledge the potential race condition here? (i.e. if an operator registers/deregisters, it can cause this to revert)

Comment on lines 519 to 520
* @dev In order to be churned, the existing operator needs to have less stake than
* the total quorum stake by a propertion given by `kickBIPsOfTotalStake`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in propertion
I think this wording may also be a little confusing?
I would say instead:

     * @dev In order to be churned out, the existing operator needs to have a proportion of the total
     * quorum stake less than `kickBIPsOfTotalStake`

but perhaps that's just my personal preference

blsApkRegistry.deregisterOperator(operator, quorumNumbers);
stakeRegistry.deregisterOperator(operatorId, quorumNumbers);
indexRegistry.deregisterOperator(operatorId, quorumNumbers);
}

/**
* @notice update operator stake for specified quorumsToUpdate, and deregister if necessary
* does nothing if operator is not registered for any quorums.
* @notice Updates the StakeRegistry's view of the operator's stake one or more quorums.
Copy link
Contributor

@ChaoticWalrus ChaoticWalrus Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like there's a word missing. perhaps "in one or more quorums"?

Copy link
Contributor

@ChaoticWalrus ChaoticWalrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I only have a few really minor, typo-level comments

@wadealexc wadealexc merged commit 355f34f into m2-mainnet Jan 11, 2024
3 checks passed
@wadealexc wadealexc deleted the alex/repo-cleanup branch January 11, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment