From 56ef56b13625616a5f82168fda8cb02feec6b526 Mon Sep 17 00:00:00 2001 From: Duke Date: Sat, 6 Jan 2024 22:23:58 -0800 Subject: [PATCH] randomx_get_flags() automatically sets all flags except RANDOMX_FLAG_FULL_MEM, RANDOMX_FLAG_LARGE_PAGES and RANDOMX_FLAG_SECURE --- src/miner.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 2197cb533..4ba24ec29 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1095,16 +1095,13 @@ void static RandomXMiner() miningTimer.start(); randomx_flags flags = randomx_get_flags(); - // TODO: attempt to use large pages and fall back to no large pages - // flags |= RANDOMX_FLAG_LARGE_PAGES; flags |= RANDOMX_FLAG_FULL_MEM; - //flags |= RANDOMX_FLAG_JIT; - randomx_cache *randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_LARGE_PAGES | RANDOMX_FLAG_JIT | RANDOMX_FLAG_HARD_AES); + randomx_cache *randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_LARGE_PAGES | RANDOMX_FLAG_SECURE ); if (randomxCache == NULL) { - LogPrintf("RandomX cache is null, trying without large pages and without jit ...\n"); - randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_HARD_AES); + LogPrintf("RandomX cache is null, trying without large pages...\n"); + randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_SECURE); if (randomxCache == NULL) { - LogPrintf("RandomX cache is null, trying without hardware AES...\n"); + LogPrintf("RandomX cache is null, trying without secure...\n"); } randomxCache = randomx_alloc_cache(flags); if (randomxCache == NULL) {