Esempio n. 1
0
        // NEW START
        ////////////////////////////////////////////
        // Pure functions
        //public static bool IsMinerAlgorithmAvaliable(List<Algorithm> algos, MinerBaseType minerBaseType, AlgorithmType algorithmType) {
        //    return algos.FindIndex((a) => a.MinerBaseType == minerBaseType && a.NiceHashID == algorithmType) > -1;
        //}

        public static string GetPathFor(MinerBaseType minerBaseType, AlgorithmType algoType, DeviceGroupType devGroupType) {
            switch (minerBaseType) {
                case MinerBaseType.ccminer:
                    return NVIDIA_GROUPS.ccminer_path(algoType, devGroupType);
                case MinerBaseType.sgminer:
                    return AMD_GROUP.sgminer_path(algoType);
                case MinerBaseType.nheqminer:
                    return Data.nheqminer;
                case MinerBaseType.ethminer:
                    return Data.ethminer;
                case MinerBaseType.Claymore:
                    return AMD_GROUP.ClaymorePath(algoType);
                case MinerBaseType.OptiminerAMD:
                    return Data.OptiminerZcashMiner;
                case MinerBaseType.excavator:
                    return Data.excavator;
                case MinerBaseType.XmrStackCPU:
                    return Data.XmrStackCPUMiner;
                case MinerBaseType.ccminer_alexis:
                    return NVIDIA_GROUPS.ccminer_unstable_path(algoType, devGroupType);
                case MinerBaseType.experimental:
                    return EXPERIMENTAL.GetPath(algoType, devGroupType);
                case MinerBaseType.EWBF:
                    return Data.EWBF;
            }
            return Data.NONE;
        }
Esempio n. 2
0
        public static string GetPathFor(MinerBaseType minerBaseType, AlgorithmType algoType, DeviceGroupType devGroupType, string devCodenameAMD, bool isOptimizedAMD, CPUExtensionType MostOptimizedCPUExtensionType)
        {
            switch (minerBaseType)
            {
            case MinerBaseType.cpuminer:
                return(CPU_GROUP.cpu_miner_opt(MostOptimizedCPUExtensionType));

            case MinerBaseType.ccminer:
                return(NVIDIA_GROUPS.ccminer_path(algoType, devGroupType));

            case MinerBaseType.sgminer:
                return(AMD_GROUP.sgminer_path(algoType, devCodenameAMD, isOptimizedAMD));

            case MinerBaseType.nheqminer:
                return(MinerPaths.nheqminer);

            case MinerBaseType.eqm:
                return(MinerPaths.eqm);

            case MinerBaseType.ethminer:
                return(MinerPaths.ethminer);

            case MinerBaseType.ClaymoreAMD:
                return(AMD_GROUP.ClaymorePath(algoType));

            case MinerBaseType.OptiminerAMD:
                return(MinerPaths.OptiminerZcashMiner);

            case MinerBaseType.excavator:
                return(MinerPaths.excavator);
            }
            return(MinerPaths.NONE);
        }
Esempio n. 3
0
        // NEW START
        ////////////////////////////////////////////
        // Pure functions
        //public static bool IsMinerAlgorithmAvaliable(List<Algorithm> algos, MinerBaseType minerBaseType, AlgorithmType algorithmType) {
        //    return algos.FindIndex((a) => a.MinerBaseType == minerBaseType && a.NiceHashID == algorithmType) > -1;
        //}

        public static string GetPathFor(MinerBaseType minerBaseType, AlgorithmType algoType, DeviceGroupType devGroupType, bool def = false)
        {
            if (!def & configurableMiners.Contains(minerBaseType))
            {
                // Override with internals
                var path = minerPathPackages.Find(p => p.DeviceType == devGroupType)
                           .MinerTypes.Find(p => p.Type == minerBaseType)
                           .Algorithms.Find(p => p.Algorithm == algoType);
                if (path != null)
                {
                    if (File.Exists(path.Path))
                    {
                        return(path.Path);
                    }
                    else
                    {
                        Helpers.ConsolePrint("PATHS", String.Format("Path {0} not found, using defaults", path.Path));
                    }
                }
            }
            switch (minerBaseType)
            {
            case MinerBaseType.ccminer:
                return(NVIDIA_GROUPS.ccminer_path(algoType, devGroupType));

            case MinerBaseType.sgminer:
                return(AMD_GROUP.sgminer_path(algoType));

            case MinerBaseType.nheqminer:
                return(Data.nheqminer);

            case MinerBaseType.ethminer:
                return(Data.ethminer);

            case MinerBaseType.Claymore:
                return(AMD_GROUP.ClaymorePath(algoType));

            case MinerBaseType.OptiminerAMD:
                return(Data.OptiminerZcashMiner);

            case MinerBaseType.excavator:
                return(Data.excavator);

            case MinerBaseType.XmrStackCPU:
                return(Data.XmrStackCPUMiner);

            case MinerBaseType.ccminer_alexis:
                return(NVIDIA_GROUPS.ccminer_unstable_path(algoType, devGroupType));

            case MinerBaseType.experimental:
                return(EXPERIMENTAL.GetPath(algoType, devGroupType));

            case MinerBaseType.EWBF:
                return(Data.EWBF);

            case MinerBaseType.Prospector:
                return(Data.prospector);
            }
            return(Data.NONE);
        }
Esempio n. 4
0
 public static string GetPath(AlgorithmType algoType, DeviceGroupType devGroupType)
 {
     if (devGroupType == DeviceGroupType.NVIDIA_6_x)
     {
         return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));
     }
     return(Data.NONE); // should not happen
 }
Esempio n. 5
0
        public static string GetOptimizedMinerPath(AlgorithmType algorithmType, DeviceType deviceType, DeviceGroupType deviceGroupType, string devCodename, bool isOptimized)
        {
            // special cases
            // AlgorithmType.DaggerHashimoto special shared case
            if (algorithmType == AlgorithmType.DaggerHashimoto &&
                (deviceType == DeviceType.AMD || deviceType == DeviceType.NVIDIA))
            {
                return(MinerPaths.ethminer);
            }
            // AlgorithmType.Equihash special shared case
            if (algorithmType == AlgorithmType.Equihash)
            {
                if (deviceGroupType == DeviceGroupType.NVIDIA_5_x || deviceGroupType == DeviceGroupType.NVIDIA_6_x ||
                    (MinersManager.EquihashCPU_USE_eqm() && DeviceGroupType.CPU == deviceGroupType))
                {
                    return(MinerPaths.eqm);
                }
                else if (deviceType == DeviceType.AMD && ConfigManager.GeneralConfig.Use3rdPartyMiners == Use3rdPartyMiners.YES)    // TODO remove state
                {
                    return(MinerPaths.ClaymoreZcashMiner);
                }
                else   // supports all DeviceTypes
                {
                    return(MinerPaths.nheqminer);
                }
            }
            // normal stuff
            // CPU
            if (deviceType == DeviceType.CPU)
            {
                return(CPU_GROUP.cpu_miner_opt(CPUUtils.GetMostOptimized()));
            }
            // NVIDIA
            if (deviceType == DeviceType.NVIDIA)
            {
                var nvidiaGroup = deviceGroupType;
                // sm21 and sm3x have same settings
                if (nvidiaGroup == DeviceGroupType.NVIDIA_2_1 || nvidiaGroup == DeviceGroupType.NVIDIA_3_x)
                {
                    return(NVIDIA_GROUPS.ccminer_sm21_or_sm3x(algorithmType));
                }
                // sm5x and sm6x have same settings
                if (nvidiaGroup == DeviceGroupType.NVIDIA_5_x || nvidiaGroup == DeviceGroupType.NVIDIA_6_x)
                {
                    return(NVIDIA_GROUPS.ccminer_sm5x_or_sm6x(algorithmType));
                }
            }
            // AMD
            if (deviceType == DeviceType.AMD)
            {
                return(AMD_GROUP.sgminer_path(algorithmType, devCodename, isOptimized));
            }

            return(NONE);
        }
Esempio n. 6
0
 public static string ccminer_path(AlgorithmType algorithmType, DeviceGroupType nvidiaGroup) {
     // sm21 and sm3x have same settings
     if (nvidiaGroup == DeviceGroupType.NVIDIA_2_1 || nvidiaGroup == DeviceGroupType.NVIDIA_3_x) {
         return NVIDIA_GROUPS.ccminer_sm21_or_sm3x(algorithmType);
     }
     // sm5x and sm6x have same settings
     if (nvidiaGroup == DeviceGroupType.NVIDIA_5_x || nvidiaGroup == DeviceGroupType.NVIDIA_6_x) {
         return NVIDIA_GROUPS.ccminer_sm5x_or_sm6x(algorithmType);
     }
     // TODO wrong case?
     return Data.NONE; // should not happen
 }
Esempio n. 7
0
 public static string ccminer_path(AlgorithmType algorithmType, DeviceGroupType nvidiaGroup)
 {
     // sm21 and sm3x have same settings
     if (nvidiaGroup == DeviceGroupType.NVIDIA_2_1 || nvidiaGroup == DeviceGroupType.NVIDIA_3_x)
     {
         return(NVIDIA_GROUPS.ccminer_sm21_or_sm3x(algorithmType));
     }
     // CN exception
     if (nvidiaGroup == DeviceGroupType.NVIDIA_6_x && algorithmType == AlgorithmType.CryptoNight)
     {
         return(Data.ccminer_tpruvot);
     }
     // sm5x and sm6x have same settings otherwise
     if (nvidiaGroup == DeviceGroupType.NVIDIA_5_x || nvidiaGroup == DeviceGroupType.NVIDIA_6_x)
     {
         return(NVIDIA_GROUPS.ccminer_sm5x_or_sm6x(algorithmType));
     }
     // TODO wrong case?
     return(Data.NONE); // should not happen
 }
Esempio n. 8
0
        // NEW START
        ////////////////////////////////////////////
        // Pure functions
        //public static bool IsMinerAlgorithmAvaliable(List<Algorithm> algos, MinerBaseType minerBaseType, AlgorithmType algorithmType) {
        //    return algos.FindIndex((a) => a.MinerBaseType == minerBaseType && a.NiceHashID == algorithmType) > -1;
        //}

        public static string GetPathFor(MinerBaseType minerBaseType, AlgorithmType algoType, DeviceGroupType devGroupType, bool def = false)
        {
            if (!def & configurableMiners.Contains(minerBaseType))
            {
                // Override with internals
                var path = minerPathPackages.Find(p => p.DeviceType == devGroupType)
                           .MinerTypes.Find(p => p.Type == minerBaseType)
                           .Algorithms.Find(p => p.Algorithm == algoType);
                if (path != null)
                {
                    if (File.Exists(path.Path))
                    {
                        return(path.Path);
                    }
                    else
                    {
                        Helpers.ConsolePrint("PATHS", String.Format("Path {0} not found, using defaults", path.Path));
                    }
                }
            }
            switch (minerBaseType)
            {
            case MinerBaseType.ccminer:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_22:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_alexis_hsr:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_alexis78:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_klaust818:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_palgin:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_polytimos:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_skunkkrnlx:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_xevan:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_tpruvot2:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.sgminer:
                return(AMD_GROUP.Sgminer_path(algoType));

            case MinerBaseType.GatelessGate:
                return(AMD_GROUP.Glg_path(algoType));

            case MinerBaseType.nheqminer:
                return(Data.nheqminer);

            case MinerBaseType.ethminer:
                return(Data.ethminer);

            case MinerBaseType.Claymore:
                return(AMD_GROUP.ClaymorePath(algoType));

            case MinerBaseType.OptiminerAMD:
                return(Data.OptiminerZcashMiner);

            case MinerBaseType.excavator:
                return(Data.excavator);

            case MinerBaseType.XmrStackCPU:
                return(Data.XmrStackCPUMiner);

            case MinerBaseType.ccminer_alexis:
                return(NVIDIA_GROUPS.Ccminer_unstable_path(algoType, devGroupType));

            case MinerBaseType.experimental:
                return(EXPERIMENTAL.GetPath(algoType, devGroupType));

            case MinerBaseType.EWBF:
                return(Data.EWBF);

            case MinerBaseType.DSTM:
                return(Data.DSTM);

            case MinerBaseType.Prospector:
                return(Data.prospector);

            case MinerBaseType.Xmrig:
                return(Data.Xmrig);

            case MinerBaseType.XmrStakAMD:
                return(Data.XmrStakAMD);

            case MinerBaseType.Claymore_old:
                return(Data.ClaymoreCryptoNightMiner_old);

            case MinerBaseType.hsrneoscrypt:
                return(NVIDIA_GROUPS.Hsrneoscrypt_path(algoType, devGroupType));

                //case MinerBaseType.mkxminer:
                //return Data.mkxminer;
            }
            return(Data.NONE);
        }
Esempio n. 9
0
        // NEW START
        ////////////////////////////////////////////
        // Pure functions
        //public static bool IsMinerAlgorithmAvaliable(List<Algorithm> algos, MinerBaseType minerBaseType, AlgorithmType algorithmType) {
        //    return algos.FindIndex((a) => a.MinerBaseType == minerBaseType && a.CryptoMiner937ID == algorithmType) > -1;
        //}
        /// <summary>
        /// The GetPathFor
        /// </summary>
        /// <param name="minerBaseType">The <see cref="MinerBaseType"/></param>
        /// <param name="algoType">The <see cref="AlgorithmType"/></param>
        /// <param name="devGroupType">The <see cref="DeviceGroupType"/></param>
        /// <param name="def">The <see cref="bool"/></param>
        /// <returns>The <see cref="string"/></returns>
        public static string GetPathFor(MinerBaseType minerBaseType, AlgorithmType algoType, DeviceGroupType devGroupType, CPUExtensionType MostOptimizedCPUExtensionType, bool def = false)
        {
            if (!def & configurableMiners.Contains(minerBaseType))
            {
                // Override with internals
                var path = minerPathPackages.Find(p => p.DeviceType == devGroupType)
                           .MinerTypes.Find(p => p.Type == minerBaseType)
                           .Algorithms.Find(p => p.Algorithm == algoType);
                if (path != null)
                {
                    if (File.Exists(path.Path))
                    {
                        return(path.Path);
                    }
                    else
                    {
                        Helpers.ConsolePrint("PATHS", String.Format("Path {0} not found, using defaults", path.Path));
                    }
                }
            }
            switch (minerBaseType)
            {
            case MinerBaseType.cpuminer:
                return(CPU_GROUP.cpu_miner_opt(MostOptimizedCPUExtensionType));

            case MinerBaseType.ccminer:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.ccminer_tpruvot2:
                return(NVIDIA_GROUPS.Ccminer_path(algoType, devGroupType));

            case MinerBaseType.sgminer:
                return(AMD_GROUP.Sgminer_path(algoType));

            case MinerBaseType.GatelessGate:
                return(AMD_GROUP.Glg_path(algoType));

            case MinerBaseType.Claymore:
                return(AMD_GROUP.ClaymorePath(algoType));

            case MinerBaseType.OptiminerAMD:
                return(Data.OptiminerZcashMiner);

            case MinerBaseType.experimental:
                return(EXPERIMENTAL.GetPath(algoType, devGroupType));

            case MinerBaseType.CPU_XMRig:
                return(Data.CPU_XMRig);

            case MinerBaseType.CPU_XMRigUPX:
                return(Data.CPU_XMRigUPX);

            case MinerBaseType.CPU_RKZ:
                return(Data.CPU_RKZ);

            case MinerBaseType.CPU_rplant:
                return(Data.CPU_rplant);

            case MinerBaseType.CPU_nosuch:
                return(Data.CPU_nosuch);

            case MinerBaseType.trex:
                return(NVIDIA_GROUPS.trex(algoType, devGroupType));

            case MinerBaseType.MiniZ:
                return(NVIDIA_GROUPS.MiniZ(algoType, devGroupType));

            case MinerBaseType.ZEnemy:
                return(NVIDIA_GROUPS.ZEnemy(algoType, devGroupType));

            case MinerBaseType.CryptoDredge:
                return(NVIDIA_GROUPS.CryptoDredge(algoType, devGroupType));

            case MinerBaseType.CPU_verium:
                return(Data.CPU_verium);
            }
            return(Data.NONE);
        }