From cbbf7cafaea94694bc3ac907997d16456f1fa61e Mon Sep 17 00:00:00 2001 From: coinevo Date: Tue, 10 Mar 2020 09:38:51 +0100 Subject: [PATCH 1/2] added coinevo --- xmrstak/backend/amd/amd_gpu/gpu.cpp | 7 + .../opencl/RandomX/randomx_constants_evo.h | 98 ++++++++++++++ .../backend/cpu/crypto/cryptonight_aesni.h | 2 + xmrstak/backend/cpu/minethd.cpp | 23 +++- xmrstak/backend/cryptonight.hpp | 15 ++- .../nvidia/RandomX_Coinevo/configuration.h | 125 ++++++++++++++++++ .../nvidia/RandomX_Coinevo/randomx_coinevo.cu | 32 +++++ xmrstak/backend/nvidia/minethd.cpp | 5 +- .../backend/nvidia/nvcc_code/cryptonight.hpp | 1 + xmrstak/jconf.cpp | 6 +- xmrstak/pools.tpl | 5 +- 11 files changed, 309 insertions(+), 10 deletions(-) create mode 100644 xmrstak/backend/amd/amd_gpu/opencl/RandomX/randomx_constants_evo.h create mode 100644 xmrstak/backend/nvidia/RandomX_Coinevo/configuration.h create mode 100644 xmrstak/backend/nvidia/RandomX_Coinevo/randomx_coinevo.cu diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index c15b1cb4d..bee4b8bbc 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -865,6 +865,8 @@ size_t InitOpenCLGpu(cl_context opencl_ctx, GpuContext* ctx, const char* source_ rx_conf = &RandomX_MoneroConfig; else if(miner_algo == randomX_arqma) rx_conf = &RandomX_ArqmaConfig; + else if(miner_algo == randomX_evo) + rx_conf = &RandomX_CoinevoConfig; const uint32_t rx_parameters = (PowerOf2(rx_conf->ScratchpadL1_Size) << 0) | @@ -1192,6 +1194,9 @@ size_t InitOpenCL(GpuContext* ctx, size_t num_gpus, size_t platform_idx) const char* randomx_constants_arqma_h = #include "./opencl/RandomX/randomx_constants_arqma.h" ; + const char* randomx_constants_evo_h = + #include "./opencl/RandomX/randomx_constants_evo.h" + ; const char* aesCL = #include "./opencl/RandomX/aes.cl" ; @@ -1219,6 +1224,8 @@ size_t InitOpenCL(GpuContext* ctx, size_t num_gpus, size_t platform_idx) source_code.append(randomx_constants_monero_h); else if(user_algo == randomX_arqma) source_code.append(randomx_constants_arqma_h); + else if(user_algo == randomX_evo) + source_code.append(randomx_constants_evo_h); source_code.append(std::regex_replace(aesCL, std::regex("#include \"fillAes1Rx4.cl\""), fillAes1Rx4CL)); source_code.append(std::regex_replace(blake2bCL, std::regex("#include \"blake2b_double_block.cl\""), blake2b_double_blockCL)); diff --git a/xmrstak/backend/amd/amd_gpu/opencl/RandomX/randomx_constants_evo.h b/xmrstak/backend/amd/amd_gpu/opencl/RandomX/randomx_constants_evo.h new file mode 100644 index 000000000..7a0bd65f0 --- /dev/null +++ b/xmrstak/backend/amd/amd_gpu/opencl/RandomX/randomx_constants_evo.h @@ -0,0 +1,98 @@ +R"===( +/* +Copyright (c) 2019 SChernykh + +This file is part of RandomX OpenCL. + +RandomX OpenCL is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +RandomX OpenCL is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with RandomX OpenCL. If not, see . +*/ + +//Dataset base size in bytes. Must be a power of 2. +#define RANDOMX_DATASET_BASE_SIZE 2147483648 + +//Dataset extra size. Must be divisible by 64. +#define RANDOMX_DATASET_EXTRA_SIZE 33554368 + +//Scratchpad L3 size in bytes. Must be a power of 2. +#define RANDOMX_SCRATCHPAD_L3 2097152 + +//Scratchpad L2 size in bytes. Must be a power of two and less than or equal to RANDOMX_SCRATCHPAD_L3. +#define RANDOMX_SCRATCHPAD_L2 262144 + +//Scratchpad L1 size in bytes. Must be a power of two (minimum 64) and less than or equal to RANDOMX_SCRATCHPAD_L2. +#define RANDOMX_SCRATCHPAD_L1 16384 + +//Jump condition mask size in bits. +#define RANDOMX_JUMP_BITS 8 + +//Jump condition mask offset in bits. The sum of RANDOMX_JUMP_BITS and RANDOMX_JUMP_OFFSET must not exceed 16. +#define RANDOMX_JUMP_OFFSET 8 + +//Integer instructions +#define RANDOMX_FREQ_IADD_RS 16 +#define RANDOMX_FREQ_IADD_M 7 +#define RANDOMX_FREQ_ISUB_R 16 +#define RANDOMX_FREQ_ISUB_M 7 +#define RANDOMX_FREQ_IMUL_R 16 +#define RANDOMX_FREQ_IMUL_M 4 +#define RANDOMX_FREQ_IMULH_R 4 +#define RANDOMX_FREQ_IMULH_M 1 +#define RANDOMX_FREQ_ISMULH_R 4 +#define RANDOMX_FREQ_ISMULH_M 1 +#define RANDOMX_FREQ_IMUL_RCP 8 +#define RANDOMX_FREQ_INEG_R 2 +#define RANDOMX_FREQ_IXOR_R 15 +#define RANDOMX_FREQ_IXOR_M 5 +#define RANDOMX_FREQ_IROR_R 8 +#define RANDOMX_FREQ_IROL_R 2 +#define RANDOMX_FREQ_ISWAP_R 4 + +//Floating point instructions +#define RANDOMX_FREQ_FSWAP_R 4 +#define RANDOMX_FREQ_FADD_R 16 +#define RANDOMX_FREQ_FADD_M 5 +#define RANDOMX_FREQ_FSUB_R 16 +#define RANDOMX_FREQ_FSUB_M 5 +#define RANDOMX_FREQ_FSCAL_R 6 +#define RANDOMX_FREQ_FMUL_R 32 +#define RANDOMX_FREQ_FDIV_M 4 +#define RANDOMX_FREQ_FSQRT_R 6 + +//Control instructions +#define RANDOMX_FREQ_CBRANCH 25 +#define RANDOMX_FREQ_CFROUND 1 + +//Store instruction +#define RANDOMX_FREQ_ISTORE 16 + +//No-op instruction +#define RANDOMX_FREQ_NOP 0 + +#define RANDOMX_DATASET_ITEM_SIZE 64 + +#define RANDOMX_PROGRAM_SIZE 256 + +#define HASH_SIZE 64 +#define ENTROPY_SIZE (128 + RANDOMX_PROGRAM_SIZE * 8) +#define REGISTERS_SIZE 256 +#define IMM_BUF_SIZE (RANDOMX_PROGRAM_SIZE * 4 - REGISTERS_SIZE) +#define IMM_INDEX_COUNT ((IMM_BUF_SIZE / 4) - 2) +#define VM_STATE_SIZE (REGISTERS_SIZE + IMM_BUF_SIZE + RANDOMX_PROGRAM_SIZE * 4) +#define ROUNDING_MODE (RANDOMX_FREQ_CFROUND ? -1 : 0) + +// Scratchpad L1/L2/L3 bits +#define LOC_L1 (32 - 14) +#define LOC_L2 (32 - 18) +#define LOC_L3 (32 - 21) +)===" diff --git a/xmrstak/backend/cpu/crypto/cryptonight_aesni.h b/xmrstak/backend/cpu/crypto/cryptonight_aesni.h index 10b590bf0..05c189083 100644 --- a/xmrstak/backend/cpu/crypto/cryptonight_aesni.h +++ b/xmrstak/backend/cpu/crypto/cryptonight_aesni.h @@ -150,6 +150,8 @@ struct RandomX_generator randomx_apply_config(RandomX_WowneroConfig); else if(ALGO == randomX_arqma) randomx_apply_config(RandomX_ArqmaConfig); + else if(ALGO == randomX_evo) + randomx_apply_config(RandomX_CoinevoConfig); } for(size_t i = 0; i < N; i++) diff --git a/xmrstak/backend/cpu/minethd.cpp b/xmrstak/backend/cpu/minethd.cpp index b1e5a0497..847ee73b4 100644 --- a/xmrstak/backend/cpu/minethd.cpp +++ b/xmrstak/backend/cpu/minethd.cpp @@ -339,6 +339,18 @@ bool minethd::self_test() ctx[0]->hash_fn("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74", 44, out, ctx, algo); bResult = bResult && memcmp(out, "\x96\xd5\x33\x16\x7f\x33\xeb\x37\xc7\xc5\x44\xae\xc8\x55\x96\x62\x09\x59\xc1\xfe\xb8\xca\x5c\x40\x37\x06\x07\x64\x60\xab\x86\xec", 32) == 0; } + else if(algo == POW(randomX_evo)) + { + printer::inst()->print_msg(L0, "start self test for 'randomx_evo' (can be disabled with the command line option '--noTest')"); + minethd::cn_on_new_job set_job; + func_multi_selector<1>(ctx, set_job, ::jconf::inst()->HaveHardwareAes(), algo); + miner_work work; + work.iBlockHeight = 1806260; + work.seed_hash[0] = 1; + set_job(work, ctx); + ctx[0]->hash_fn("\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74\x20\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x74\x65\x73\x74", 44, out, ctx, algo); + bResult = bResult && memcmp(out, "\x82\xec\x9f\x7a\x8d\x40\x56\xd9\x71\xd0\x3e\xd9\x88\x78\x90\xad\xa4\x16\xa4\xe8\x28\xfd\x5f\x5e\x10\xbf\xdc\x6b\x83\x66\x64\xbb", 32) == 0; + } else { printer::inst()->print_msg(L0, @@ -468,6 +480,9 @@ void minethd::func_multi_selector(cryptonight_ctx** ctx, minethd::cn_on_new_job& case randomX_arqma: algv = 3; break; + case randomX_evo: + algv = 4; + break; default: algv = 0; break; @@ -488,7 +503,11 @@ void minethd::func_multi_selector(cryptonight_ctx** ctx, minethd::cn_on_new_job& //arqma RandomX_hash::template hash, - RandomX_hash::template hash + RandomX_hash::template hash, + + //evo + RandomX_hash::template hash, + RandomX_hash::template hash }; std::bitset<1> digit; @@ -504,6 +523,8 @@ void minethd::func_multi_selector(cryptonight_ctx** ctx, minethd::cn_on_new_job& {randomX_loki, RandomX_generator::template cn_on_new_job}, {randomX_wow, RandomX_generator::template cn_on_new_job}, {randomX_arqma, RandomX_generator::template cn_on_new_job} + {randomX_evo, RandomX_generator::template cn_on_new_job} + }; auto it = on_new_job_map.find(algo.Id()); diff --git a/xmrstak/backend/cryptonight.hpp b/xmrstak/backend/cryptonight.hpp index 02bef121c..752cc5bbd 100644 --- a/xmrstak/backend/cryptonight.hpp +++ b/xmrstak/backend/cryptonight.hpp @@ -13,7 +13,8 @@ enum xmrstak_algo_id randomX = 1, randomX_loki = 2, randomX_wow = 3, - randomX_arqma = 4 + randomX_arqma = 4, + randomX_evo = 5 //cryptonight_turtle = start_derived_algo_id, // please add the algorithm name to get_algo_name() @@ -25,13 +26,15 @@ enum xmrstak_algo_id */ inline std::string get_algo_name(xmrstak_algo_id algo_id) { - static std::array base_algo_names = + static std::array base_algo_names = {{ "invalid_algo", "randomx", "randomx_loki", "randomx_wow", - "randomx_arqma" + "randomx_arqma", + "randomx_evo" + }}; static std::array derived_algo_names = @@ -140,12 +143,14 @@ constexpr uint32_t RX_ARQMA_ITER = 0x10000; inline xmrstak_algo POW(xmrstak_algo_id algo_id) { - static std::array pow = {{ + static std::array pow = {{ {invalid_algo}, {randomX, randomX, _2MiB, _256KiB, _16KiB}, {randomX_loki, randomX_loki, _2MiB, _256KiB, _16KiB}, {randomX_wow, randomX_wow, _2MiB/2, _256KiB/2, _16KiB}, - {randomX_arqma, randomX_arqma, _2MiB/8, _256KiB/2, _16KiB} + {randomX_arqma, randomX_arqma, _2MiB/8, _256KiB/2, _16KiB}, + {randomX_evo, randomX_evo, _2MiB, _256KiB, _16KiB}, + }}; return pow[algo_id]; diff --git a/xmrstak/backend/nvidia/RandomX_Coinevo/configuration.h b/xmrstak/backend/nvidia/RandomX_Coinevo/configuration.h new file mode 100644 index 000000000..034d37ed5 --- /dev/null +++ b/xmrstak/backend/nvidia/RandomX_Coinevo/configuration.h @@ -0,0 +1,125 @@ +/* +Copyright (c) 2018-2019, tevador + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#pragma once + +//Cache size in KiB. Must be a power of 2. +#define RANDOMX_ARGON_MEMORY 262144 + +//Number of Argon2d iterations for Cache initialization. +#define RANDOMX_ARGON_ITERATIONS 3 + +//Number of parallel lanes for Cache initialization. +#define RANDOMX_ARGON_LANES 1 + +//Argon2d salt +#define RANDOMX_ARGON_SALT "RandomEVO\x08" + +//Number of random Cache accesses per Dataset item. Minimum is 2. +#define RANDOMX_CACHE_ACCESSES 8 + +//Target latency for SuperscalarHash (in cycles of the reference CPU). +#define RANDOMX_SUPERSCALAR_LATENCY 170 + +//Dataset base size in bytes. Must be a power of 2. +#define RANDOMX_DATASET_BASE_SIZE 2147483648 + +//Dataset extra size. Must be divisible by 64. +#define RANDOMX_DATASET_EXTRA_SIZE 33554368 + +//Number of instructions in a RandomX program. Must be divisible by 8. +#define RANDOMX_PROGRAM_SIZE 256 + +//Number of iterations during VM execution. +#define RANDOMX_PROGRAM_ITERATIONS 2048 + +//Number of chained VM executions per hash. +#define RANDOMX_PROGRAM_COUNT 8 + +//Scratchpad L3 size in bytes. Must be a power of 2. +#define RANDOMX_SCRATCHPAD_L3 2097152 + +//Scratchpad L2 size in bytes. Must be a power of two and less than or equal to RANDOMX_SCRATCHPAD_L3. +#define RANDOMX_SCRATCHPAD_L2 262144 + +//Scratchpad L1 size in bytes. Must be a power of two (minimum 64) and less than or equal to RANDOMX_SCRATCHPAD_L2. +#define RANDOMX_SCRATCHPAD_L1 16384 + +//Jump condition mask size in bits. +#define RANDOMX_JUMP_BITS 8 + +//Jump condition mask offset in bits. The sum of RANDOMX_JUMP_BITS and RANDOMX_JUMP_OFFSET must not exceed 16. +#define RANDOMX_JUMP_OFFSET 8 + +/* +Instruction frequencies (per 256 opcodes) +Total sum of frequencies must be 256 +*/ + +//Integer instructions +#define RANDOMX_FREQ_IADD_RS 16 +#define RANDOMX_FREQ_IADD_M 7 +#define RANDOMX_FREQ_ISUB_R 16 +#define RANDOMX_FREQ_ISUB_M 7 +#define RANDOMX_FREQ_IMUL_R 16 +#define RANDOMX_FREQ_IMUL_M 4 +#define RANDOMX_FREQ_IMULH_R 4 +#define RANDOMX_FREQ_IMULH_M 1 +#define RANDOMX_FREQ_ISMULH_R 4 +#define RANDOMX_FREQ_ISMULH_M 1 +#define RANDOMX_FREQ_IMUL_RCP 8 +#define RANDOMX_FREQ_INEG_R 2 +#define RANDOMX_FREQ_IXOR_R 15 +#define RANDOMX_FREQ_IXOR_M 5 +#define RANDOMX_FREQ_IROR_R 8 +#define RANDOMX_FREQ_IROL_R 2 +#define RANDOMX_FREQ_ISWAP_R 4 + +//Floating point instructions +#define RANDOMX_FREQ_FSWAP_R 4 +#define RANDOMX_FREQ_FADD_R 16 +#define RANDOMX_FREQ_FADD_M 5 +#define RANDOMX_FREQ_FSUB_R 16 +#define RANDOMX_FREQ_FSUB_M 5 +#define RANDOMX_FREQ_FSCAL_R 6 +#define RANDOMX_FREQ_FMUL_R 32 +#define RANDOMX_FREQ_FDIV_M 4 +#define RANDOMX_FREQ_FSQRT_R 6 + +//Control instructions +#define RANDOMX_FREQ_CBRANCH 25 +#define RANDOMX_FREQ_CFROUND 1 + +//Store instruction +#define RANDOMX_FREQ_ISTORE 16 + +//No-op instruction +#define RANDOMX_FREQ_NOP 0 +/* ------ + 256 +*/ diff --git a/xmrstak/backend/nvidia/RandomX_Coinevo/randomx_coinevo.cu b/xmrstak/backend/nvidia/RandomX_Coinevo/randomx_coinevo.cu new file mode 100644 index 000000000..10e793805 --- /dev/null +++ b/xmrstak/backend/nvidia/RandomX_Coinevo/randomx_coinevo.cu @@ -0,0 +1,32 @@ +/* +Copyright (c) 2019 SChernykh + +This file is part of RandomX CUDA. + +RandomX CUDA is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +RandomX CUDA is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with RandomX CUDA. If not, see. +*/ + +#include +#include +#include +#include +#include +#include "xmrstak/backend/nvidia/nvcc_code/cryptonight.hpp" +#include "../nvcc_code/cuda_device.hpp" + +namespace RandomX_Coinevo { + #include "configuration.h" + #define fillAes4Rx4 fillAes4Rx4_v104 + #include "../RandomX/common.hpp" +} diff --git a/xmrstak/backend/nvidia/minethd.cpp b/xmrstak/backend/nvidia/minethd.cpp index f4a9844c8..fec894e68 100644 --- a/xmrstak/backend/nvidia/minethd.cpp +++ b/xmrstak/backend/nvidia/minethd.cpp @@ -302,7 +302,10 @@ void minethd::work_main() { RandomX_Arqma::hash(&ctx, iNonce, oWork.iTarget, &foundCount, foundNonce, h_per_round); } - + else if(miner_algo == randomX_evo) + { + RandomX_Coinevo::hash(&ctx, iNonce, oWork.iTarget, &foundCount, foundNonce, h_per_round); + } for(size_t i = 0; i < foundCount; i++) diff --git a/xmrstak/backend/nvidia/nvcc_code/cryptonight.hpp b/xmrstak/backend/nvidia/nvcc_code/cryptonight.hpp index 985054310..a1037f768 100644 --- a/xmrstak/backend/nvidia/nvcc_code/cryptonight.hpp +++ b/xmrstak/backend/nvidia/nvcc_code/cryptonight.hpp @@ -64,4 +64,5 @@ namespace RandomX_Monero { void hash(nvid_ctx *ctx, uint32_t nonce, uint64_t ta namespace RandomX_Wownero { void hash(nvid_ctx *ctx, uint32_t nonce, uint64_t target, uint32_t *rescount, uint32_t *resnonce, uint32_t batch_size); } namespace RandomX_Loki { void hash(nvid_ctx *ctx, uint32_t nonce, uint64_t target, uint32_t *rescount, uint32_t *resnonce, uint32_t batch_size); } namespace RandomX_Arqma { void hash(nvid_ctx *ctx, uint32_t nonce, uint64_t target, uint32_t *rescount, uint32_t *resnonce, uint32_t batch_size); } +namespace RandomX_Coinevo { void hash(nvid_ctx *ctx, uint32_t nonce, uint64_t target, uint32_t *rescount, uint32_t *resnonce, uint32_t batch_size); } diff --git a/xmrstak/jconf.cpp b/xmrstak/jconf.cpp index c4ef358fb..d9fc13cd2 100644 --- a/xmrstak/jconf.cpp +++ b/xmrstak/jconf.cpp @@ -109,6 +109,10 @@ xmrstak::coin_selection coins[] = { {"randomx_loki", {POW(randomX_loki)}, {POW(randomX_loki)}, nullptr}, {"randomx_wow", {POW(randomX_wow)}, {POW(randomX_wow)}, nullptr}, {"wownero", {POW(randomX_wow)}, {POW(randomX_wow)}, nullptr} + {"randomx_evo", {POW(randomX_evo)}, {POW(randomX_evo)}, nullptr}, + {"coinevo", {POW(randomX_evo)}, {POW(randomX_evo)}, nullptr}, + + }; constexpr size_t coin_algo_size = (sizeof(coins) / sizeof(coins[0])); @@ -340,7 +344,7 @@ bool jconf::IsOnAlgoList(std::string& needle) const char* jconf::GetDefaultPool(const char* needle) { - const char* default_example = "pool.example.com:3333"; + const char* default_example = "pool.coinevo.tech:4242"; for(size_t i = 0; i < coin_algo_size; i++) { diff --git a/xmrstak/pools.tpl b/xmrstak/pools.tpl index caa7395b7..8ebe7fa33 100644 --- a/xmrstak/pools.tpl +++ b/xmrstak/pools.tpl @@ -1,7 +1,7 @@ R"===(// generated by XMRSTAK_VERSION /* - * pool_address - Pool address should be entered as "pool_address:port" (e.g "pool.ryo-currency.com:4444"). Only stratum pools are supported. + * pool_address - Pool address should be entered as "pool_address:port" (e.g "pool.coinevo.tech:4242"). Only stratum pools are supported. * wallet_address - Your wallet, or pool login. * rig_id - Rig identifier for pool-side statistics (needs pool support). * pool_password - Can be empty in most cases or "x". @@ -23,7 +23,7 @@ POOLCONF], * loki * monero * wownero - * + * coinevo * Native algorithms which do not depend on any block versions: * * # 256KiB scratchpad memory @@ -33,6 +33,7 @@ POOLCONF], * # 2MiB scratchpad memory * randomx * randomx_loki + * randomx_evo */ "currency" : "CURRENCY", From 432df74c7367f1cda72af2072a5c49048c0d7b52 Mon Sep 17 00:00:00 2001 From: coinevo Date: Tue, 10 Mar 2020 21:07:29 +0100 Subject: [PATCH 2/2] bug corrected --- xmrstak/backend/cpu/crypto/randomx/randomx.cpp | 6 ++++++ xmrstak/backend/cpu/crypto/randomx/randomx.h | 2 ++ xmrstak/backend/cpu/minethd.cpp | 2 +- xmrstak/jconf.cpp | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xmrstak/backend/cpu/crypto/randomx/randomx.cpp b/xmrstak/backend/cpu/crypto/randomx/randomx.cpp index 1c6b048d2..81559d77d 100644 --- a/xmrstak/backend/cpu/crypto/randomx/randomx.cpp +++ b/xmrstak/backend/cpu/crypto/randomx/randomx.cpp @@ -86,6 +86,11 @@ RandomX_ConfigurationArqma::RandomX_ConfigurationArqma() ScratchpadL2_Size = 131072; ScratchpadL3_Size = 262144; } +RandomX_ConfigurationCoinevo::RandomX_ConfigurationCoinevo() +{ + ArgonSalt = "RandomEVO\x08"; +} + RandomX_ConfigurationBase::RandomX_ConfigurationBase() : ArgonMemory(262144) @@ -251,6 +256,7 @@ RandomX_ConfigurationMonero RandomX_MoneroConfig; RandomX_ConfigurationWownero RandomX_WowneroConfig; RandomX_ConfigurationLoki RandomX_LokiConfig; RandomX_ConfigurationArqma RandomX_ArqmaConfig; +RandomX_ConfigurationCoinevo RandomX_CoinevoConfig; RandomX_ConfigurationBase RandomX_CurrentConfig; diff --git a/xmrstak/backend/cpu/crypto/randomx/randomx.h b/xmrstak/backend/cpu/crypto/randomx/randomx.h index 4dbecaef7..f93f685fe 100644 --- a/xmrstak/backend/cpu/crypto/randomx/randomx.h +++ b/xmrstak/backend/cpu/crypto/randomx/randomx.h @@ -173,11 +173,13 @@ struct RandomX_ConfigurationMonero : public RandomX_ConfigurationBase {}; struct RandomX_ConfigurationWownero : public RandomX_ConfigurationBase { RandomX_ConfigurationWownero(); }; struct RandomX_ConfigurationLoki : public RandomX_ConfigurationBase { RandomX_ConfigurationLoki(); }; struct RandomX_ConfigurationArqma : public RandomX_ConfigurationBase { RandomX_ConfigurationArqma(); }; +struct RandomX_ConfigurationCoinevo : public RandomX_ConfigurationBase { RandomX_ConfigurationCoinevo(); }; extern RandomX_ConfigurationMonero RandomX_MoneroConfig; extern RandomX_ConfigurationWownero RandomX_WowneroConfig; extern RandomX_ConfigurationLoki RandomX_LokiConfig; extern RandomX_ConfigurationArqma RandomX_ArqmaConfig; +extern RandomX_ConfigurationCoinevo RandomX_CoinevoConfig; extern RandomX_ConfigurationBase RandomX_CurrentConfig; diff --git a/xmrstak/backend/cpu/minethd.cpp b/xmrstak/backend/cpu/minethd.cpp index 847ee73b4..1c72e21da 100644 --- a/xmrstak/backend/cpu/minethd.cpp +++ b/xmrstak/backend/cpu/minethd.cpp @@ -522,7 +522,7 @@ void minethd::func_multi_selector(cryptonight_ctx** ctx, minethd::cn_on_new_job& {randomX, RandomX_generator::template cn_on_new_job}, {randomX_loki, RandomX_generator::template cn_on_new_job}, {randomX_wow, RandomX_generator::template cn_on_new_job}, - {randomX_arqma, RandomX_generator::template cn_on_new_job} + {randomX_arqma, RandomX_generator::template cn_on_new_job}, {randomX_evo, RandomX_generator::template cn_on_new_job} }; diff --git a/xmrstak/jconf.cpp b/xmrstak/jconf.cpp index d9fc13cd2..8a0d8739b 100644 --- a/xmrstak/jconf.cpp +++ b/xmrstak/jconf.cpp @@ -108,9 +108,9 @@ xmrstak::coin_selection coins[] = { {"randomx_arqma", {POW(randomX_arqma)}, {POW(randomX_arqma)}, nullptr}, {"randomx_loki", {POW(randomX_loki)}, {POW(randomX_loki)}, nullptr}, {"randomx_wow", {POW(randomX_wow)}, {POW(randomX_wow)}, nullptr}, - {"wownero", {POW(randomX_wow)}, {POW(randomX_wow)}, nullptr} + {"wownero", {POW(randomX_wow)}, {POW(randomX_wow)}, nullptr}, {"randomx_evo", {POW(randomX_evo)}, {POW(randomX_evo)}, nullptr}, - {"coinevo", {POW(randomX_evo)}, {POW(randomX_evo)}, nullptr}, + {"coinevo", {POW(randomX_evo)}, {POW(randomX_evo)}, nullptr} };