-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(M2-Mainnet): StakeRegistry pull updates per quorum (#62)
* feat: initial implementation w/o timestamp * feat: enforce stake updates for quorum in sigcheck * fix: update operator stake for just one quorum Additionally - renamed updateOperatorsPerQuorum to updateOperatorsForQuorum - sort by operator addresses instead of operatorIds * fix: requested changes and optimizations - sorted by ascending address instead of operatorId - sanitization checks on quorumNumbers, added quorumsAllExist modifier - performing `OperatorStatus.REGISTERED` checks now - Removed uneccesary bitmapToBytes calls and doing bytes slicing for quorumNumbers - using internal function and scoping to fix stack-too-deep * refactor: move quorumUpdateTimestamp to reg coord * refactor: remove modifier in favor of helper method (#64) * fix: initializedQuorumBitmap fix small off by 1 error, for example of quorumCount = 1,3 1 << 1 = 2, bit rep is 10 1 << 1 - 1 = 1, bit rep is 01 1 << 3 = 8, bit rep is 1000 1 << 3 - 1 = 7, bit rep is 0111 We should be subtracting by 1 instead of 2 here to get the bitmap * fix: bitshifting error, needs to shift first before subtracting * fix: moved 1 weeks to a constant for now May change this in the future to be configurable * chore: require statement * refactor: move shared logic to `_updateOperator` * refactor: added status check to `_updateOperator` * feat: Delegation.withdrawalDelayBlocks in sigcheck * fix: use blocknumber instead of timestamp * fix: unused constant and require error * feat: timestamp requirement is able to be toggled * fix: interface imports * chore: renamed to staleStakesForbidden * chore: typo with BlockNumber * fix: rebase remove deleted file * fix: prevOperatorAddress not being updated --------- Co-authored-by: Alex <[email protected]>
- Loading branch information
Showing
5 changed files
with
141 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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