Merge branch 'dev' of https://github.com/xmrig/xmrig
This commit is contained in:
commit
df48cb1f98
28 changed files with 5919 additions and 5702 deletions
|
@ -65,6 +65,7 @@ static void Salsa20_XORKeyStream(const void* key, void* output, size_t size)
|
|||
ECRYPT_keysetup(&ctx, static_cast<const uint8_t*>(key), 256, 64);
|
||||
ECRYPT_ivsetup(&ctx, iv);
|
||||
ECRYPT_keystream_bytes(&ctx, static_cast<uint8_t*>(output), size);
|
||||
memset(static_cast<uint8_t*>(output) - 16, 0, 16);
|
||||
memset(static_cast<uint8_t*>(output) + size, 0, 16);
|
||||
}
|
||||
#else
|
||||
|
@ -75,6 +76,7 @@ static void Salsa20_XORKeyStream(const void* key, void* output, size_t size)
|
|||
const uint64_t iv = 0;
|
||||
ZeroTier::Salsa20 s(key, &iv);
|
||||
s.XORKeyStream(output, size);
|
||||
memset(static_cast<uint8_t*>(output) - 16, 0, 16);
|
||||
memset(static_cast<uint8_t*>(output) + size, 0, 16);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -117,6 +117,8 @@ static AlgoName const algorithm_names[] = {
|
|||
{ "RandomARQ", nullptr, Algorithm::RX_ARQ },
|
||||
{ "randomx/sfx", "rx/sfx", Algorithm::RX_SFX },
|
||||
{ "RandomSFX", nullptr, Algorithm::RX_SFX },
|
||||
{ "randomx/keva", "rx/keva", Algorithm::RX_KEVA },
|
||||
{ "RandomKEVA", nullptr, Algorithm::RX_KEVA },
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_ARGON2
|
||||
{ "argon2/chukwa", nullptr, Algorithm::AR2_CHUKWA },
|
||||
|
@ -151,6 +153,7 @@ size_t xmrig::Algorithm::l2() const
|
|||
return 0x40000;
|
||||
|
||||
case RX_WOW:
|
||||
case RX_KEVA:
|
||||
return 0x20000;
|
||||
|
||||
case DEFYX:
|
||||
|
@ -190,6 +193,7 @@ size_t xmrig::Algorithm::l3() const
|
|||
return oneMiB * 2;
|
||||
|
||||
case RX_WOW:
|
||||
case RX_KEVA:
|
||||
return oneMiB;
|
||||
|
||||
case DEFYX:
|
||||
|
@ -310,6 +314,7 @@ xmrig::Algorithm::Family xmrig::Algorithm::family(Id id)
|
|||
case DEFYX:
|
||||
case RX_ARQ:
|
||||
case RX_SFX:
|
||||
case RX_KEVA:
|
||||
return RANDOM_X;
|
||||
# endif
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ public:
|
|||
DEFYX, // "defyx" DefyX (Scala).
|
||||
RX_ARQ, // "rx/arq" RandomARQ (Arqma).
|
||||
RX_SFX, // "rx/sfx" RandomSFX (Safex Cash).
|
||||
RX_KEVA, // "rx/keva" RandomKEVA (Keva).
|
||||
AR2_CHUKWA, // "argon2/chukwa" Argon2id (Chukwa).
|
||||
AR2_WRKZ, // "argon2/wrkz" Argon2id (WRKZ)
|
||||
ASTROBWT_DERO, // "astrobwt" AstroBWT (Dero)
|
||||
|
|
|
@ -52,6 +52,7 @@ static CoinName const coin_names[] = {
|
|||
{ "arqma", Coin::ARQMA },
|
||||
{ "arq", Coin::ARQMA },
|
||||
{ "dero", Coin::DERO },
|
||||
{ "keva", Coin::KEVA }
|
||||
};
|
||||
|
||||
|
||||
|
@ -71,6 +72,9 @@ xmrig::Algorithm::Id xmrig::Coin::algorithm(uint8_t blobVersion) const
|
|||
case DERO:
|
||||
return (blobVersion >= 4) ? Algorithm::ASTROBWT_DERO : Algorithm::CN_0;
|
||||
|
||||
case KEVA:
|
||||
return (blobVersion >= 11) ? Algorithm::RX_KEVA : Algorithm::CN_R;
|
||||
|
||||
case INVALID:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,8 @@ public:
|
|||
INVALID = -1,
|
||||
MONERO,
|
||||
ARQMA,
|
||||
DERO
|
||||
DERO,
|
||||
KEVA
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -99,6 +99,13 @@ RandomX_ConfigurationSafex::RandomX_ConfigurationSafex()
|
|||
ArgonSalt = "RandomSFX\x01";
|
||||
}
|
||||
|
||||
RandomX_ConfigurationKeva::RandomX_ConfigurationKeva()
|
||||
{
|
||||
ArgonSalt = "RandomKV\x01";
|
||||
ScratchpadL2_Size = 131072;
|
||||
ScratchpadL3_Size = 1048576;
|
||||
}
|
||||
|
||||
RandomX_ConfigurationBase::RandomX_ConfigurationBase()
|
||||
: ArgonMemory(262144)
|
||||
, ArgonIterations(3)
|
||||
|
@ -301,6 +308,7 @@ RandomX_ConfigurationWownero RandomX_WowneroConfig;
|
|||
RandomX_ConfigurationLoki RandomX_LokiConfig;
|
||||
RandomX_ConfigurationArqma RandomX_ArqmaConfig;
|
||||
RandomX_ConfigurationSafex RandomX_SafexConfig;
|
||||
RandomX_ConfigurationKeva RandomX_KevaConfig;
|
||||
|
||||
alignas(64) RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||
|
||||
|
|
|
@ -183,12 +183,14 @@ struct RandomX_ConfigurationWownero : public RandomX_ConfigurationBase { RandomX
|
|||
struct RandomX_ConfigurationLoki : public RandomX_ConfigurationBase { RandomX_ConfigurationLoki(); };
|
||||
struct RandomX_ConfigurationArqma : public RandomX_ConfigurationBase { RandomX_ConfigurationArqma(); };
|
||||
struct RandomX_ConfigurationSafex : public RandomX_ConfigurationBase { RandomX_ConfigurationSafex(); };
|
||||
struct RandomX_ConfigurationKeva : public RandomX_ConfigurationBase { RandomX_ConfigurationKeva(); };
|
||||
|
||||
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_ConfigurationKeva RandomX_KevaConfig;
|
||||
|
||||
extern RandomX_ConfigurationBase RandomX_CurrentConfig;
|
||||
|
||||
|
|
|
@ -57,6 +57,9 @@ const RandomX_ConfigurationBase *xmrig::RxAlgo::base(Algorithm::Id algorithm)
|
|||
case Algorithm::RX_SFX:
|
||||
return &RandomX_SafexConfig;
|
||||
|
||||
case Algorithm::RX_KEVA:
|
||||
return &RandomX_KevaConfig;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue