|
8 | 8 | | -------- | -------- | -------- |
|
9 | 9 | | [`RegistryCoordinator.sol`](../src/RegistryCoordinator.sol) | Singleton | Transparent proxy |
|
10 | 10 |
|
11 |
| -The `RegistryCoordinator` has three primary functions: |
12 |
| -1. It is the primary entry and exit point for operators as they register for and deregister from quorums, and manages registration and deregistration in the `BLSApkRegistry`, `StakeRegistry`, and `IndexRegistry`. It also hooks into the EigenLayer core contracts, updating the core `DelegationManager` when an Operator registers/deregisters. |
| 11 | +The `RegistryCoordinator` is a contract that exisiting AVSs using M2 quorums who wish to enable operator sets should upgrade to. New AVSs should deploy the `SlashingRegistryCoordinator` to use operator sets. The `RegistryCoordinator` inherits the `SlashingRegistryCoordinator` to expose the operator set functionality. |
| 12 | + |
| 13 | +The `RegistryCoordinator` has four primary functions: |
| 14 | +1. It is the primary entry and exit point for operators as they register for and deregister from quorums, and manages registration and deregistration in the `BLSApkRegistry`, `StakeRegistry`, and `IndexRegistry`. It also hooks into the EigenLayer core contracts, updating the core `AVSDirectory` for M2 quorums and `AllocationManager` in the case of ejection and operator set quorums |
13 | 15 | 2. It allows anyone to update the current stake of any registered operator
|
14 | 16 | 3. It allows the Owner to initialize and configure new quorums
|
| 17 | +4. Disabling M2 quorum registration to upgrade to operator sets |
| 18 | + |
| 19 | +Refer to the [`SlashingRegistryCoordinator`](./SlashingRegistryCoordinator) for operator set functionality. |
| 20 | + |
| 21 | +#### Migration |
| 22 | +Existing AVSs upgrading to this version `RegistryCoordinator` will be in a state where both M2 quorum registration and operator set registration will be enabled. AVSs must be aware of this. Operator sets will be enabled on upon the first call to either `createDelegatedStakeQuorum` or `createSlashableStakeQuorum` which are inherited from the `SlashingRegistryCoordinator`. The suggested flow for this migration is as follows: |
| 23 | +1. Upgrade `RegistryCoordinator` |
| 24 | +2. Create delegated or slashable stake quorums via `createDelegatedStakeQuorum` or `createSlashableStakeQuorum` |
| 25 | +3. Allow time for operators to register for the new quorums using the `AllocationManager` |
| 26 | +4. After adequate stake has been migrated (e.g. for the sake of securing new tasks of operator sets), disable M2 registration by calling `disableM2QuorumRegistration`, note that operators can still deregister from the legacy quorums |
15 | 27 |
|
16 | 28 | #### High-level Concepts
|
17 | 29 |
|
@@ -146,189 +158,21 @@ Allows an Operator to deregister themselves from one or more quorums.
|
146 | 158 | * See [`StakeRegistry.deregisterOperator`](./registries/StakeRegistry.md#deregisteroperator)
|
147 | 159 | * See [`IndexRegistry.deregisterOperator`](./registries/IndexRegistry.md#deregisteroperator)
|
148 | 160 |
|
149 |
| -#### `ejectOperator` |
150 |
| - |
151 |
| -```solidity |
152 |
| -function ejectOperator( |
153 |
| - address operator, |
154 |
| - bytes calldata quorumNumbers |
155 |
| -) |
156 |
| - external |
157 |
| - onlyEjector |
158 |
| -``` |
159 |
| - |
160 |
| -Allows the Ejector to forcibly deregister an Operator from one or more quorums. |
161 |
| - |
162 |
| -*Effects*: |
163 |
| -* See `deregisterOperator` above |
164 |
| - |
165 |
| -*Requirements*: |
166 |
| -* Caller MUST be the Ejector |
167 |
| -* See `deregisterOperator` above |
168 |
| - |
169 |
| ---- |
170 |
| - |
171 |
| -### Updating Registered Operators |
172 |
| - |
173 |
| -These methods concern Operators that are currently registered for at least one quorum: |
174 |
| -* [`updateOperators`](#updateoperators) |
175 |
| -* [`updateOperatorsForQuorum`](#updateoperatorsforquorum) |
176 |
| -* [`updateSocket`](#updatesocket) |
177 |
| - |
178 |
| -#### `updateOperators` |
179 |
| - |
180 |
| -```solidity |
181 |
| -function updateOperators( |
182 |
| - address[] calldata operators |
183 |
| -) |
184 |
| - external |
185 |
| - onlyWhenNotPaused(PAUSED_UPDATE_OPERATOR) |
186 |
| -``` |
187 |
| - |
188 |
| -Allows anyone to update the contracts' view of one or more Operators' stakes. For each currently-registered `operator`, this method calls `StakeRegistry.updateOperatorStake`, triggering an update of that Operator's stake. |
189 |
| - |
190 |
| -The `StakeRegistry` returns a bitmap of quorums where the Operator no longer meets the minimum stake required for registration. The Operator is then deregistered from those quorums. |
191 |
| - |
192 |
| -*Effects*: |
193 |
| -* See [`StakeRegistry.updateOperatorStake`](./registries/StakeRegistry.md#updateoperatorstake) |
194 |
| -* For any quorums where the Operator no longer meets the minimum stake, they are deregistered (see `deregisterOperator` above). |
195 |
| - |
196 |
| -*Requirements*: |
197 |
| -* Pause status MUST NOT be set: `PAUSED_UPDATE_OPERATOR` |
198 |
| -* See [`StakeRegistry.updateOperatorStake`](./registries/StakeRegistry.md#updateoperatorstake) |
199 |
| - |
200 |
| -#### `updateOperatorsForQuorum` |
201 |
| - |
202 |
| -```solidity |
203 |
| -function updateOperatorsForQuorum( |
204 |
| - address[][] calldata operatorsPerQuorum, |
205 |
| - bytes calldata quorumNumbers |
206 |
| -) |
207 |
| - external |
208 |
| - onlyWhenNotPaused(PAUSED_UPDATE_OPERATOR) |
209 |
| -``` |
210 |
| - |
211 |
| -Can be called by anyone to update the stake of ALL Operators in one or more quorums simultaneously. This method works similarly to `updateOperators` above, but with the requirement that, for each quorum being updated, the respective `operatorsPerQuorum` passed in is the complete set of Operators currently registered for that quorum. |
212 |
| - |
213 |
| -This method also updates each quorum's `quorumUpdateBlockNumber`, signifying that the quorum's entire Operator set was updated at the current block number. (This is used by the `BLSSignatureChecker` to ensure that signature and stake validation is performed on up-to-date stake.) |
214 |
| - |
215 |
| -*Effects*: |
216 |
| -* See `updateOperators` above |
217 |
| -* Updates each quorum's `quorumUpdateBlockNumber` to the current block |
218 |
| -* For any quorums where the Operator no longer meets the minimum stake, they are deregistered (see `deregisterOperator` above). |
219 |
| - |
220 |
| -*Requirements*: |
221 |
| -* Pause status MUST NOT be set: `PAUSED_UPDATE_OPERATOR` |
222 |
| -* See `updateOperators` above |
223 |
| -* `quorumNumbers` MUST be an ordered array of quorum numbers, with no entry exceeding the current `quorumCount` |
224 |
| -* All `quorumNumbers` MUST correspond to valid, initialized quorums |
225 |
| -* `operatorsPerQuorum` and `quorumNumbers` MUST have the same lengths |
226 |
| -* Each entry in `operatorsPerQuorum` MUST contain an order list of the currently-registered Operator addresses in the corresponding quorum |
227 |
| -* See [`StakeRegistry.updateOperatorStake`](./registries/StakeRegistry.md#updateoperatorstake) |
228 |
| - |
229 |
| -#### `updateSocket` |
230 |
| - |
231 |
| -```solidity |
232 |
| -function updateSocket(string memory socket) external |
233 |
| -``` |
234 |
| - |
235 |
| -Allows a registered Operator to emit an event, updating their socket. |
236 |
| - |
237 |
| -*Effects*: |
238 |
| -* Emits an `OperatorSocketUpdate` event |
239 |
| - |
240 |
| -*Requirements*: |
241 |
| -* Caller MUST be a registered Operator |
242 |
| - |
243 |
| ---- |
244 |
| - |
245 | 161 | ### System Configuration
|
246 | 162 |
|
247 | 163 | These methods are used by the Owner to configure the `RegistryCoordinator`:
|
248 |
| -* [`createQuorum`](#createquorum) |
249 |
| -* [`setOperatorSetParams`](#setoperatorsetparams) |
250 |
| -* [`setChurnApprover`](#setchurnapprover) |
251 |
| -* [`setEjector`](#setejector) |
252 |
| - |
253 |
| -#### `createQuorum` |
254 |
| - |
255 |
| -```solidity |
256 |
| -function createQuorum( |
257 |
| - OperatorSetParam memory operatorSetParams, |
258 |
| - uint96 minimumStake, |
259 |
| - IStakeRegistryTypes.StrategyParams[] memory strategyParams |
260 |
| -) |
261 |
| - external |
262 |
| - virtual |
263 |
| - onlyOwner |
264 |
| -``` |
265 |
| - |
266 |
| -Allows the Owner to initialize a new quorum with the given configuration. The new quorum is assigned a sequential quorum number. |
267 |
| - |
268 |
| -The new quorum is also initialized in each of the registry contracts. |
269 |
| - |
270 |
| -*Effects*: |
271 |
| -* `quorumCount` is incremented by 1 |
272 |
| -* The new quorum's `OperatorSetParams` are initialized (see `setOperatorSetParams` below) |
273 |
| -* See [`BLSApkRegistry.initializeQuorum`](./registries/BLSApkRegistry.md#initializequorum) |
274 |
| -* See [`StakeRegistry.initializeQuorum`](./registries/StakeRegistry.md#initializequorum) |
275 |
| -* See [`IndexRegistry.initializeQuorum`](./registries/IndexRegistry.md#initializequorum) |
276 |
| - |
277 |
| -*Requirements*: |
278 |
| -* Caller MUST be the Owner |
279 |
| -* Quorum count before creation MUST be less than `MAX_QUORUM_COUNT` |
280 |
| -* See [`BLSApkRegistry.initializeQuorum`](./registries/BLSApkRegistry.md#initializequorum) |
281 |
| -* See [`StakeRegistry.initializeQuorum`](./registries/StakeRegistry.md#initializequorum) |
282 |
| -* See [`IndexRegistry.initializeQuorum`](./registries/IndexRegistry.md#initializequorum) |
283 |
| - |
284 |
| -#### `setOperatorSetParams` |
285 | 164 |
|
286 |
| -```solidity |
287 |
| -function setOperatorSetParams( |
288 |
| - uint8 quorumNumber, |
289 |
| - OperatorSetParam memory operatorSetParams |
290 |
| -) |
291 |
| - external |
292 |
| - onlyOwner |
293 |
| - quorumExists(quorumNumber) |
294 |
| -``` |
295 |
| - |
296 |
| -Allows the Owner to update an existing quorum's `OperatorSetParams`, which determine: |
297 |
| -* `maxOperatorCount`: The max number of operators that can be in this quorum |
298 |
| -* `kickBIPsOfOperatorStake`: The basis points a new Operator needs over an old Operator's stake to replace them in `registerOperatorWithChurn` |
299 |
| -* `kickBIPsOfTotalStake`: The basis points a replaced Operator needs under the quorum's total stake to be replaced in `registerOperatorWithChurn` |
300 |
| - |
301 |
| -*Effects*: |
302 |
| -* Updates the quorum's `OperatorSetParams` |
303 |
| - |
304 |
| -*Requirements*: |
305 |
| -* Caller MUST be the Owner |
306 |
| -* `quorumNumber` MUST correspond to an existing, initialized quorum |
307 |
| - |
308 |
| -#### `setChurnApprover` |
| 165 | +#### `disableM2QuorumRegistration` |
309 | 166 |
|
310 | 167 | ```solidity
|
311 |
| -function setChurnApprover(address _churnApprover) external onlyOwner |
| 168 | +function disableM2QuorumRegistration() external onlyOwner |
312 | 169 | ```
|
313 | 170 |
|
314 |
| -Allows the Owner to update the Churn Approver address. |
| 171 | +Allows the Owner to disable M2 quorum registration. This disables the M2 legacy quorum registration. Operators can still deregister once M2 registration is disabled. Note that this is a one way function, meaning once M2 is disabled it cannot be re-enabled. |
315 | 172 |
|
316 |
| -*Effects*: |
317 |
| -* Updates the Churn Approver address |
| 173 | +*Effects* |
| 174 | +* Disables M2 quourum registration |
318 | 175 |
|
319 |
| -*Requirements*: |
| 176 | +*Requirements* |
320 | 177 | * Caller MUST be the Owner
|
321 |
| - |
322 |
| -#### `setEjector` |
323 |
| - |
324 |
| -```solidity |
325 |
| -function setEjector(address _ejector) external onlyOwner |
326 |
| -``` |
327 |
| - |
328 |
| -Allows the Owner to update the Ejector address. |
329 |
| - |
330 |
| -*Effects*: |
331 |
| -* Updates the Ejector address |
332 |
| - |
333 |
| -*Requirements*: |
334 |
| -* Caller MUST be the Owner |
| 178 | +* M2 registration must be enabled |
0 commit comments