Skip to content

Commit 293e919

Browse files
authored
chore: use inheritdoc for SlashingRegCoord (#378)
1 parent 25a57eb commit 293e919

File tree

2 files changed

+30
-69
lines changed

2 files changed

+30
-69
lines changed

src/SlashingRegistryCoordinator.sol

+12-64
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,7 @@ contract SlashingRegistryCoordinator is
116116
m2QuorumsDisabled = true;
117117
}
118118

119-
/**
120-
* @notice Creates a quorum and initializes it in each registry contract
121-
* @param operatorSetParams configures the quorum's max operator count and churn parameters
122-
* @param minimumStake sets the minimum stake required for an operator to register or remain
123-
* registered
124-
* @param strategyParams a list of strategies and multipliers used by the StakeRegistry to
125-
* calculate an operator's stake weight for the quorum
126-
* @dev For m2 AVS this function has the same behavior as createQuorum before
127-
* For migrated AVS that enable operator sets this will create a quorum that measures total delegated stake for operator set
128-
*
129-
*/
119+
/// @inheritdoc ISlashingRegistryCoordinator
130120
function createTotalDelegatedStakeQuorum(
131121
OperatorSetParam memory operatorSetParams,
132122
uint96 minimumStake,
@@ -141,6 +131,7 @@ contract SlashingRegistryCoordinator is
141131
);
142132
}
143133

134+
/// @inheritdoc ISlashingRegistryCoordinator
144135
function createSlashableStakeQuorum(
145136
OperatorSetParam memory operatorSetParams,
146137
uint96 minimumStake,
@@ -157,6 +148,7 @@ contract SlashingRegistryCoordinator is
157148
);
158149
}
159150

151+
/// @inheritdoc ISlashingRegistryCoordinator
160152
function registerOperator(
161153
address operator,
162154
uint32[] memory operatorSetIds,
@@ -238,6 +230,7 @@ contract SlashingRegistryCoordinator is
238230
}
239231
}
240232

233+
/// @inheritdoc ISlashingRegistryCoordinator
241234
function deregisterOperator(
242235
address operator,
243236
uint32[] memory operatorSetIds
@@ -247,12 +240,7 @@ contract SlashingRegistryCoordinator is
247240
_deregisterOperator(operator, quorumNumbers);
248241
}
249242

250-
/**
251-
* @notice Updates the StakeRegistry's view of one or more operators' stakes. If any operator
252-
* is found to be below the minimum stake for the quorum, they are deregistered.
253-
* @dev stakes are queried from the Eigenlayer core DelegationManager contract
254-
* @param operators a list of operator addresses to update
255-
*/
243+
/// @inheritdoc ISlashingRegistryCoordinator
256244
function updateOperators(
257245
address[] memory operators
258246
) external onlyWhenNotPaused(PAUSED_UPDATE_OPERATOR) {
@@ -268,20 +256,7 @@ contract SlashingRegistryCoordinator is
268256
}
269257
}
270258

271-
/**
272-
* @notice For each quorum in `quorumNumbers`, updates the StakeRegistry's view of ALL its registered operators' stakes.
273-
* Each quorum's `quorumUpdateBlockNumber` is also updated, which tracks the most recent block number when ALL registered
274-
* operators were updated.
275-
* @dev stakes are queried from the Eigenlayer core DelegationManager contract
276-
* @param operatorsPerQuorum for each quorum in `quorumNumbers`, this has a corresponding list of operators to update.
277-
* @dev Each list of operator addresses MUST be sorted in ascending order
278-
* @dev Each list of operator addresses MUST represent the entire list of registered operators for the corresponding quorum
279-
* @param quorumNumbers is an ordered byte array containing the quorum numbers being updated
280-
* @dev invariant: Each list of `operatorsPerQuorum` MUST be a sorted version of `IndexRegistry.getOperatorListAtBlockNumber`
281-
* for the corresponding quorum.
282-
* @dev note on race condition: if an operator registers/deregisters for any quorum in `quorumNumbers` after a txn to
283-
* this method is broadcast (but before it is executed), the method will fail
284-
*/
259+
/// @inheritdoc ISlashingRegistryCoordinator
285260
function updateOperatorsForQuorum(
286261
address[][] memory operatorsPerQuorum,
287262
bytes calldata quorumNumbers
@@ -336,10 +311,7 @@ contract SlashingRegistryCoordinator is
336311
}
337312
}
338313

339-
/**
340-
* @notice Updates the socket of the msg.sender given they are a registered operator
341-
* @param socket is the new socket of the operator
342-
*/
314+
/// @inheritdoc ISlashingRegistryCoordinator
343315
function updateSocket(
344316
string memory socket
345317
) external {
@@ -353,12 +325,7 @@ contract SlashingRegistryCoordinator is
353325
*
354326
*/
355327

356-
/**
357-
* @notice Forcibly deregisters an operator from one or more quorums
358-
* @param operator the operator to eject
359-
* @param quorumNumbers the quorum numbers to eject the operator from
360-
* @dev possible race condition if prior to being ejected for a set of quorums the operator self deregisters from a subset
361-
*/
328+
/// @inheritdoc ISlashingRegistryCoordinator
362329
function ejectOperator(address operator, bytes memory quorumNumbers) external onlyEjector {
363330
lastEjectionTimestamp[operator] = block.timestamp;
364331

@@ -385,13 +352,7 @@ contract SlashingRegistryCoordinator is
385352
*
386353
*/
387354

388-
/**
389-
* @notice Updates an existing quorum's configuration with a new max operator count
390-
* and operator churn parameters
391-
* @param quorumNumber the quorum number to update
392-
* @param operatorSetParams the new config
393-
* @dev only callable by the owner
394-
*/
355+
/// @inheritdoc ISlashingRegistryCoordinator
395356
function setOperatorSetParams(
396357
uint8 quorumNumber,
397358
OperatorSetParam memory operatorSetParams
@@ -411,34 +372,21 @@ contract SlashingRegistryCoordinator is
411372
_setChurnApprover(_churnApprover);
412373
}
413374

414-
/**
415-
* @notice Sets the ejector, which can force-deregister operators from quorums
416-
* @param _ejector the new ejector
417-
* @dev only callable by the owner
418-
*/
375+
/// @inheritdoc ISlashingRegistryCoordinator
419376
function setEjector(
420377
address _ejector
421378
) external onlyOwner {
422379
_setEjector(_ejector);
423380
}
424381

425-
/**
426-
* @notice Sets the account identifier for this AVS (used for UAM integration in EigenLayer)
427-
* @param _accountIdentifier the new account identifier
428-
* @dev only callable by the owner
429-
*/
382+
/// @inheritdoc ISlashingRegistryCoordinator
430383
function setAccountIdentifier(
431384
address _accountIdentifier
432385
) external onlyOwner {
433386
_setAccountIdentifier(_accountIdentifier);
434387
}
435388

436-
/**
437-
* @notice Sets the ejection cooldown, which is the time an operator must wait in
438-
* seconds afer ejection before registering for any quorum
439-
* @param _ejectionCooldown the new ejection cooldown in seconds
440-
* @dev only callable by the owner
441-
*/
389+
/// @inheritdoc ISlashingRegistryCoordinator
442390
function setEjectionCooldown(
443391
uint256 _ejectionCooldown
444392
) external onlyOwner {

src/interfaces/ISlashingRegistryCoordinator.sol

+18-5
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,15 @@ interface ISlashingRegistryCoordinator is
352352
* @notice For each quorum in `quorumNumbers`, updates the StakeRegistry's view of ALL its registered operators' stakes.
353353
* Each quorum's `quorumUpdateBlockNumber` is also updated, which tracks the most recent block number when ALL registered
354354
* operators were updated.
355+
* @dev stakes are queried from the Eigenlayer core DelegationManager contract
355356
* @param operatorsPerQuorum for each quorum in `quorumNumbers`, this has a corresponding list of operators to update.
356-
* @param quorumNumbers is an ordered byte array containing the quorum numbers being updated.
357-
* @dev Each list of operator addresses MUST be sorted in ascending order.
358-
* @dev Each list of operator addresses MUST represent the entire list of registered operators for the corresponding quorum.
359-
* @dev Stakes are queried from the Eigenlayer core DelegationManager contract.
360-
* @dev Will revert if an operator registers/deregisters for any quorum in `quorumNumbers` after transaction broadcast but before execution.
357+
* @dev Each list of operator addresses MUST be sorted in ascending order
358+
* @dev Each list of operator addresses MUST represent the entire list of registered operators for the corresponding quorum
359+
* @param quorumNumbers is an ordered byte array containing the quorum numbers being updated
360+
* @dev invariant: Each list of `operatorsPerQuorum` MUST be a sorted version of `IndexRegistry.getOperatorListAtBlockNumber`
361+
* for the corresponding quorum.
362+
* @dev note on race condition: if an operator registers/deregisters for any quorum in `quorumNumbers` after a txn to
363+
* this method is broadcast (but before it is executed), the method will fail
361364
*/
362365
function updateOperatorsForQuorum(
363366
address[][] memory operatorsPerQuorum,
@@ -453,6 +456,16 @@ interface ISlashingRegistryCoordinator is
453456
uint256 _ejectionCooldown
454457
) external;
455458

459+
/**
460+
* @notice Updates the account identifier for this AVS (used for UAM integration in EigenLayer)
461+
* @param _accountIdentifier The new account identifier address
462+
* @dev Can only be called by the contract owner
463+
* @dev NOTE: Updating this value will break existing OperatorSets and UAM integration. This value should only be set once.
464+
*/
465+
function setAccountIdentifier(
466+
address _accountIdentifier
467+
) external;
468+
456469
/// VIEW
457470

458471
/**

0 commit comments

Comments
 (0)