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

feat: operator sets #607

Closed
wants to merge 38 commits into from
Closed

feat: operator sets #607

wants to merge 38 commits into from

Conversation

ypatil12
Copy link
Collaborator

@ypatil12 ypatil12 commented Jul 1, 2024

Pending Performance Based Rewards

@ypatil12 ypatil12 marked this pull request as draft July 1, 2024 15:32
@wadealexc wadealexc changed the title Feat: Operator Sets feat: operator sets Jul 1, 2024
Copy link
Collaborator

@wadealexc wadealexc left a comment

Choose a reason for hiding this comment

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

One of the usecases is:

As an AVS, I would like to distinguish between the strategies in each of my operator sets on the UI

I don't see strategies represented super well with these operator sets.

  1. There's no clear "create operator set" method (yes, it can be in the middleware contracts, but I'm questioning why we don't have an explicit creation method here)
  2. There's no clear binding between an operator set and the strategies it represents

@0xClandestine 0xClandestine force-pushed the feat/operator-set-release branch 2 times, most recently from 5c36e71 to 700ea74 Compare July 9, 2024 16:49
@Layr-Labs Layr-Labs deleted a comment from github-actions bot Jul 9, 2024
@0xClandestine
Copy link
Contributor

Was able to condense 4 mappings into 2 with the recent storage overhaul, it allows for the original interface if we want to add some getters.

Saves several SLOADs/SSTOREs throughout AVSDirectory.

@Layr-Labs Layr-Labs deleted a comment from github-actions bot Jul 9, 2024
@Layr-Labs Layr-Labs deleted a comment from github-actions bot Jul 9, 2024
@Layr-Labs Layr-Labs deleted a comment from github-actions bot Jul 10, 2024
* @dev The AVS may create operator sets before it becomes an operator set AVS.
*/
function createOperatorSets(uint32[] calldata operatorSetIds) external {
for (uint256 i = 0; i < operatorSetIds.length; ++i) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have another pause flag for this function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why we would ever pause this?

@ypatil12 ypatil12 force-pushed the feat/operator-set-release branch from ce3006e to 88a4829 Compare August 8, 2024 19:39
0xClandestine and others added 23 commits August 15, 2024 14:34
#636)

* feat: bring back full storage; segregate events

* feat: make operator set creation w/arrays; update interface

* fix: update natspec

* feat: update force dereg func

* chore: fmt

* feat: operator set migration (#637)

* feat: add migration

* test: add unit tests for migration

* chore: format

* fix: check operator set avs in parent func

* fix: compilation

* chore: format

* feat: bring back opertor set struct (#639)
* feat: operator commission bips

configured with a delay

* build: bindings

* fix: interfaces and comments

* fix: storage gap and comments

* chore: tests cleanup

* build: bindings

* chore: `forge fmt src/contracts`

* feat: `operatorCommissionUpdates` length getter

* fix: remove unused imports

* fix: optimizations

* chore: uncheckeds and remove dup view

* build: bindings

* chore: format

---------

Co-authored-by: clandestine.eth <[email protected]>
also pushed updated bindings
* feat: track total members and sets

* test: track total members and sets

* fix: review changes

* refactor: review changes

* test: register multiple sets

* test: deregister multiple sets

* test: fuzz set creation
* feat: operator set rewards

* chore: forge fmt

* feat: add operator set retroactive length & genesis timestamp

* docs: add deprecation note and fix typo

* build: bindings

* feat: add tests

* chore: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>
Co-authored-by: Michael Sun <[email protected]>
* fix: flakey tests

* build: bindings

* fix: out of gas error
* feat: track sets operators in

* feat: add natspec

* refactor: reorganize

* fix: tests passing

* fix: compile warnings

* fix: test passing

* feat: add `operatorSetsMemberOf` pagination

* test: add coverage

* chore: bindings

---------

Co-authored-by: Yash Patil <[email protected]>
@8sunyuan 8sunyuan force-pushed the feat/operator-set-release branch from f2a7515 to f0873d1 Compare August 15, 2024 18:37
8sunyuan and others added 3 commits August 15, 2024 14:40
* fix: prevent opSet AVS from m2 dereg

* fix: naming
* feat: functionality

* test: add tests

* chore: address comments

* chore: bindigns and fmt
Copy link

Reading tracefile ./lcov.info.pruned
                                             |Lines      |Functions|Branches  
Filename                                       |Rate    Num|Rate  Num|Rate   Num
================================================================================
[src/contracts/]
core/AVSDirectory.sol                          | 100%    89| 100%  29|    -    0
core/DelegationManager.sol                     |96.5%   198|92.3%  39|    -    0
core/RewardsCoordinator.sol                    |94.6%   148|88.6%  35|    -    0
core/StrategyManager.sol                       |97.6%    83| 100%  24|    -    0
libraries/BeaconChainProofs.sol                | 100%    22| 100%  11|    -    0
libraries/BytesLib.sol                         | 0.0%   156| 0.0%  14|    -    0
libraries/EIP1271SignatureUtils.sol            | 100%     3| 100%   1|    -    0
libraries/Endian.sol                           | 100%     2| 100%   1|    -    0
libraries/Merkle.sol                           | 100%    38| 100%   5|    -    0
libraries/StructuredLinkedList.sol             | 0.0%    45| 0.0%  19|    -    0
permissions/Pausable.sol                       |95.7%    23|90.9%  11|    -    0
permissions/PauserRegistry.sol                 | 100%    12| 100%   6|    -    0
pods/EigenPod.sol                              | 100%   122|96.2%  26|    -    0
pods/EigenPodManager.sol                       | 100%    75|92.9%  14|    -    0
strategies/EigenStrategy.sol                   | 0.0%    10| 0.0%   5|    -    0
strategies/StrategyBase.sol                    |90.9%    44|78.9%  19|    -    0
strategies/StrategyBaseTVLLimits.sol           | 100%    12| 100%   6|    -    0
strategies/StrategyFactory.sol                 | 100%    35| 100%   9|    -    0
token/BackingEigen.sol                         |80.0%    25|60.0%  10|    -    0
token/Eigen.sol                                |43.6%    39|58.3%  12|    -    0
utils/UpgradeableSignatureCheckingUtils.sol    | 0.0%     6| 0.0%   4|    -    0
================================================================================
                                       Total:|77.6%  1187|78.3% 300|    -    0

@ypatil12
Copy link
Collaborator Author

Combined with slashing: #679

@ypatil12 ypatil12 closed this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants