Skip to content

Commit 169934b

Browse files
committed
refactor: remove max strats list
1 parent 1777a64 commit 169934b

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
@@ -327,8 +327,6 @@ contract AllocationManager is
327327
/// @inheritdoc IAllocationManager
328328
function createOperatorSets(address avs, CreateSetParams[] calldata params) external checkCanCall(avs) {
329329
for (uint256 i = 0; i < params.length; i++) {
330-
require(params[i].strategies.length <= MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH, MaxStrategiesExceeded());
331-
332330
OperatorSet memory operatorSet = OperatorSet(avs, params[i].operatorSetId);
333331

334332
// Create the operator set, ensuring it does not already exist
@@ -353,11 +351,6 @@ contract AllocationManager is
353351
OperatorSet memory operatorSet = OperatorSet(avs, operatorSetId);
354352
bytes32 operatorSetKey = operatorSet.key();
355353

356-
require(
357-
_operatorSetStrategies[operatorSetKey].length() + strategies.length <= MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH,
358-
MaxStrategiesExceeded()
359-
);
360-
361354
require(_operatorSets[avs].contains(operatorSet.id), InvalidOperatorSet());
362355

363356
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
@@ -14,8 +14,6 @@ interface IAllocationManagerErrors {
1414
error InvalidWadToSlash();
1515
/// @dev Thrown when two array parameters have mismatching lengths.
1616
error InputArrayLengthMismatch();
17-
/// @dev Thrown when creating an operator set with more than max strategies.
18-
error MaxStrategiesExceeded();
1917

2018
/// Caller
2119

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;
@@ -3313,29 +3312,6 @@ contract AllocationManagerUnitTests_addStrategiesToOperatorSet is AllocationMana
33133312
allocationManager.addStrategiesToOperatorSet(defaultAVS, defaultOperatorSet.id, defaultStrategies);
33143313
}
33153314

3316-
function test_addStrategiesToOperatorSet_MaxStrategiesExceeded() public {
3317-
cheats.startPrank(defaultAVS);
3318-
cheats.expectRevert(MaxStrategiesExceeded.selector);
3319-
allocationManager.addStrategiesToOperatorSet(
3320-
defaultAVS, defaultOperatorSet.id, new IStrategy[](MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH + 1)
3321-
);
3322-
3323-
for (uint256 i; i < MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH - 1; ++i) {
3324-
allocationManager.addStrategiesToOperatorSet(
3325-
defaultAVS,
3326-
defaultOperatorSet.id,
3327-
IStrategy(cheats.randomAddress()).toArray()
3328-
);
3329-
}
3330-
3331-
cheats.expectRevert(MaxStrategiesExceeded.selector);
3332-
allocationManager.addStrategiesToOperatorSet(
3333-
defaultAVS,
3334-
defaultOperatorSet.id,
3335-
IStrategy(cheats.randomAddress()).toArray()
3336-
);
3337-
}
3338-
33393315
function testFuzz_addStrategiesToOperatorSet_Correctness(
33403316
Randomness r
33413317
) public rand(r) {
@@ -3414,18 +3390,6 @@ contract AllocationManagerUnitTests_createOperatorSets is AllocationManagerUnitT
34143390
allocationManager.createOperatorSets(defaultAVS, CreateSetParams(defaultOperatorSet.id, defaultStrategies).toArray());
34153391
}
34163392

3417-
function testRevert_createOperatorSets_MaxStrategiesExceeded() public {
3418-
cheats.prank(defaultAVS);
3419-
cheats.expectRevert(MaxStrategiesExceeded.selector);
3420-
allocationManager.createOperatorSets(
3421-
defaultAVS,
3422-
CreateSetParams(
3423-
defaultOperatorSet.id,
3424-
new IStrategy[](MAX_OPERATOR_SET_STRATEGY_LIST_LENGTH + 1)
3425-
).toArray()
3426-
);
3427-
}
3428-
34293393
function testFuzz_createOperatorSets_Correctness(
34303394
Randomness r
34313395
) public rand(r) {

0 commit comments

Comments
 (0)