RandomSFX (Safex Cash variant) support

This commit is contained in:
SChernykh 2019-12-16 19:36:29 +01:00
parent 33e7a54c29
commit 4da37baf8c
7 changed files with 24 additions and 3 deletions

View file

@ -112,6 +112,8 @@ static AlgoName const algorithm_names[] = {
{ "RandomXL", nullptr, Algorithm::RX_LOKI },
{ "randomx/arq", "rx/arq", Algorithm::RX_ARQ },
{ "RandomARQ", nullptr, Algorithm::RX_ARQ },
{ "randomx/sfx", "rx/sfx", Algorithm::RX_SFX },
{ "RandomSFX", nullptr, Algorithm::RX_SFX },
# endif
# ifdef XMRIG_ALGO_ARGON2
{ "argon2/chukwa", nullptr, Algorithm::AR2_CHUKWA },
@ -138,6 +140,7 @@ size_t xmrig::Algorithm::l2() const
switch (m_id) {
case RX_0:
case RX_LOKI:
case RX_SFX:
return 0x40000;
case RX_WOW:
@ -173,6 +176,7 @@ size_t xmrig::Algorithm::l3() const
switch (m_id) {
case RX_0:
case RX_LOKI:
case RX_SFX:
return oneMiB * 2;
case RX_WOW:
@ -272,6 +276,7 @@ xmrig::Algorithm::Family xmrig::Algorithm::family(Id id)
case RX_WOW:
case RX_LOKI:
case RX_ARQ:
case RX_SFX:
return RANDOM_X;
# endif

View file

@ -67,6 +67,7 @@ public:
RX_WOW, // "rx/wow" RandomWOW (Wownero).
RX_LOKI, // "rx/loki" RandomXL (Loki).
RX_ARQ, // "rx/arq" RandomARQ (Arqma).
RX_SFX, // "rx/sfx" RandomSFX (Safex Cash).
AR2_CHUKWA, // "argon2/chukwa" Argon2id (Chukwa).
AR2_WRKZ, // "argon2/wrkz" Argon2id (WRKZ)
MAX

View file

@ -92,6 +92,11 @@ RandomX_ConfigurationArqma::RandomX_ConfigurationArqma()
ScratchpadL3_Size = 262144;
}
RandomX_ConfigurationSafex::RandomX_ConfigurationSafex()
{
ArgonSalt = "RandomSFX\x01";
}
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
: ArgonMemory(262144)
, ArgonIterations(3)
@ -267,6 +272,7 @@ RandomX_ConfigurationMonero RandomX_MoneroConfig;
RandomX_ConfigurationWownero RandomX_WowneroConfig;
RandomX_ConfigurationLoki RandomX_LokiConfig;
RandomX_ConfigurationArqma RandomX_ArqmaConfig;
RandomX_ConfigurationSafex RandomX_SafexConfig;
RandomX_ConfigurationBase RandomX_CurrentConfig;

View file

@ -182,11 +182,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_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
extern RandomX_ConfigurationLoki RandomX_LokiConfig;
extern RandomX_ConfigurationArqma RandomX_ArqmaConfig;
extern RandomX_ConfigurationSafex RandomX_SafexConfig;
extern RandomX_ConfigurationBase RandomX_CurrentConfig;

View file

@ -49,6 +49,9 @@ const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
case Algorithm::RX_ARQ:
return &RandomX_ArqmaConfig;
case Algorithm::RX_SFX:
return &RandomX_SafexConfig;
default:
break;
}