From 38e0b2dc3b8c0fb7169e627cbafca8cf8acde234 Mon Sep 17 00:00:00 2001 From: MoneroOcean Date: Mon, 12 Aug 2024 00:13:06 +0300 Subject: [PATCH] Fixed merge --- src/base/crypto/Algorithm.cpp | 4 ++++ src/base/crypto/Algorithm.h | 2 ++ src/crypto/randomx/randomx.cpp | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/src/base/crypto/Algorithm.cpp b/src/base/crypto/Algorithm.cpp index dc9c24ae0f..48523186bc 100644 --- a/src/base/crypto/Algorithm.cpp +++ b/src/base/crypto/Algorithm.cpp @@ -86,6 +86,7 @@ const char *Algorithm::kRX_ARQ = "rx/arq"; const char *Algorithm::kRX_XEQ = "rx/xeq"; const char *Algorithm::kRX_GRAFT = "rx/graft"; const char *Algorithm::kRX_SFX = "rx/sfx"; +const char *Algorithm::kRX_KEVA = "rx/keva"; const char *Algorithm::kRX_YADA = "rx/yada"; #endif @@ -163,6 +164,7 @@ static const std::map kAlgorithmNames = { ALGO_NAME(RX_XEQ), ALGO_NAME(RX_GRAFT), ALGO_NAME(RX_SFX), + ALGO_NAME(RX_KEVA), ALGO_NAME(RX_YADA), # endif @@ -289,6 +291,8 @@ static const std::map kAlgorithmAlias ALGO_ALIAS(RX_GRAFT, "randomgraft"), ALGO_ALIAS_AUTO(RX_SFX), ALGO_ALIAS(RX_SFX, "randomx/sfx"), ALGO_ALIAS(RX_SFX, "randomsfx"), + ALGO_ALIAS_AUTO(RX_KEVA), ALGO_ALIAS(RX_KEVA, "randomx/keva"), + ALGO_ALIAS(RX_KEVA, "randomkeva"), ALGO_ALIAS_AUTO(RX_YADA), ALGO_ALIAS(RX_YADA, "randomx/yada"), ALGO_ALIAS(RX_YADA, "randomyada"), # endif diff --git a/src/base/crypto/Algorithm.h b/src/base/crypto/Algorithm.h index 3063a0b445..b0f8c0b5a0 100644 --- a/src/base/crypto/Algorithm.h +++ b/src/base/crypto/Algorithm.h @@ -80,6 +80,7 @@ class Algorithm RX_XEQ = 0x72121000, RX_GRAFT = 0x72151267, // "rx/graft" RandomGRAFT (Graft). RX_SFX = 0x72151273, // "rx/sfx" RandomSFX (Safex Cash). + RX_KEVA = 0x7214116b, // "rx/keva" RandomKEVA (Keva). RX_YADA = 0x72151279, // "rx/yada" RandomYada (YadaCoin). AR2_CHUKWA = 0x61130000, // "argon2/chukwa" Argon2id (Chukwa). AR2_CHUKWA_V2 = 0x61140000, // "argon2/chukwav2" Argon2id (Chukwa v2). @@ -153,6 +154,7 @@ class Algorithm static const char *kRX_XEQ; static const char *kRX_GRAFT; static const char *kRX_SFX; + static const char *kRX_KEVA; static const char *kRX_YADA; # endif diff --git a/src/crypto/randomx/randomx.cpp b/src/crypto/randomx/randomx.cpp index b4bd31da55..791c328997 100644 --- a/src/crypto/randomx/randomx.cpp +++ b/src/crypto/randomx/randomx.cpp @@ -115,6 +115,13 @@ RandomX_ConfigurationSafex::RandomX_ConfigurationSafex() ArgonSalt = "RandomSFX\x01"; } +RandomX_ConfigurationKeva::RandomX_ConfigurationKeva() +{ + ArgonSalt = "RandomKV\x01"; + ScratchpadL2_Size = 131072; + ScratchpadL3_Size = 1048576; +} + RandomX_ConfigurationYada::RandomX_ConfigurationYada() { ArgonSalt = "RandomXYadaCoin\x03";