Merge pull request #2411 from pdxwebdev/feature/yadacoin
Added support for Yada (rx/yada algorithm)
This commit is contained in:
commit
92ffcd34d6
@ -126,6 +126,11 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CpuThreads> &threads, uint32
|
|||||||
count += threads.move(Algorithm::kRX_WOW, std::move(wow));
|
count += threads.move(Algorithm::kRX_WOW, std::move(wow));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!threads.isExist(Algorithm::RX_YADA)) {
|
||||||
|
auto yada = cpuInfo->threads(Algorithm::RX_YADA, limit);
|
||||||
|
count += threads.move(Algorithm::kRX_YADA, std::move(yada));
|
||||||
|
}
|
||||||
|
|
||||||
count += generate(Algorithm::kRX, threads, Algorithm::RX_0, limit);
|
count += generate(Algorithm::kRX, threads, Algorithm::RX_0, limit);
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
@ -81,6 +81,7 @@ const char *Algorithm::kRX_WOW = "rx/wow";
|
|||||||
const char *Algorithm::kRX_ARQ = "rx/arq";
|
const char *Algorithm::kRX_ARQ = "rx/arq";
|
||||||
const char *Algorithm::kRX_GRAFT = "rx/graft";
|
const char *Algorithm::kRX_GRAFT = "rx/graft";
|
||||||
const char *Algorithm::kRX_SFX = "rx/sfx";
|
const char *Algorithm::kRX_SFX = "rx/sfx";
|
||||||
|
const char *Algorithm::kRX_YADA = "rx/yada";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XMRIG_ALGO_ARGON2
|
#ifdef XMRIG_ALGO_ARGON2
|
||||||
@ -146,6 +147,7 @@ static const std::map<uint32_t, const char *> kAlgorithmNames = {
|
|||||||
ALGO_NAME(RX_ARQ),
|
ALGO_NAME(RX_ARQ),
|
||||||
ALGO_NAME(RX_GRAFT),
|
ALGO_NAME(RX_GRAFT),
|
||||||
ALGO_NAME(RX_SFX),
|
ALGO_NAME(RX_SFX),
|
||||||
|
ALGO_NAME(RX_YADA),
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ARGON2
|
# ifdef XMRIG_ALGO_ARGON2
|
||||||
@ -259,6 +261,8 @@ static const std::map<const char *, Algorithm::Id, aliasCompare> kAlgorithmAlias
|
|||||||
ALGO_ALIAS(RX_GRAFT, "randomgraft"),
|
ALGO_ALIAS(RX_GRAFT, "randomgraft"),
|
||||||
ALGO_ALIAS_AUTO(RX_SFX), ALGO_ALIAS(RX_SFX, "randomx/sfx"),
|
ALGO_ALIAS_AUTO(RX_SFX), ALGO_ALIAS(RX_SFX, "randomx/sfx"),
|
||||||
ALGO_ALIAS(RX_SFX, "randomsfx"),
|
ALGO_ALIAS(RX_SFX, "randomsfx"),
|
||||||
|
ALGO_ALIAS_AUTO(RX_YADA), ALGO_ALIAS(RX_YADA, "randomx/yada"),
|
||||||
|
ALGO_ALIAS(RX_YADA, "randomyada"),
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ARGON2
|
# ifdef XMRIG_ALGO_ARGON2
|
||||||
@ -346,7 +350,7 @@ std::vector<xmrig::Algorithm> xmrig::Algorithm::all(const std::function<bool(con
|
|||||||
CN_HEAVY_0, CN_HEAVY_TUBE, CN_HEAVY_XHV,
|
CN_HEAVY_0, CN_HEAVY_TUBE, CN_HEAVY_XHV,
|
||||||
CN_PICO_0, CN_PICO_TLO,
|
CN_PICO_0, CN_PICO_TLO,
|
||||||
CN_UPX2,
|
CN_UPX2,
|
||||||
RX_0, RX_WOW, RX_ARQ, RX_GRAFT, RX_SFX,
|
RX_0, RX_WOW, RX_ARQ, RX_GRAFT, RX_SFX, RX_YADA,
|
||||||
AR2_CHUKWA, AR2_CHUKWA_V2, AR2_WRKZ,
|
AR2_CHUKWA, AR2_CHUKWA_V2, AR2_WRKZ,
|
||||||
KAWPOW_RVN,
|
KAWPOW_RVN,
|
||||||
GHOSTRIDER_RTM
|
GHOSTRIDER_RTM
|
||||||
|
@ -77,6 +77,7 @@ public:
|
|||||||
RX_ARQ = 0x72121061, // "rx/arq" RandomARQ (Arqma).
|
RX_ARQ = 0x72121061, // "rx/arq" RandomARQ (Arqma).
|
||||||
RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft).
|
RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft).
|
||||||
RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash).
|
RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash).
|
||||||
|
RX_YADA = 0x72151279, // "rx/yada" RandomYada (YadaCoin).
|
||||||
AR2_CHUKWA = 0x61130000, // "argon2/chukwa" Argon2id (Chukwa).
|
AR2_CHUKWA = 0x61130000, // "argon2/chukwa" Argon2id (Chukwa).
|
||||||
AR2_CHUKWA_V2 = 0x61140000, // "argon2/chukwav2" Argon2id (Chukwa v2).
|
AR2_CHUKWA_V2 = 0x61140000, // "argon2/chukwav2" Argon2id (Chukwa v2).
|
||||||
AR2_WRKZ = 0x61120000, // "argon2/wrkz" Argon2id (WRKZ)
|
AR2_WRKZ = 0x61120000, // "argon2/wrkz" Argon2id (WRKZ)
|
||||||
@ -142,6 +143,7 @@ public:
|
|||||||
static const char *kRX_ARQ;
|
static const char *kRX_ARQ;
|
||||||
static const char *kRX_GRAFT;
|
static const char *kRX_GRAFT;
|
||||||
static const char *kRX_SFX;
|
static const char *kRX_SFX;
|
||||||
|
static const char *kRX_YADA;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef XMRIG_ALGO_ARGON2
|
# ifdef XMRIG_ALGO_ARGON2
|
||||||
|
@ -54,6 +54,7 @@ static const CoinInfo coinInfo[] = {
|
|||||||
{ Algorithm::RX_WOW, "WOW", "Wownero", 300, 100000000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " wownero ") },
|
{ Algorithm::RX_WOW, "WOW", "Wownero", 300, 100000000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " wownero ") },
|
||||||
{ Algorithm::RX_0, "ZEPH", "Zephyr", 120, 1000000000000, BLUE_BG_BOLD( WHITE_BOLD_S " zephyr ") },
|
{ Algorithm::RX_0, "ZEPH", "Zephyr", 120, 1000000000000, BLUE_BG_BOLD( WHITE_BOLD_S " zephyr ") },
|
||||||
{ Algorithm::RX_0, "Townforge","Townforge", 30, 100000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " townforge ") },
|
{ Algorithm::RX_0, "Townforge","Townforge", 30, 100000000, MAGENTA_BG_BOLD(WHITE_BOLD_S " townforge ") },
|
||||||
|
{ Algorithm::RX_YADA, "YDA", "YadaCoin", 120, 100000000, BLUE_BG_BOLD( WHITE_BOLD_S " yada ") },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
WOWNERO,
|
WOWNERO,
|
||||||
ZEPHYR,
|
ZEPHYR,
|
||||||
TOWNFORGE,
|
TOWNFORGE,
|
||||||
|
YADA,
|
||||||
MAX
|
MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,15 +118,19 @@ bool xmrig::Job::setTarget(const char *target)
|
|||||||
|
|
||||||
const auto raw = Cvt::fromHex(target, strlen(target));
|
const auto raw = Cvt::fromHex(target, strlen(target));
|
||||||
const size_t size = raw.size();
|
const size_t size = raw.size();
|
||||||
|
if (algorithm() == Algorithm::RX_YADA) {
|
||||||
if (size == 4) {
|
m_target = strtoull(target, nullptr, 16);
|
||||||
m_target = 0xFFFFFFFFFFFFFFFFULL / (0xFFFFFFFFULL / uint64_t(*reinterpret_cast<const uint32_t *>(raw.data())));
|
|
||||||
}
|
|
||||||
else if (size == 8) {
|
|
||||||
m_target = *reinterpret_cast<const uint64_t *>(raw.data());
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
if (size == 4) {
|
||||||
|
m_target = 0xFFFFFFFFFFFFFFFFULL / (0xFFFFFFFFULL / uint64_t(*reinterpret_cast<const uint32_t *>(raw.data())));
|
||||||
|
}
|
||||||
|
else if (size == 8) {
|
||||||
|
m_target = *reinterpret_cast<const uint64_t *>(raw.data());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# ifdef XMRIG_PROXY_PROJECT
|
# ifdef XMRIG_PROXY_PROJECT
|
||||||
@ -176,6 +180,10 @@ int32_t xmrig::Job::nonceOffset() const
|
|||||||
auto f = algorithm().family();
|
auto f = algorithm().family();
|
||||||
if (f == Algorithm::KAWPOW) return 32;
|
if (f == Algorithm::KAWPOW) return 32;
|
||||||
if (f == Algorithm::GHOSTRIDER) return 76;
|
if (f == Algorithm::GHOSTRIDER) return 76;
|
||||||
|
|
||||||
|
auto id = algorithm().id();
|
||||||
|
if (id == Algorithm::RX_YADA) return 147;
|
||||||
|
|
||||||
return 39;
|
return 39;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,10 +100,18 @@ RandomX_ConfigurationSafex::RandomX_ConfigurationSafex()
|
|||||||
ArgonSalt = "RandomSFX\x01";
|
ArgonSalt = "RandomSFX\x01";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RandomX_ConfigurationYada::RandomX_ConfigurationYada()
|
||||||
|
{
|
||||||
|
ArgonSalt = "RandomXYadaCoin\x03";
|
||||||
|
SuperscalarLatency = 150;
|
||||||
|
ArgonIterations = 4;
|
||||||
|
}
|
||||||
|
|
||||||
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
||||||
: ArgonIterations(3)
|
: ArgonIterations(3)
|
||||||
, ArgonLanes(1)
|
, ArgonLanes(1)
|
||||||
, ArgonSalt("RandomX\x03")
|
, ArgonSalt("RandomX\x03")
|
||||||
|
, SuperscalarLatency(170)
|
||||||
, ScratchpadL1_Size(16384)
|
, ScratchpadL1_Size(16384)
|
||||||
, ScratchpadL2_Size(262144)
|
, ScratchpadL2_Size(262144)
|
||||||
, ScratchpadL3_Size(2097152)
|
, ScratchpadL3_Size(2097152)
|
||||||
@ -350,6 +358,7 @@ RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
|||||||
RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
||||||
RandomX_ConfigurationGraft RandomX_GraftConfig;
|
RandomX_ConfigurationGraft RandomX_GraftConfig;
|
||||||
RandomX_ConfigurationSafex RandomX_SafexConfig;
|
RandomX_ConfigurationSafex RandomX_SafexConfig;
|
||||||
|
RandomX_ConfigurationYada RandomX_YadaConfig;
|
||||||
|
|
||||||
alignas(64) RandomX_ConfigurationBase RandomX_CurrentConfig;
|
alignas(64) RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||||
|
|
||||||
|
@ -69,7 +69,6 @@ struct RandomX_ConfigurationBase
|
|||||||
{
|
{
|
||||||
ArgonMemory = 262144,
|
ArgonMemory = 262144,
|
||||||
CacheAccesses = 8,
|
CacheAccesses = 8,
|
||||||
SuperscalarLatency = 170,
|
|
||||||
DatasetBaseSize = 2147483648,
|
DatasetBaseSize = 2147483648,
|
||||||
DatasetExtraSize = 33554368,
|
DatasetExtraSize = 33554368,
|
||||||
JumpBits = 8,
|
JumpBits = 8,
|
||||||
@ -82,6 +81,7 @@ struct RandomX_ConfigurationBase
|
|||||||
uint32_t ArgonIterations;
|
uint32_t ArgonIterations;
|
||||||
uint32_t ArgonLanes;
|
uint32_t ArgonLanes;
|
||||||
const char* ArgonSalt;
|
const char* ArgonSalt;
|
||||||
|
uint32_t SuperscalarLatency;
|
||||||
|
|
||||||
uint32_t ScratchpadL1_Size;
|
uint32_t ScratchpadL1_Size;
|
||||||
uint32_t ScratchpadL2_Size;
|
uint32_t ScratchpadL2_Size;
|
||||||
@ -146,12 +146,14 @@ struct RandomX_ConfigurationWownero : public RandomX_ConfigurationBase { RandomX
|
|||||||
struct RandomX_ConfigurationArqma : public RandomX_ConfigurationBase { RandomX_ConfigurationArqma(); };
|
struct RandomX_ConfigurationArqma : public RandomX_ConfigurationBase { RandomX_ConfigurationArqma(); };
|
||||||
struct RandomX_ConfigurationGraft : public RandomX_ConfigurationBase { RandomX_ConfigurationGraft(); };
|
struct RandomX_ConfigurationGraft : public RandomX_ConfigurationBase { RandomX_ConfigurationGraft(); };
|
||||||
struct RandomX_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
|
struct RandomX_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
|
||||||
|
struct RandomX_ConfigurationYada : public RandomX_ConfigurationBase { RandomX_ConfigurationYada(); };
|
||||||
|
|
||||||
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
|
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
|
||||||
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
||||||
extern RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
extern RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
||||||
extern RandomX_ConfigurationGraft RandomX_GraftConfig;
|
extern RandomX_ConfigurationGraft RandomX_GraftConfig;
|
||||||
extern RandomX_ConfigurationSafex RandomX_SafexConfig;
|
extern RandomX_ConfigurationSafex RandomX_SafexConfig;
|
||||||
|
extern RandomX_ConfigurationYada RandomX_YadaConfig;
|
||||||
|
|
||||||
extern RandomX_ConfigurationBase RandomX_CurrentConfig;
|
extern RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||||
|
|
||||||
|
@ -44,6 +44,9 @@ const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
|
|||||||
case Algorithm::RX_SFX:
|
case Algorithm::RX_SFX:
|
||||||
return &RandomX_SafexConfig;
|
return &RandomX_SafexConfig;
|
||||||
|
|
||||||
|
case Algorithm::RX_YADA:
|
||||||
|
return &RandomX_YadaConfig;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user