Skip to content

Conversation

8sunyuan
Copy link
Contributor

Adding configurable operator commission bips on an activation delay to the RewardsCoordinator.sol contract.

Unit Test coverage

  • operatorCommissionBips
  • setOperatorCommissionBips
  • disableRoot (needed some more coverage)

@@ -85,6 +85,8 @@
mapping(address => mapping(bytes32 => bool)) public isRewardsSubmissionForAllHash;
/// @notice Mapping: address => bool to check if the address is permissioned to call createRewardsForAllSubmission
mapping(address => bool) public isRewardsForAllSubmitter;
/// @notice Mapping: operator => avs => operatorSetId => OperatorCommissionUpdate history
mapping(address => mapping(address => mapping(uint32 => OperatorCommissionUpdate[]))) public operatorCommissionUpdates;

Check failure

Code scanning / Slither

Uninitialized state variables

RewardsCoordinatorStorage.operatorCommissionUpdates (src/contracts/core/RewardsCoordinatorStorage.sol#89) is never initialized. It is used in: - RewardsCoordinator.setOperatorCommissionBips(address,address,uint32,uint16) (src/contracts/core/RewardsCoordinator.sol#290-320) - RewardsCoordinator.operatorCommissionBips(address,address,uint32) (src/contracts/core/RewardsCoordinator.sol#557-573) - RewardsCoordinator.getOperatorCommissionUpdateHistoryLength(address,address,uint32) (src/contracts/core/RewardsCoordinator.sol#609-615)
Copy link
Member

@0xClandestine 0xClandestine left a comment

Choose a reason for hiding this comment

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

Looking good, just a few smol optimizations.

Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

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

It seems like we will definitely have rewards for delegated stake & slashable stake in the future. IMO we should add the reward type (DELEGATED_STAKE) to this contract and have the commission be set on a per reward type, per op set basis, even if we only have 1 reward type till slashing. This is so the storage isn't updated once again for slashing here

@@ -85,6 +85,8 @@
mapping(address => mapping(bytes32 => bool)) public isRewardsSubmissionForAllHash;
/// @notice Mapping: address => bool to check if the address is permissioned to call createRewardsForAllSubmission
mapping(address => bool) public isRewardsForAllSubmitter;
/// @notice Mapping: operator => avs => operatorSetId => OperatorCommissionUpdate history
mapping(address => mapping(address => mapping(uint32 => mapping(RewardType => OperatorCommissionUpdate[])))) public operatorCommissionUpdates;

Check failure

Code scanning / Slither

Uninitialized state variables

RewardsCoordinatorStorage.operatorCommissionUpdates (src/contracts/core/RewardsCoordinatorStorage.sol#89) is never initialized. It is used in: - RewardsCoordinator.setOperatorCommissionBips(IAVSDirectory.OperatorSet,IRewardsCoordinator.RewardType,uint16) (src/contracts/core/RewardsCoordinator.sol#291-318) - RewardsCoordinator.getOperatorCommissionBips(address,IAVSDirectory.OperatorSet,IRewardsCoordinator.RewardType) (src/contracts/core/RewardsCoordinator.sol#555-575) - RewardsCoordinator.getOperatorCommissionUpdateHistoryLength(address,IAVSDirectory.OperatorSet,IRewardsCoordinator.RewardType) (src/contracts/core/RewardsCoordinator.sol#611-617)
@0xClandestine
Copy link
Member

LGTM

@ypatil12 ypatil12 force-pushed the feat/operator-commission-bips branch from 8b88089 to 00fa3f6 Compare July 22, 2024 19:25
@ypatil12 ypatil12 merged commit 500e025 into feat/operator-set-release Jul 22, 2024
5 of 10 checks passed
@ypatil12 ypatil12 deleted the feat/operator-commission-bips branch July 22, 2024 19:32
ypatil12 pushed a commit that referenced this pull request Aug 8, 2024
* 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]>
ypatil12 pushed a commit that referenced this pull request Aug 12, 2024
* 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]>
gpsanant pushed a commit that referenced this pull request Aug 12, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 12, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 15, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 15, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 15, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 16, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* chore: nits

* chore: reorder storage

* feat: numToComplete and rebase cleanup

---------

Co-authored-by: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Aug 16, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 16, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* feat: numToComplete and rebase cleanup

* feat: allocator signature

* feat: allocator function in DM

fixed checkpoints typo as well

* build: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Aug 16, 2024
* 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]>
ypatil12 pushed a commit that referenced this pull request Aug 29, 2024
* 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]>
ypatil12 pushed a commit that referenced this pull request Aug 29, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* chore: nits

* chore: reorder storage

* feat: numToComplete and rebase cleanup

---------

Co-authored-by: clandestine.eth <[email protected]>
ypatil12 pushed a commit that referenced this pull request Aug 29, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* feat: numToComplete and rebase cleanup

* feat: allocator signature

* feat: allocator function in DM

fixed checkpoints typo as well

* build: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Aug 30, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 30, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Aug 30, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* chore: nits

* chore: reorder storage

* feat: numToComplete and rebase cleanup

---------

Co-authored-by: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Aug 30, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* feat: numToComplete and rebase cleanup

* feat: allocator signature

* feat: allocator function in DM

fixed checkpoints typo as well

* build: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>
8sunyuan pushed a commit that referenced this pull request Sep 12, 2024
* feat: functionality

* test: add tests

* chore: address comments

* chore: bindigns and fmt

fix: block m2 deregistrations for opset AVSs (#688)

* fix: prevent opSet AVS from m2 dereg

* fix: naming

build: bindings

chore: compilation & bindings

Feat: enumerating sets operators are in (#662)

* 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

---------

fix: fix operator commission tests (#673)

* fix: flakey tests

* build: bindings

* fix: out of gas error

fix: deploy config

fix: deployers

chore: bindings

chore: update gap

chore: address comments

feat: remove storage (#667)

feat: operator set rewards (#663)

* 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

---------

feat: track total members and sets (#649)

* 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

fix: compiling from conflict fix

also pushed updated bindings

feat: operator commission bips (#627)

* 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

---------

feat: operator set migration; completely separate legacy and opset reg (#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)

test: operator set initialization

feat: operator set initialization

feat: add missing interface fns

feat: add missing interface fns

refactor: remove OperatorSet struct

test: forced opset dereg

chore: forge fmt src/contracts

feat: forced opset dereg

chore: forge fmt

refactor: rename isOperatorInOperatorSet -> isMember

feat: remove simp mode

chore: improve comments + naming

fix: variable name consistency

nit: move updateStandbyParams fn

refactor: storage optimization/overhaul

refactor: remove unused beaconChainETHStrategy constant

refactor: remove isOperatorSetAVS mapping

nit: improve comments

chore: run `forge fmt src/contracts`

chore: run

fix: remove unused immutable

Feat/operator sets (#579)

* feat: operator set scaffold

* fix: impl/storage compile errors; pending updating of tests

* chore: `forge fmt`

* fix: `OperatorSet` struct misuse

* fix: comment

* chore: verbose use of `OperatorSet`

* test: `registerOperatorToOperatorSet`

* feat: `registerOperatorToOperatorSets`

Enables registering multiple operator sets in a single call.

* chore: `forge fmt`

* feat: interface changes

* fix: operator set digest

* fix: `OPERATOR_SET_REGISTRATION_TYPEHASH`

* chore: `forge fmt`

* test: wrong avs using signature

* fix: optimize for SSTOREs

* test: `deregisterOperatorFromOperatorSets`

* chore: rename `operatorSetStrategies`

* test: `addStrategiesToOperatorSet`

* test: `removeStrategiesFromOperatorSet`

* test: more coverage

* chore: improve natspec

* WIP: simp mode

* WIP: simp mode

* WIP: simp mode

- includes interface change, specifically the `StandbyParams` structure. `id` isn't needed for storage.

* test: simp mode

* test: simp mode

* test: simp mode

* refactor: simp mode storage

* Revert "refactor: simp mode storage"

This reverts commit 3b0450e.

* Reapply "refactor: simp mode storage"

This reverts commit 5f90d78.

* feat: simp mode

* fix(optimize): salt cancellation

- remove check

* test: improvements

* test: improvements

* fix: move `isOperatorSetAVS` update out of loop

ooops

* fix: standby update typehash

* test: cleanup

* fix: move mutation out of loop

* nit: cleanup

* fix: remove unused events

---------

Co-Authored-By: Yash Patil <[email protected]>
Co-Authored-By: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Sep 12, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Sep 12, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* chore: nits

* chore: reorder storage

* feat: numToComplete and rebase cleanup

---------

Co-authored-by: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Sep 12, 2024
* feat: operator commission bips (#627)

* 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]>

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* feat: numToComplete and rebase cleanup

* feat: allocator signature

* feat: allocator function in DM

fixed checkpoints typo as well

* build: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Sep 12, 2024
feat: encoded operatorSet mapping keys and duplicate check (#704)

* feat: operatorSet encoded mapping keys

* chore: natspec

* refactor: add allocationDelay require

chore: add back legacy functions

chore: update interfaces and nits

feat: update to max 1 alloc/dealloc (#703)

* feat: update to max 1 alloc/dealloc

* fix: naming

* fix: compile

build: bindings

feat: getAllocatableMagnitude

feat: set allocations (#691)

* feat: set allocations

* cleanup

* fixes

* fix perms on modifyAllocations

* fix initialization issues

* feat: operatorSignature and remove allocator

* build: bindings

* fix: max allocation updates check

---------

feat: allocator signatures allocate/deallocate (#690)

* feat: operator commission bips (#627)

* 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

---------

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* feat: numToComplete and rebase cleanup

* feat: allocator signature

* feat: allocator function in DM

fixed checkpoints typo as well

* build: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>

feat: refactor to free all opsets on allo/deallo (#680)

* feat: operator commission bips (#627)

* 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

---------

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* chore: nits

* chore: reorder storage

* feat: numToComplete and rebase cleanup

---------

Co-authored-by: clandestine.eth <[email protected]>

chore: add check for pending deallocations

build: bindings

chore: rename back to checkpoints
Co-Authored-By: gpsanant <[email protected]>
Co-Authored-By: clandestine.eth <[email protected]>
8sunyuan pushed a commit that referenced this pull request Sep 12, 2024
* feat: functionality

* test: add tests

* chore: address comments

* chore: bindigns and fmt

fix: block m2 deregistrations for opset AVSs (#688)

* fix: prevent opSet AVS from m2 dereg

* fix: naming

build: bindings

chore: compilation & bindings

Feat: enumerating sets operators are in (#662)

* 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

---------

fix: fix operator commission tests (#673)

* fix: flakey tests

* build: bindings

* fix: out of gas error

fix: deploy config

fix: deployers

chore: bindings

chore: update gap

chore: address comments

feat: remove storage (#667)

feat: operator set rewards (#663)

* 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

---------

feat: track total members and sets (#649)

* 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

fix: compiling from conflict fix

also pushed updated bindings

feat: operator commission bips (#627)

* 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

---------

feat: operator set migration; completely separate legacy and opset reg (#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)

test: operator set initialization

feat: operator set initialization

feat: add missing interface fns

feat: add missing interface fns

refactor: remove OperatorSet struct

test: forced opset dereg

chore: forge fmt src/contracts

feat: forced opset dereg

chore: forge fmt

refactor: rename isOperatorInOperatorSet -> isMember

feat: remove simp mode

chore: improve comments + naming

fix: variable name consistency

nit: move updateStandbyParams fn

refactor: storage optimization/overhaul

refactor: remove unused beaconChainETHStrategy constant

refactor: remove isOperatorSetAVS mapping

nit: improve comments

chore: run `forge fmt src/contracts`

chore: run

fix: remove unused immutable

Feat/operator sets (#579)

* feat: operator set scaffold

* fix: impl/storage compile errors; pending updating of tests

* chore: `forge fmt`

* fix: `OperatorSet` struct misuse

* fix: comment

* chore: verbose use of `OperatorSet`

* test: `registerOperatorToOperatorSet`

* feat: `registerOperatorToOperatorSets`

Enables registering multiple operator sets in a single call.

* chore: `forge fmt`

* feat: interface changes

* fix: operator set digest

* fix: `OPERATOR_SET_REGISTRATION_TYPEHASH`

* chore: `forge fmt`

* test: wrong avs using signature

* fix: optimize for SSTOREs

* test: `deregisterOperatorFromOperatorSets`

* chore: rename `operatorSetStrategies`

* test: `addStrategiesToOperatorSet`

* test: `removeStrategiesFromOperatorSet`

* test: more coverage

* chore: improve natspec

* WIP: simp mode

* WIP: simp mode

* WIP: simp mode

- includes interface change, specifically the `StandbyParams` structure. `id` isn't needed for storage.

* test: simp mode

* test: simp mode

* test: simp mode

* refactor: simp mode storage

* Revert "refactor: simp mode storage"

This reverts commit 3b0450e.

* Reapply "refactor: simp mode storage"

This reverts commit 5f90d78.

* feat: simp mode

* fix(optimize): salt cancellation

- remove check

* test: improvements

* test: improvements

* fix: move `isOperatorSetAVS` update out of loop

ooops

* fix: standby update typehash

* test: cleanup

* fix: move mutation out of loop

* nit: cleanup

* fix: remove unused events

---------

Co-Authored-By: Yash Patil <[email protected]>
Co-Authored-By: clandestine.eth <[email protected]>
8sunyuan added a commit that referenced this pull request Sep 12, 2024
* 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]>
8sunyuan added a commit that referenced this pull request Sep 12, 2024
feat: encoded operatorSet mapping keys and duplicate check (#704)

* feat: operatorSet encoded mapping keys

* chore: natspec

* refactor: add allocationDelay require

chore: add back legacy functions

chore: update interfaces and nits

feat: update to max 1 alloc/dealloc (#703)

* feat: update to max 1 alloc/dealloc

* fix: naming

* fix: compile

build: bindings

feat: getAllocatableMagnitude

feat: set allocations (#691)

* feat: set allocations

* cleanup

* fixes

* fix perms on modifyAllocations

* fix initialization issues

* feat: operatorSignature and remove allocator

* build: bindings

* fix: max allocation updates check

---------

feat: allocator signatures allocate/deallocate (#690)

* feat: operator commission bips (#627)

* 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

---------

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* feat: numToComplete and rebase cleanup

* feat: allocator signature

* feat: allocator function in DM

fixed checkpoints typo as well

* build: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>

feat: refactor to free all opsets on allo/deallo (#680)

* feat: operator commission bips (#627)

* 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

---------

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* chore: nits

* chore: reorder storage

* feat: numToComplete and rebase cleanup

---------

Co-authored-by: clandestine.eth <[email protected]>

chore: add check for pending deallocations

build: bindings

chore: rename back to checkpoints
Co-Authored-By: gpsanant <[email protected]>
Co-Authored-By: clandestine.eth <[email protected]>
0xClandestine added a commit that referenced this pull request Sep 17, 2024
* feat: functionality

* test: add tests

* chore: address comments

* chore: bindigns and fmt

fix: block m2 deregistrations for opset AVSs (#688)

* fix: prevent opSet AVS from m2 dereg

* fix: naming

build: bindings

chore: compilation & bindings

Feat: enumerating sets operators are in (#662)

* 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

---------

fix: fix operator commission tests (#673)

* fix: flakey tests

* build: bindings

* fix: out of gas error

fix: deploy config

fix: deployers

chore: bindings

chore: update gap

chore: address comments

feat: remove storage (#667)

feat: operator set rewards (#663)

* 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

---------

feat: track total members and sets (#649)

* 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

fix: compiling from conflict fix

also pushed updated bindings

feat: operator commission bips (#627)

* 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

---------

feat: operator set migration; completely separate legacy and opset reg (#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)

test: operator set initialization

feat: operator set initialization

feat: add missing interface fns

feat: add missing interface fns

refactor: remove OperatorSet struct

test: forced opset dereg

chore: forge fmt src/contracts

feat: forced opset dereg

chore: forge fmt

refactor: rename isOperatorInOperatorSet -> isMember

feat: remove simp mode

chore: improve comments + naming

fix: variable name consistency

nit: move updateStandbyParams fn

refactor: storage optimization/overhaul

refactor: remove unused beaconChainETHStrategy constant

refactor: remove isOperatorSetAVS mapping

nit: improve comments

chore: run `forge fmt src/contracts`

chore: run

fix: remove unused immutable

Feat/operator sets (#579)

* feat: operator set scaffold

* fix: impl/storage compile errors; pending updating of tests

* chore: `forge fmt`

* fix: `OperatorSet` struct misuse

* fix: comment

* chore: verbose use of `OperatorSet`

* test: `registerOperatorToOperatorSet`

* feat: `registerOperatorToOperatorSets`

Enables registering multiple operator sets in a single call.

* chore: `forge fmt`

* feat: interface changes

* fix: operator set digest

* fix: `OPERATOR_SET_REGISTRATION_TYPEHASH`

* chore: `forge fmt`

* test: wrong avs using signature

* fix: optimize for SSTOREs

* test: `deregisterOperatorFromOperatorSets`

* chore: rename `operatorSetStrategies`

* test: `addStrategiesToOperatorSet`

* test: `removeStrategiesFromOperatorSet`

* test: more coverage

* chore: improve natspec

* WIP: simp mode

* WIP: simp mode

* WIP: simp mode

- includes interface change, specifically the `StandbyParams` structure. `id` isn't needed for storage.

* test: simp mode

* test: simp mode

* test: simp mode

* refactor: simp mode storage

* Revert "refactor: simp mode storage"

This reverts commit 3b0450e.

* Reapply "refactor: simp mode storage"

This reverts commit 5f90d78.

* feat: simp mode

* fix(optimize): salt cancellation

- remove check

* test: improvements

* test: improvements

* fix: move `isOperatorSetAVS` update out of loop

ooops

* fix: standby update typehash

* test: cleanup

* fix: move mutation out of loop

* nit: cleanup

* fix: remove unused events

---------

Co-Authored-By: Yash Patil <[email protected]>
Co-Authored-By: clandestine.eth <[email protected]>
0xClandestine added a commit that referenced this pull request Sep 17, 2024
* 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]>
0xClandestine added a commit that referenced this pull request Sep 17, 2024
feat: encoded operatorSet mapping keys and duplicate check (#704)

* feat: operatorSet encoded mapping keys

* chore: natspec

* refactor: add allocationDelay require

chore: add back legacy functions

chore: update interfaces and nits

feat: update to max 1 alloc/dealloc (#703)

* feat: update to max 1 alloc/dealloc

* fix: naming

* fix: compile

build: bindings

feat: getAllocatableMagnitude

feat: set allocations (#691)

* feat: set allocations

* cleanup

* fixes

* fix perms on modifyAllocations

* fix initialization issues

* feat: operatorSignature and remove allocator

* build: bindings

* fix: max allocation updates check

---------

feat: allocator signatures allocate/deallocate (#690)

* feat: operator commission bips (#627)

* 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

---------

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* feat: numToComplete and rebase cleanup

* feat: allocator signature

* feat: allocator function in DM

fixed checkpoints typo as well

* build: bindings

---------

Co-authored-by: clandestine.eth <[email protected]>

feat: refactor to free all opsets on allo/deallo (#680)

* feat: operator commission bips (#627)

* 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

---------

* feat: refactor to free all opsets on allo/deallo

* refactor: pendingFreeMagnitude and index pointers

* chore: nits

* chore: reorder storage

* feat: numToComplete and rebase cleanup

---------

Co-authored-by: clandestine.eth <[email protected]>

chore: add check for pending deallocations

build: bindings

chore: rename back to checkpoints
Co-Authored-By: gpsanant <[email protected]>
Co-Authored-By: clandestine.eth <[email protected]>
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.

3 participants