diff --git a/src/dataset.cpp b/src/dataset.cpp
index 31c2adb..789aee3 100644
--- a/src/dataset.cpp
+++ b/src/dataset.cpp
@@ -47,15 +47,15 @@ static_assert(ARGON2_BLOCK_SIZE == randomx::ArgonBlockSize, "Unpexpected value o
namespace randomx {
- void initCache(randomx_cache* cache, const void* seed, size_t seedSize) {
+ void initCache(randomx_cache* cache, const void* key, size_t keySize) {
uint32_t memory_blocks, segment_length;
argon2_instance_t instance;
argon2_context context;
context.out = nullptr;
context.outlen = 0;
- context.pwd = CONST_CAST(uint8_t *)seed;
- context.pwdlen = (uint32_t)seedSize;
+ context.pwd = CONST_CAST(uint8_t *)key;
+ context.pwdlen = (uint32_t)keySize;
context.salt = CONST_CAST(uint8_t *)RANDOMX_ARGON_SALT;
context.saltlen = (uint32_t)randomx::ArgonSaltSize;
context.secret = NULL;
@@ -100,7 +100,7 @@ namespace randomx {
fill_memory_blocks(&instance);
cache->reciprocalCache.clear();
- randomx::Blake2Generator gen(seed, seedSize);
+ randomx::Blake2Generator gen(key, keySize);
for (int i = 0; i < RANDOMX_CACHE_ACCESSES; ++i) {
randomx::generateSuperscalar(cache->programs[i], gen);
for (unsigned j = 0; j < cache->programs[i].getSize(); ++j) {
@@ -114,8 +114,8 @@ namespace randomx {
}
}
- void initCacheCompile(randomx_cache* cache, const void* seed, size_t seedSize) {
- initCache(cache, seed, seedSize);
+ void initCacheCompile(randomx_cache* cache, const void* key, size_t keySize) {
+ initCache(cache, key, keySize);
cache->jit->generateSuperscalarHash(cache->programs, cache->reciprocalCache);
cache->jit->generateDatasetInitCode();
}
diff --git a/src/randomx.cpp b/src/randomx.cpp
index a80d727..7178115 100644
--- a/src/randomx.cpp
+++ b/src/randomx.cpp
@@ -76,8 +76,8 @@ extern "C" {
return cache;
}
- void randomx_init_cache(randomx_cache *cache, const void *seed, size_t seedSize) {
- cache->initialize(cache, seed, seedSize);
+ void randomx_init_cache(randomx_cache *cache, const void *key, size_t keySize) {
+ cache->initialize(cache, key, keySize);
}
void randomx_release_cache(randomx_cache* cache) {
diff --git a/src/randomx.h b/src/randomx.h
index 590c48f..fb503ec 100644
--- a/src/randomx.h
+++ b/src/randomx.h
@@ -56,13 +56,13 @@ extern "C" {
randomx_cache *randomx_alloc_cache(randomx_flags flags);
/**
- * Initializes the cache memory and SuperscalarHash using the provided seed value.
+ * Initializes the cache memory and SuperscalarHash using the provided key value.
*
* @param cache is a pointer to a previously allocated randomx_cache structure. Must not be NULL.
- * @param seed is a pointer to memory which contains the seed value. Must not be NULL.
- * @param seedSize is the number of bytes of the seed.
+ * @param key is a pointer to memory which contains the key value. Must not be NULL.
+ * @param keySize is the number of bytes of the key.
*/
-void randomx_init_cache(randomx_cache *cache, const void *seed, size_t seedSize);
+void randomx_init_cache(randomx_cache *cache, const void *key, size_t keySize);
/**
* Releases all memory occupied by the randomx_cache structure.
@@ -146,7 +146,7 @@ randomx_vm *randomx_create_vm(randomx_flags flags, randomx_cache *cache, randomx
/**
* Reinitializes a virtual machine with a new Cache. This function should be called anytime
- * the Cache is reinitialized with a new seed.
+ * the Cache is reinitialized with a new key.
*
* @param machine is a pointer to a randomx_vm structure that was initialized
* without RANDOMX_FLAG_FULL_MEM. Must not be NULL.
diff --git a/src/tests/benchmark.cpp b/src/tests/benchmark.cpp
index dc335f4..bac6c40 100644
--- a/src/tests/benchmark.cpp
+++ b/src/tests/benchmark.cpp
@@ -126,7 +126,7 @@ int main(int argc, char** argv) {
if (miningMode) {
flags = (randomx_flags)(flags | RANDOMX_FLAG_FULL_MEM);
- std::cout << " - full memory mode (2 GiB)" << std::endl;
+ std::cout << " - full memory mode (2080 MiB)" << std::endl;
}
else {
std::cout << " - light memory mode (256 MiB)" << std::endl;
diff --git a/src/vm_interpreted.cpp b/src/vm_interpreted.cpp
index 6891ad4..8d1afa4 100644
--- a/src/vm_interpreted.cpp
+++ b/src/vm_interpreted.cpp
@@ -23,7 +23,6 @@ along with RandomX. If not, see.
#include
#include
#include
-#include
#include "vm_interpreted.hpp"
#include "dataset.hpp"
#include "intrin_portable.h"