Skip to content

Commit 499859d

Browse files
committed
refactor: remove max strats list (#968)
1 parent 9a198b5 commit 499859d

File tree

4 files changed

+0
-49
lines changed

4 files changed

+0
-49
lines changed

src/contracts/core/AllocationManager.sol

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,6 @@ contract AllocationManager is
330330
/// @inheritdoc IAllocationManager
331331
function createOperatorSets(address avs, CreateSetParams[] calldata params) external checkCanCall(avs) {
332332
for (uint256 i = 0; i < params.length; i++) {
333-
require(params[i].strategies.length <= MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH, MaxStrategiesExceeded());
334-
335333
OperatorSet memory operatorSet = OperatorSet(avs, params[i].operatorSetId);
336334

337335
// Create the operator set, ensuring it does not already exist
@@ -356,11 +354,6 @@ contract AllocationManager is
356354
OperatorSet memory operatorSet = OperatorSet(avs, operatorSetId);
357355
bytes32 operatorSetKey = operatorSet.key();
358356

359-
require(
360-
_operatorSetStrategies[operatorSetKey].length() + strategies.length <= MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH,
361-
MaxStrategiesExceeded()
362-
);
363-
364357
require(_operatorSets[avs].contains(operatorSet.id), InvalidOperatorSet());
365358

366359
for (uint256 i = 0; i < strategies.length; i++) {

src/contracts/core/AllocationManagerStorage.sol

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ abstract contract AllocationManagerStorage is IAllocationManager {
2323
/// @dev Index for flag that pauses operator register/deregister to operator sets when set.
2424
uint8 internal constant PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION = 2;
2525

26-
/// @dev Returns the maximum number of strategies an operator set can support.
27-
/// NOTE: 32 LST strategies + 1 beacon chain ETH strategy = 33 total strategies.
28-
uint8 internal constant MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH = 33;
29-
3026
// Immutables
3127

3228
/// @notice The DelegationManager contract for EigenLayer

src/contracts/interfaces/IAllocationManager.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ interface IAllocationManagerErrors {
1313
error InvalidWadToSlash();
1414
/// @dev Thrown when two array parameters have mismatching lengths.
1515
error InputArrayLengthMismatch();
16-
/// @dev Thrown when creating an operator set with more than max strategies.
17-
error MaxStrategiesExceeded();
1816

1917
/// Caller
2018

src/test/unit/AllocationManagerUnit.t.sol

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ contract AllocationManagerUnitTests is EigenLayerUnitTestSetup, IAllocationManag
1818
uint256 internal constant FUZZ_MAX_STRATS = 8;
1919
uint256 internal constant FUZZ_MAX_OP_SETS = 8;
2020

21-
uint8 internal constant MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH = 33;
2221
uint8 internal constant PAUSED_MODIFY_ALLOCATIONS = 0;
2322
uint8 internal constant PAUSED_OPERATOR_SLASHING = 1;
2423
uint8 internal constant PAUSED_OPERATOR_SET_REGISTRATION_AND_DEREGISTRATION = 2;
@@ -3481,29 +3480,6 @@ contract AllocationManagerUnitTests_addStrategiesToOperatorSet is AllocationMana
34813480
allocationManager.addStrategiesToOperatorSet(defaultAVS, defaultOperatorSet.id, defaultStrategies);
34823481
}
34833482

3484-
function test_addStrategiesToOperatorSet_MaxStrategiesExceeded() public {
3485-
cheats.startPrank(defaultAVS);
3486-
cheats.expectRevert(MaxStrategiesExceeded.selector);
3487-
allocationManager.addStrategiesToOperatorSet(
3488-
defaultAVS, defaultOperatorSet.id, new IStrategy[](MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH + 1)
3489-
);
3490-
3491-
for (uint256 i; i < MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH - 1; ++i) {
3492-
allocationManager.addStrategiesToOperatorSet(
3493-
defaultAVS,
3494-
defaultOperatorSet.id,
3495-
IStrategy(cheats.randomAddress()).toArray()
3496-
);
3497-
}
3498-
3499-
cheats.expectRevert(MaxStrategiesExceeded.selector);
3500-
allocationManager.addStrategiesToOperatorSet(
3501-
defaultAVS,
3502-
defaultOperatorSet.id,
3503-
IStrategy(cheats.randomAddress()).toArray()
3504-
);
3505-
}
3506-
35073483
function testFuzz_addStrategiesToOperatorSet_Correctness(
35083484
Randomness r
35093485
) public rand(r) {
@@ -3582,18 +3558,6 @@ contract AllocationManagerUnitTests_createOperatorSets is AllocationManagerUnitT
35823558
allocationManager.createOperatorSets(defaultAVS, CreateSetParams(defaultOperatorSet.id, defaultStrategies).toArray());
35833559
}
35843560

3585-
function testRevert_createOperatorSets_MaxStrategiesExceeded() public {
3586-
cheats.prank(defaultAVS);
3587-
cheats.expectRevert(MaxStrategiesExceeded.selector);
3588-
allocationManager.createOperatorSets(
3589-
defaultAVS,
3590-
CreateSetParams(
3591-
defaultOperatorSet.id,
3592-
new IStrategy[](MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH + 1)
3593-
).toArray()
3594-
);
3595-
}
3596-
35973561
function testFuzz_createOperatorSets_Correctness(
35983562
Randomness r
35993563
) public rand(r) {

0 commit comments

Comments
 (0)