RandomX (Arqma variant) support
This commit is contained in:
parent
119e7ea7bf
commit
2b29a4c20f
14 changed files with 7470 additions and 6704 deletions
|
@ -110,6 +110,8 @@ static AlgoName const algorithm_names[] = {
|
|||
{ "RandomWOW", nullptr, Algorithm::RX_WOW },
|
||||
{ "randomx/loki", "rx/loki", Algorithm::RX_LOKI },
|
||||
{ "RandomXL", nullptr, Algorithm::RX_LOKI },
|
||||
{ "randomx/arq", "rx/arq", Algorithm::RX_ARQ },
|
||||
{ "RandomARQ", nullptr, Algorithm::RX_ARQ },
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_ARGON2
|
||||
{ "argon2/chukwa", nullptr, Algorithm::AR2_CHUKWA },
|
||||
|
@ -141,6 +143,9 @@ size_t xmrig::Algorithm::l2() const
|
|||
case RX_WOW:
|
||||
return 0x20000;
|
||||
|
||||
case RX_ARQ:
|
||||
return 0x10000;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -171,6 +176,9 @@ size_t xmrig::Algorithm::l3() const
|
|||
case RX_WOW:
|
||||
return oneMiB;
|
||||
|
||||
case RX_ARQ:
|
||||
return oneMiB / 4;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -261,6 +269,7 @@ xmrig::Algorithm::Family xmrig::Algorithm::family(Id id)
|
|||
case RX_0:
|
||||
case RX_WOW:
|
||||
case RX_LOKI:
|
||||
case RX_ARQ:
|
||||
return RANDOM_X;
|
||||
# endif
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ public:
|
|||
RX_0, // "rx/0" RandomX (reference configuration).
|
||||
RX_WOW, // "rx/wow" RandomWOW (Wownero).
|
||||
RX_LOKI, // "rx/loki" RandomXL (Loki).
|
||||
RX_ARQ, // "rx/arq" RandomARQ (Arqma).
|
||||
AR2_CHUKWA, // "argon2/chukwa" Argon2id (Chukwa).
|
||||
AR2_WRKZ, // "argon2/wrkz" Argon2id (WRKZ)
|
||||
MAX
|
||||
|
|
|
@ -82,6 +82,16 @@ RandomX_ConfigurationLoki::RandomX_ConfigurationLoki()
|
|||
RANDOMX_FREQ_CBRANCH = 16;
|
||||
}
|
||||
|
||||
RandomX_ConfigurationArqma::RandomX_ConfigurationArqma()
|
||||
{
|
||||
ArgonIterations = 1;
|
||||
ArgonSalt = "RandomARQ\x01";
|
||||
ProgramIterations = 1024;
|
||||
ProgramCount = 4;
|
||||
ScratchpadL2_Size = 131072;
|
||||
ScratchpadL3_Size = 262144;
|
||||
}
|
||||
|
||||
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
||||
: ArgonMemory(262144)
|
||||
, ArgonIterations(3)
|
||||
|
@ -248,6 +258,7 @@ void RandomX_ConfigurationBase::Apply()
|
|||
RandomX_ConfigurationMonero RandomX_MoneroConfig;
|
||||
RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
||||
RandomX_ConfigurationLoki RandomX_LokiConfig;
|
||||
RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
||||
|
||||
RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||
|
||||
|
|
|
@ -176,10 +176,12 @@ struct RandomX_ConfigurationBase
|
|||
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(); };
|
||||
|
||||
extern RandomX_ConfigurationMonero RandomX_MoneroConfig;
|
||||
extern RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
||||
extern RandomX_ConfigurationLoki RandomX_LokiConfig;
|
||||
extern RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
||||
|
||||
extern RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||
|
||||
|
|
|
@ -45,7 +45,9 @@ const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
|
|||
|
||||
case Algorithm::RX_LOKI:
|
||||
return &RandomX_LokiConfig;
|
||||
break;
|
||||
|
||||
case Algorithm::RX_ARQ:
|
||||
return &RandomX_ArqmaConfig;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue