@@ -1938,7 +1938,6 @@ contract SlashingRegistryCoordinator_RegisterWithChurn is
1938
1938
}
1939
1939
1940
1940
/// @dev Asserts that an operator cannot be churned out if it is not registered for the quorum
1941
- /// @dev We register the operator to kick in quorum 2 so that it is still registered after deregistration
1942
1941
function test_registerOperatorWithChurn_revert_notRegisteredForQuorum () public {
1943
1942
_setOperatorWeight (testOperator.key.addr, registeringStake);
1944
1943
_setOperatorWeight (operatorToKick.key.addr, operatorToKickStake);
@@ -1949,6 +1948,12 @@ contract SlashingRegistryCoordinator_RegisterWithChurn is
1949
1948
strategyParams[0 ] =
1950
1949
IStakeRegistryTypes.StrategyParams ({strategy: mockStrategy, multiplier: 1 ether });
1951
1950
1951
+ operatorSetParams = ISlashingRegistryCoordinatorTypes.OperatorSetParam ({
1952
+ maxOperatorCount: 1 ,
1953
+ kickBIPsOfOperatorStake: 5000 ,
1954
+ kickBIPsOfTotalStake: 5000
1955
+ });
1956
+
1952
1957
vm.startPrank (proxyAdminOwner);
1953
1958
slashingRegistryCoordinator.createTotalDelegatedStakeQuorum (
1954
1959
operatorSetParams,
@@ -1957,38 +1962,24 @@ contract SlashingRegistryCoordinator_RegisterWithChurn is
1957
1962
);
1958
1963
vm.stopPrank ();
1959
1964
1960
- // Register the operatorToKick in the new quorum
1961
- uint32 [] memory operatorSetIds = new uint32 [](1 );
1962
- operatorSetIds[0 ] = 2 ;
1963
- registerOperatorInSlashingRegistryCoordinator (operatorToKick, "socket:8545 " , operatorSetIds);
1965
+ // Register extra operator in the new quorum
1966
+ registerOperatorInSlashingRegistryCoordinator (extraOperator1, "socket:8545 " , uint32 (2 ));
1964
1967
1965
- // Deregister the operatorToKick from quorum 1
1966
- IAllocationManagerTypes.DeregisterParams memory deregisterParams = IAllocationManagerTypes
1967
- .DeregisterParams ({
1968
- operator: operatorToKick.key.addr,
1969
- avs: address (serviceManager),
1970
- operatorSetIds: operatorSetIds
1971
- });
1972
-
1973
- vm.prank (operatorToKick.key.addr);
1974
- IAllocationManager (coreDeployment.allocationManager).deregisterFromOperatorSets (
1975
- deregisterParams
1976
- );
1977
1968
1978
- // Try to churn the operator
1969
+ // Setup churn data
1979
1970
ISlashingRegistryCoordinatorTypes.OperatorKickParam[] memory operatorKickParams =
1980
1971
new ISlashingRegistryCoordinatorTypes.OperatorKickParam [](quorumNumbers.length );
1981
1972
operatorKickParams[0 ] = ISlashingRegistryCoordinatorTypes.OperatorKickParam ({
1982
1973
operator: operatorToKick.key.addr,
1983
- quorumNumber: uint8 (quorumNumbers[ 0 ])
1974
+ quorumNumber: uint8 (2 ) // 3rd quorum
1984
1975
});
1985
1976
1986
1977
ISignatureUtilsMixinTypes.SignatureWithSaltAndExpiry memory churnApproverSignature =
1987
1978
_signChurnApproval (
1988
1979
testOperator.key.addr,
1989
1980
testOperatorId,
1990
1981
operatorKickParams,
1991
- bytes32 (uint256 (3 )), // Different salt from previous tests
1982
+ bytes32 (uint256 (4 )),
1992
1983
defaultExpiry
1993
1984
);
1994
1985
@@ -1998,7 +1989,7 @@ contract SlashingRegistryCoordinator_RegisterWithChurn is
1998
1989
IAllocationManagerTypes.RegisterParams memory registerParams = IAllocationManagerTypes
1999
1990
.RegisterParams ({
2000
1991
avs: address (serviceManager),
2001
- operatorSetIds: new uint32 [](quorumNumbers. length ),
1992
+ operatorSetIds: new uint32 [](1 ),
2002
1993
data: abi.encode (
2003
1994
ISlashingRegistryCoordinatorTypes.RegistrationType.CHURN,
2004
1995
"socket:8545 " ,
@@ -2008,9 +1999,7 @@ contract SlashingRegistryCoordinator_RegisterWithChurn is
2008
1999
)
2009
2000
});
2010
2001
2011
- for (uint256 i = 0 ; i < quorumNumbers.length ; i++ ) {
2012
- registerParams.operatorSetIds[i] = uint8 (quorumNumbers[i]);
2013
- }
2002
+ registerParams.operatorSetIds[0 ] = uint32 (2 );
2014
2003
2015
2004
vm.prank (testOperator.key.addr);
2016
2005
vm.expectRevert (abi.encodeWithSignature ("OperatorNotRegisteredForQuorum() " ));
0 commit comments