-
Notifications
You must be signed in to change notification settings - Fork 437
feat: operator set migration; completely separate legacy and opset reg #636
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 set migration; completely separate legacy and opset reg #636
Conversation
* feat: add migration * test: add unit tests for migration * chore: format * fix: check operator set avs in parent func * fix: compilation * chore: format
* | ||
* @dev msg.sender must be the AVS. | ||
*/ | ||
function becomeOperatorSetAVS() 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.
do we need this? it should just be upon first createOperatorSets
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.
This prevents footguns for AVSs. Suggestion by @stevennevins and @wadealexc
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 was thinking of it as we don't want to let createOperatorSets be called unintentionally. Requiring that this is called first prevents that
require( | ||
!isOperatorSet[msg.sender][operatorSetId], "AVSDirectory._createOperatorSet: operator set already exists" | ||
isOperatorSetAVS[msg.sender], "AVSDirectory.migrateOperatorsToOperatorSets: AVS is not an operator set AVS" |
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.
no need to make this check, register to operator sets will fail
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.
Assume you mean for createOperatorSets
function?
#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)
#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)
#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: 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]>
* 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]>
* 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]>
Bring back the OperatorAVSRegistration storage that was previously overwritten.
Segregates the registration/deregistration on M2 Legacy & Operator Sets for consistency in offchain code paths. As a result, we remove the numAVSRegistered struct.
The storage may be able to be condensed still, but haven't put further thought into this.
Pending: Bring Back OpSet struct in a separate PR