From bdea11ada704c1dd1eadc7166060a3f5dde73fe3 Mon Sep 17 00:00:00 2001 From: James Piechota Date: Wed, 4 Sep 2024 18:58:26 +0000 Subject: [PATCH] WIP --- apps/arweave/c_src/Makefile | 42 +- apps/arweave/c_src/ar_mine_randomx.h | 79 -- apps/arweave/c_src/ar_nif.c | 38 + apps/arweave/c_src/ar_nif.h | 13 + apps/arweave/c_src/randomx/ar_randomx.h | 10 + .../feistel_msgsize_key_cipher.cpp | 0 .../feistel_msgsize_key_cipher.h | 6 + .../randomx_long_with_entropy.cpp | 0 .../{ => randomx}/randomx_long_with_entropy.h | 5 + .../rx4096/ar_rx4096_nif.c} | 549 ++++-------- .../c_src/randomx/rx512/ar_rx512_nif.c | 650 ++++++++++++++ apps/arweave/c_src/sha-256.h | 11 - .../c_src/{ar_mine_vdf.h => vdf/ar_vdf_nif.c} | 19 + apps/arweave/c_src/{ => vdf}/vdf.cpp | 0 apps/arweave/c_src/{ => vdf}/vdf.h | 0 apps/arweave/priv/symbols_rx4096.txt | 814 ++++++++++++++++++ apps/arweave/priv/symbols_rx512.txt | 810 +++++++++++++++++ apps/arweave/src/ar_bench_hash.erl | 5 +- apps/arweave/src/ar_bench_packing.erl | 16 +- apps/arweave/src/ar_mine_randomx.erl | 104 +-- apps/arweave/src/ar_packing_server.erl | 6 + apps/arweave/src/ar_rx4096_nif.erl | 58 ++ apps/arweave/src/ar_rx512_nif.erl | 46 + apps/arweave/src/ar_vdf.erl | 4 +- apps/arweave/src/ar_vdf_nif.erl | 25 + apps/arweave/test/ar_mine_randomx_tests.erl | 91 +- apps/arweave/test/ar_mine_vdf_tests.erl | 12 +- apps/arweave/test/ar_vdf_tests.erl | 4 +- rebar.config | 34 +- 29 files changed, 2805 insertions(+), 646 deletions(-) delete mode 100755 apps/arweave/c_src/ar_mine_randomx.h create mode 100755 apps/arweave/c_src/ar_nif.c create mode 100755 apps/arweave/c_src/ar_nif.h create mode 100755 apps/arweave/c_src/randomx/ar_randomx.h rename apps/arweave/c_src/{ => randomx}/feistel_msgsize_key_cipher.cpp (100%) rename apps/arweave/c_src/{ => randomx}/feistel_msgsize_key_cipher.h (76%) rename apps/arweave/c_src/{ => randomx}/randomx_long_with_entropy.cpp (100%) rename apps/arweave/c_src/{ => randomx}/randomx_long_with_entropy.h (84%) rename apps/arweave/c_src/{ar_mine_randomx.c => randomx/rx4096/ar_rx4096_nif.c} (66%) create mode 100755 apps/arweave/c_src/randomx/rx512/ar_rx512_nif.c delete mode 100644 apps/arweave/c_src/sha-256.h rename apps/arweave/c_src/{ar_mine_vdf.h => vdf/ar_vdf_nif.c} (89%) rename apps/arweave/c_src/{ => vdf}/vdf.cpp (100%) rename apps/arweave/c_src/{ => vdf}/vdf.h (100%) create mode 100644 apps/arweave/priv/symbols_rx4096.txt create mode 100644 apps/arweave/priv/symbols_rx512.txt create mode 100755 apps/arweave/src/ar_rx4096_nif.erl create mode 100755 apps/arweave/src/ar_rx512_nif.erl create mode 100755 apps/arweave/src/ar_vdf_nif.erl diff --git a/apps/arweave/c_src/Makefile b/apps/arweave/c_src/Makefile index 0588eb049..0929ae011 100644 --- a/apps/arweave/c_src/Makefile +++ b/apps/arweave/c_src/Makefile @@ -18,9 +18,6 @@ ERTS_INCLUDE_DIR ?= $(shell erl -noshell -eval 'io:format("~ts/erts-~ts/include/ ERL_INTERFACE_INCLUDE_DIR ?= $(shell erl -noshell -eval 'io:format("~ts", [code:lib_dir(erl_interface, include)]).' -s init stop) ERL_INTERFACE_LIB_DIR ?= $(shell erl -noshell -eval 'io:format("~ts", [code:lib_dir(erl_interface, lib)]).' -s init stop) -C_SRC_DIR = $(CURDIR) -C_SRC_OUTPUT ?= $(CURDIR)/../priv/arweave.so - # System type and C compiler/flags. UNAME_SYS := $(shell uname -s) @@ -58,10 +55,26 @@ ifneq (, $(shell which pkg-config)) LDFLAGS += `pkg-config --libs openssl` endif -CFLAGS += -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR) -I /usr/local/include -I ../lib/RandomX/src +C_SRC_DIR = $(CURDIR) + +CFLAGS += -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR) -I /usr/local/include -I ../lib/RandomX/src -I $(C_SRC_DIR) CXXFLAGS += -fPIC -I $(ERTS_INCLUDE_DIR) -I $(ERL_INTERFACE_INCLUDE_DIR) -I ../lib/RandomX/src -std=c++11 +LDLIBS += -L $(ERL_INTERFACE_LIB_DIR) -L /usr/local/lib -lei -lssl -lcrypto + + +RX512_OUTPUT ?= $(CURDIR)/../priv/rx512_arweave.so +RX4096_OUTPUT ?= $(CURDIR)/../priv/rx4096_arweave.so +VDF_OUTPUT ?= $(CURDIR)/../priv/vdf_arweave.so + +COMMON_RANDOMX_SOURCES = $(wildcard $(C_SRC_DIR)/randomx/*.c $(C_SRC_DIR)/randomx/*.cpp) +RX512_SOURCES = $(COMMON_RANDOMX_SOURCES) $(wildcard $(C_SRC_DIR)/*.c $(C_SRC_DIR)/randomx/rx512/*.c) +RX4096_SOURCES = $(COMMON_RANDOMX_SOURCES) $(wildcard $(C_SRC_DIR)/*.c $(C_SRC_DIR)/randomx/rx4096/*.c) +VDF_SOURCES = $(wildcard $(C_SRC_DIR)/*.c $(C_SRC_DIR)/vdf/*.c $(C_SRC_DIR)/vdf/*.cpp) + +RX512_OBJECTS = $(addsuffix .o, $(basename $(RX512_SOURCES))) +RX4096_OBJECTS = $(addsuffix .o, $(basename $(RX4096_SOURCES))) +VDF_OBJECTS = $(addsuffix .o, $(basename $(VDF_SOURCES))) -LDLIBS += -L $(ERL_INTERFACE_LIB_DIR) -L /usr/local/lib -lei -lssl -lcrypto ../lib/RandomX/build/librandomx.a # Verbosity. @@ -74,15 +87,20 @@ cpp_verbose = $(cpp_verbose_$(V)) link_verbose_0 = @echo " LD " $(@F); link_verbose = $(link_verbose_$(V)) -ALL_LIB_SOURCES := $(wildcard $(C_SRC_DIR)/*.c $(C_SRC_DIR)/*.cpp) -ALL_LIB_OBJECTS = $(addsuffix .o, $(basename $(ALL_LIB_SOURCES))) - COMPILE_C = $(c_verbose) $(CC) $(CFLAGS) $(CPPFLAGS) -c COMPILE_CPP = $(cpp_verbose) $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c -$(C_SRC_OUTPUT): $(ALL_LIB_OBJECTS) +$(RX512_OUTPUT): $(RX512_OBJECTS) + @mkdir -p $(BASEDIR)/priv/ + $(link_verbose) $(CXX) $(RX512_OBJECTS) $(LDFLAGS) $(LDLIBS) ../lib/RandomX/build512/librandomx512.a -shared -o $(RX512_OUTPUT) + +$(RX4096_OUTPUT): $(RX4096_OBJECTS) @mkdir -p $(BASEDIR)/priv/ - $(link_verbose) $(CXX) $(ALL_LIB_OBJECTS) $(LDFLAGS) $(LDLIBS) -shared -o $(C_SRC_OUTPUT) + $(link_verbose) $(CXX) $(RX4096_OBJECTS) $(LDFLAGS) $(LDLIBS) ../lib/RandomX/build4096/librandomx4096.a -shared -o $(RX4096_OUTPUT) + +$(VDF_OUTPUT): $(VDF_OBJECTS) + @mkdir -p $(BASEDIR)/priv/ + $(link_verbose) $(CXX) $(VDF_OBJECTS) $(LDFLAGS) $(LDLIBS) -shared -o $(VDF_OUTPUT) %.o: %.c $(COMPILE_C) $(OUTPUT_OPTION) $< @@ -96,8 +114,10 @@ $(C_SRC_OUTPUT): $(ALL_LIB_OBJECTS) %.o: %.cpp $(COMPILE_CPP) $(OUTPUT_OPTION) $< +all: $(RX512_OUTPUT) $(RX4096_OUTPUT) $(VDF_OUTPUT) + clean: - @rm -f $(C_SRC_OUTPUT) $(ALL_LIB_OBJECTS) + @rm -f $(RX512_OUTPUT) $(RX4096_OUTPUT) $(VDF_OUTPUT) $(RX512_OBJECTS) $(RX4096_OBJECTS) $(VDF_OBJECTS) diff --git a/apps/arweave/c_src/ar_mine_randomx.h b/apps/arweave/c_src/ar_mine_randomx.h deleted file mode 100755 index 6f8d79772..000000000 --- a/apps/arweave/c_src/ar_mine_randomx.h +++ /dev/null @@ -1,79 +0,0 @@ -#include "randomx.h" - -typedef enum { FALSE, TRUE } boolean; - -typedef enum { - HASHING_MODE_FAST = 0, - HASHING_MODE_LIGHT = 1, -} hashing_mode; - -const int BIG_NUM_SIZE = 32; -typedef unsigned char bigInt[32]; -const int MAX_CHUNK_SIZE = 256*1024; -const int PACKING_KEY_SIZE = 32; - -struct workerThread { - ErlNifTid threadId; - ErlNifThreadOpts *optsPtr; - randomx_cache *cachePtr; - randomx_dataset *datasetPtr; - unsigned long datasetInitStartItem; - unsigned long datasetInitItemCount; -}; - -struct state { - ErlNifRWLock* lockPtr; - int isRandomxReleased; - hashing_mode mode; - randomx_dataset* datasetPtr; - randomx_cache* cachePtr; -}; - -struct wrap_randomx_vm { - randomx_flags flags; - randomx_vm* vmPtr; -}; - -const int ARWEAVE_INPUT_DATA_SIZE = 48; -const int ARWEAVE_HASH_SIZE = 48; -const int SPORA_SUBSPACES_COUNT = 1024; -const int SPORA_SEARCH_SPACE_SHARE = 10; - -static int load(ErlNifEnv*, void**, ERL_NIF_TERM); -static void state_dtor(ErlNifEnv*, void*); -static void release_randomx(struct state*); - -static ERL_NIF_TERM randomx_info_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM init_randomx_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM init(ErlNifEnv*, int, const ERL_NIF_TERM []); -static boolean init_dataset(randomx_dataset*, randomx_cache*, unsigned int); -static void *init_dataset_thread(void*); -static ERL_NIF_TERM init_failed(ErlNifEnv*, struct state*, const char*); - -static ERL_NIF_TERM randomx_hash_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); - -static ERL_NIF_TERM randomx_encrypt_chunk_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM randomx_decrypt_chunk_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM randomx_reencrypt_chunk_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); - -static ERL_NIF_TERM randomx_encrypt_composite_chunk_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM randomx_decrypt_composite_chunk_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM randomx_decrypt_composite_sub_chunk_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM randomx_reencrypt_composite_chunk_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); - -static ERL_NIF_TERM randomx_hash_long_with_entropy_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[], hashing_mode hashingMode); - -static ERL_NIF_TERM vdf_sha2_nif(ErlNifEnv*, int, const ERL_NIF_TERM []); -static ERL_NIF_TERM solution_tuple(ErlNifEnv*, ERL_NIF_TERM); -static ERL_NIF_TERM ok_tuple(ErlNifEnv*, ERL_NIF_TERM); -static ERL_NIF_TERM ok_tuple2(ErlNifEnv*, ERL_NIF_TERM, ERL_NIF_TERM); -static ERL_NIF_TERM error_tuple(ErlNifEnv*, ERL_NIF_TERM); -static ERL_NIF_TERM error(ErlNifEnv*, const char*); -static ERL_NIF_TERM make_output_binary(ErlNifEnv*, unsigned char*, size_t); -static int validate_hash(unsigned char[RANDOMX_HASH_SIZE], unsigned char[RANDOMX_HASH_SIZE]); - -// From RandomX/src/jit_compiler.hpp -// needed for the JIT compiler to work on OpenBSD, NetBSD and Apple Silicon -#if defined(__OpenBSD__) || defined(__NetBSD__) || (defined(__APPLE__) && defined(__aarch64__)) -#define RANDOMX_FORCE_SECURE -#endif diff --git a/apps/arweave/c_src/ar_nif.c b/apps/arweave/c_src/ar_nif.c new file mode 100755 index 000000000..ce06824c0 --- /dev/null +++ b/apps/arweave/c_src/ar_nif.c @@ -0,0 +1,38 @@ +#include +#include "ar_nif.h" + +// Utility functions. + +ERL_NIF_TERM solution_tuple(ErlNifEnv* envPtr, ERL_NIF_TERM hashTerm) { + return enif_make_tuple2(envPtr, enif_make_atom(envPtr, "true"), hashTerm); +} + +ERL_NIF_TERM ok_tuple(ErlNifEnv* envPtr, ERL_NIF_TERM term) +{ + return enif_make_tuple2(envPtr, enif_make_atom(envPtr, "ok"), term); +} + +ERL_NIF_TERM ok_tuple2(ErlNifEnv* envPtr, ERL_NIF_TERM term1, ERL_NIF_TERM term2) +{ + return enif_make_tuple3(envPtr, enif_make_atom(envPtr, "ok"), term1, term2); +} + +ERL_NIF_TERM error_tuple(ErlNifEnv* envPtr, ERL_NIF_TERM term) +{ + return enif_make_tuple2(envPtr, enif_make_atom(envPtr, "error"), term); +} + +ERL_NIF_TERM error(ErlNifEnv* envPtr, const char* reason) +{ + return error_tuple(envPtr, enif_make_string(envPtr, reason, ERL_NIF_LATIN1)); +} + +ERL_NIF_TERM make_output_binary(ErlNifEnv* envPtr, unsigned char *dataPtr, size_t size) +{ + ERL_NIF_TERM outputTerm; + unsigned char *outputTermDataPtr; + + outputTermDataPtr = enif_make_new_binary(envPtr, size, &outputTerm); + memcpy(outputTermDataPtr, dataPtr, size); + return outputTerm; +} diff --git a/apps/arweave/c_src/ar_nif.h b/apps/arweave/c_src/ar_nif.h new file mode 100755 index 000000000..3455d05ed --- /dev/null +++ b/apps/arweave/c_src/ar_nif.h @@ -0,0 +1,13 @@ +#ifndef AR_NIF_H +#define AR_NIF_H + +#include + +ERL_NIF_TERM solution_tuple(ErlNifEnv*, ERL_NIF_TERM); +ERL_NIF_TERM ok_tuple(ErlNifEnv*, ERL_NIF_TERM); +ERL_NIF_TERM ok_tuple2(ErlNifEnv*, ERL_NIF_TERM, ERL_NIF_TERM); +ERL_NIF_TERM error_tuple(ErlNifEnv*, ERL_NIF_TERM); +ERL_NIF_TERM error(ErlNifEnv*, const char*); +ERL_NIF_TERM make_output_binary(ErlNifEnv*, unsigned char*, size_t); + +#endif // AR_NIF_H \ No newline at end of file diff --git a/apps/arweave/c_src/randomx/ar_randomx.h b/apps/arweave/c_src/randomx/ar_randomx.h new file mode 100755 index 000000000..78d4a3db6 --- /dev/null +++ b/apps/arweave/c_src/randomx/ar_randomx.h @@ -0,0 +1,10 @@ +#ifndef AR_RANDOMX_H +#define AR_RANDOMX_H + +// From RandomX/src/jit_compiler.hpp +// needed for the JIT compiler to work on OpenBSD, NetBSD and Apple Silicon +#if defined(__OpenBSD__) || defined(__NetBSD__) || (defined(__APPLE__) && defined(__aarch64__)) +#define RANDOMX_FORCE_SECURE +#endif + +#endif // AR_RANDOMX_H \ No newline at end of file diff --git a/apps/arweave/c_src/feistel_msgsize_key_cipher.cpp b/apps/arweave/c_src/randomx/feistel_msgsize_key_cipher.cpp similarity index 100% rename from apps/arweave/c_src/feistel_msgsize_key_cipher.cpp rename to apps/arweave/c_src/randomx/feistel_msgsize_key_cipher.cpp diff --git a/apps/arweave/c_src/feistel_msgsize_key_cipher.h b/apps/arweave/c_src/randomx/feistel_msgsize_key_cipher.h similarity index 76% rename from apps/arweave/c_src/feistel_msgsize_key_cipher.h rename to apps/arweave/c_src/randomx/feistel_msgsize_key_cipher.h index 2afe85d7f..9db427fb4 100644 --- a/apps/arweave/c_src/feistel_msgsize_key_cipher.h +++ b/apps/arweave/c_src/randomx/feistel_msgsize_key_cipher.h @@ -1,3 +1,7 @@ +#ifndef FEISTEL_MSGSIZE_KEY_CIPHER_H +#define FEISTEL_MSGSIZE_KEY_CIPHER_H + + #define FEISTEL_BLOCK_LENGTH 32 #if defined(__cplusplus) @@ -10,3 +14,5 @@ void feistel_decrypt(const unsigned char *ciphertext, const size_t ciphertext_le #if defined(__cplusplus) } #endif + +#endif // FEISTEL_MSGSIZE_KEY_CIPHER_H diff --git a/apps/arweave/c_src/randomx_long_with_entropy.cpp b/apps/arweave/c_src/randomx/randomx_long_with_entropy.cpp similarity index 100% rename from apps/arweave/c_src/randomx_long_with_entropy.cpp rename to apps/arweave/c_src/randomx/randomx_long_with_entropy.cpp diff --git a/apps/arweave/c_src/randomx_long_with_entropy.h b/apps/arweave/c_src/randomx/randomx_long_with_entropy.h similarity index 84% rename from apps/arweave/c_src/randomx_long_with_entropy.h rename to apps/arweave/c_src/randomx/randomx_long_with_entropy.h index e22f14037..146ee9c9a 100644 --- a/apps/arweave/c_src/randomx_long_with_entropy.h +++ b/apps/arweave/c_src/randomx/randomx_long_with_entropy.h @@ -1,3 +1,6 @@ +#ifndef RANDOMX_LONG_WITH_ENTROPY_H +#define RANDOMX_LONG_WITH_ENTROPY_H + #include "randomx.h" #define RANDOMX_ENTROPY_SIZE (256*1024) @@ -12,3 +15,5 @@ RANDOMX_EXPORT void randomx_decrypt_chunk(randomx_vm *machine, const unsigned ch #if defined(__cplusplus) } #endif + +#endif // RANDOMX_LONG_WITH_ENTROPY_H \ No newline at end of file diff --git a/apps/arweave/c_src/ar_mine_randomx.c b/apps/arweave/c_src/randomx/rx4096/ar_rx4096_nif.c similarity index 66% rename from apps/arweave/c_src/ar_mine_randomx.c rename to apps/arweave/c_src/randomx/rx4096/ar_rx4096_nif.c index ac0595730..18872af3d 100755 --- a/apps/arweave/c_src/ar_mine_randomx.c +++ b/apps/arweave/c_src/randomx/rx4096/ar_rx4096_nif.c @@ -1,55 +1,80 @@ -#include #include -#include "randomx.h" -#include "ar_mine_randomx.h" +#include #include -#include "sha-256.h" -#include "randomx_long_with_entropy.h" -#include "feistel_msgsize_key_cipher.h" -#include "vdf.h" - -ErlNifResourceType* stateType; -ErlNifResourceType* vdfRandomxVmType; -// just for split sources -#include "ar_mine_vdf.h" - -static ErlNifFunc nif_funcs[] = { - {"randomx_info_nif", 1, randomx_info_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"init_randomx_nif", 5, init_randomx_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"hash_nif", 5, randomx_hash_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"randomx_encrypt_chunk_nif", 7, randomx_encrypt_chunk_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"randomx_decrypt_chunk_nif", 8, randomx_decrypt_chunk_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"randomx_reencrypt_chunk_nif", 10, randomx_reencrypt_chunk_nif, - ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"randomx_encrypt_composite_chunk_nif", 9, randomx_encrypt_composite_chunk_nif, - ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"randomx_decrypt_composite_chunk_nif", 10, randomx_decrypt_composite_chunk_nif, - ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"randomx_decrypt_composite_sub_chunk_nif", 10, randomx_decrypt_composite_sub_chunk_nif, - ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"randomx_reencrypt_composite_chunk_nif", 13, - randomx_reencrypt_composite_chunk_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"vdf_sha2_nif", 5, vdf_sha2_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, - {"vdf_parallel_sha_verify_with_reset_nif", 10, vdf_parallel_sha_verify_with_reset_nif, - ERL_NIF_DIRTY_JOB_CPU_BOUND} +#include +#include "../ar_randomx.h" +#include "../randomx_long_with_entropy.h" +#include "../feistel_msgsize_key_cipher.h" + +typedef enum { FALSE, TRUE } boolean; + +typedef enum { + HASHING_MODE_FAST = 0, + HASHING_MODE_LIGHT = 1, +} hashing_mode; + +extern const int MAX_CHUNK_SIZE; + +struct workerThread { + ErlNifTid threadId; + ErlNifThreadOpts *optsPtr; + randomx_cache *cachePtr; + randomx_dataset *datasetPtr; + unsigned long datasetInitStartItem; + unsigned long datasetInitItemCount; }; -ERL_NIF_INIT(ar_mine_randomx, nif_funcs, load, NULL, NULL, NULL); +typedef struct { + ErlNifRWLock* lockPtr; + int isRandomxReleased; + hashing_mode mode; + randomx_dataset* datasetPtr; + randomx_cache* cachePtr; +} rx4096_state; -static int load(ErlNifEnv* envPtr, void** priv, ERL_NIF_TERM info) -{ - int flags = ERL_NIF_RT_CREATE; - stateType = enif_open_resource_type(envPtr, NULL, "state", state_dtor, flags, NULL); - if (stateType == NULL) { - return 1; - } - return 0; -} +const int PACKING_KEY_SIZE = 32; + +ErlNifResourceType* rx4096_stateType; + +const int MAX_CHUNK_SIZE = 256*1024; + +static void rx4096_state_dtor(ErlNifEnv* envPtr, void* objPtr); +static void release_randomx(rx4096_state *statePtr); +static boolean init_dataset(randomx_dataset *datasetPtr, randomx_cache *cachePtr, unsigned int numWorkers); +static void *init_dataset_thread(void *objPtr); +static randomx_vm* create_vm(rx4096_state* statePtr, + int fullMemEnabled, int jitEnabled, int largePagesEnabled, int hardwareAESEnabled, + int* isRandomxReleased); +static void destroy_vm(rx4096_state* statePtr, randomx_vm* vmPtr); +static ERL_NIF_TERM init_failed(ErlNifEnv *envPtr, rx4096_state *statePtr, const char* reason); +static ERL_NIF_TERM rx4096_info_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx4096_init_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx4096_hash_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx4096_encrypt_composite_chunk_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +); +static ERL_NIF_TERM rx4096_decrypt_composite_chunk_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +); +static ERL_NIF_TERM rx4096_decrypt_composite_sub_chunk_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +); +static ERL_NIF_TERM rx4096_reencrypt_composite_chunk_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +); -static void state_dtor(ErlNifEnv* envPtr, void* objPtr) +static void rx4096_state_dtor(ErlNifEnv* envPtr, void* objPtr) { - struct state *statePtr = (struct state*) objPtr; + rx4096_state *statePtr = (rx4096_state*) objPtr; release_randomx(statePtr); if (statePtr->lockPtr != NULL) { @@ -58,7 +83,7 @@ static void state_dtor(ErlNifEnv* envPtr, void* objPtr) } } -static void release_randomx(struct state *statePtr) +static void release_randomx(rx4096_state *statePtr) { if (statePtr->datasetPtr != NULL) { randomx_release_dataset(statePtr->datasetPtr); @@ -71,9 +96,9 @@ static void release_randomx(struct state *statePtr) statePtr->isRandomxReleased = 1; } -static ERL_NIF_TERM randomx_info_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]) +static ERL_NIF_TERM rx4096_info_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]) { - struct state* statePtr; + rx4096_state* statePtr; unsigned int datasetSize; hashing_mode hashingMode; ERL_NIF_TERM hashingModeTerm; @@ -81,8 +106,8 @@ static ERL_NIF_TERM randomx_info_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_ if (argc != 1) { return enif_make_badarg(envPtr); } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); + if (!enif_get_resource(envPtr, argv[0], rx4096_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx4096_state"); } hashingMode = statePtr->mode; @@ -114,19 +139,11 @@ static ERL_NIF_TERM randomx_info_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_ } -static ERL_NIF_TERM init_randomx_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]) +static ERL_NIF_TERM rx4096_init_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]) { - return init(envPtr, argc, argv); -} - -static ERL_NIF_TERM init( - ErlNifEnv* envPtr, - int argc, - const ERL_NIF_TERM argv[] -) { ErlNifBinary key; hashing_mode mode; - struct state *statePtr; + rx4096_state *statePtr; ERL_NIF_TERM resource; unsigned int numWorkers; int jitEnabled, largePagesEnabled; @@ -148,7 +165,7 @@ static ERL_NIF_TERM init( return enif_make_badarg(envPtr); } - statePtr = enif_alloc_resource(stateType, sizeof(struct state)); + statePtr = enif_alloc_resource(rx4096_stateType, sizeof(rx4096_state)); statePtr->cachePtr = NULL; statePtr->datasetPtr = NULL; statePtr->isRandomxReleased = 0; @@ -271,7 +288,7 @@ static void *init_dataset_thread(void *objPtr) return NULL; } -static ERL_NIF_TERM init_failed(ErlNifEnv *envPtr, struct state *statePtr, const char* reason) +static ERL_NIF_TERM init_failed(ErlNifEnv *envPtr, rx4096_state *statePtr, const char* reason) { if (statePtr->lockPtr != NULL) { enif_rwlock_destroy(statePtr->lockPtr); @@ -289,7 +306,7 @@ static ERL_NIF_TERM init_failed(ErlNifEnv *envPtr, struct state *statePtr, const return error(envPtr, reason); } -static randomx_vm* create_vm(struct state* statePtr, +static randomx_vm* create_vm(rx4096_state* statePtr, int fullMemEnabled, int jitEnabled, int largePagesEnabled, int hardwareAESEnabled, int* isRandomxReleased) { enif_rwlock_rlock(statePtr->lockPtr); @@ -324,47 +341,60 @@ static randomx_vm* create_vm(struct state* statePtr, return vmPtr; } -static void destroy_vm(struct state* statePtr, randomx_vm* vmPtr) { +static void destroy_vm(rx4096_state* statePtr, randomx_vm* vmPtr) { randomx_destroy_vm(vmPtr); enif_rwlock_runlock(statePtr->lockPtr); } -static ERL_NIF_TERM decrypt_chunk(ErlNifEnv* envPtr, - randomx_vm *machine, const unsigned char *input, const size_t inputSize, - const unsigned char *inChunk, const size_t inChunkSize, - unsigned char* outChunk, const size_t outChunkSize, - const int randomxProgramCount) { +static ERL_NIF_TERM rx4096_hash_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +) { + fprintf(stderr, "rx4096_hash_nif: called\n"); + int jitEnabled, largePagesEnabled, hardwareAESEnabled; + unsigned char hashPtr[RANDOMX_HASH_SIZE]; + rx4096_state* statePtr; + ErlNifBinary inputData; - randomx_decrypt_chunk( - machine, input, inputSize, inChunk, inChunkSize, outChunk, randomxProgramCount); - return make_output_binary(envPtr, outChunk, outChunkSize); -} + if (argc != 5) { + return enif_make_badarg(envPtr); + } + if (!enif_get_resource(envPtr, argv[0], rx4096_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx4096_state"); + } + if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[2], &jitEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[3], &largePagesEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[4], &hardwareAESEnabled)) { + return enif_make_badarg(envPtr); + } -static ERL_NIF_TERM encrypt_chunk(ErlNifEnv* envPtr, - randomx_vm *machine, const unsigned char *input, const size_t inputSize, - const unsigned char *inChunk, const size_t inChunkSize, - const int randomxProgramCount) { - ERL_NIF_TERM encryptedChunkTerm; - unsigned char* encryptedChunk = enif_make_new_binary( - envPtr, MAX_CHUNK_SIZE, &encryptedChunkTerm); - - if (inChunkSize < MAX_CHUNK_SIZE) { - unsigned char *paddedInChunk = (unsigned char*)malloc(MAX_CHUNK_SIZE); - memset(paddedInChunk, 0, MAX_CHUNK_SIZE); - memcpy(paddedInChunk, inChunk, inChunkSize); - randomx_encrypt_chunk( - machine, input, inputSize, paddedInChunk, MAX_CHUNK_SIZE, - encryptedChunk, randomxProgramCount); - free(paddedInChunk); - } else { - randomx_encrypt_chunk( - machine, input, inputSize, inChunk, inChunkSize, - encryptedChunk, randomxProgramCount); + fprintf(stderr, "rx4096_hash_nif: jitEnabled: %d, largePagesEnabled: %d, hardwareAESEnabled: %d\n", jitEnabled, largePagesEnabled, hardwareAESEnabled); + + int isRandomxReleased; + randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); + if (vmPtr == NULL) { + if (isRandomxReleased != 0) { + return error(envPtr, "rx4096_state has been released"); + } + return error(envPtr, "randomx_create_vm failed"); } - return encryptedChunkTerm; + randomx_calculate_hash(vmPtr, inputData.data, inputData.size, hashPtr); + + destroy_vm(statePtr, vmPtr); + + return ok_tuple(envPtr, make_output_binary(envPtr, hashPtr, RANDOMX_HASH_SIZE)); } + static ERL_NIF_TERM encrypt_composite_chunk(ErlNifEnv* envPtr, randomx_vm *vmPtr, ErlNifBinary *inputDataPtr, ErlNifBinary *inputChunkPtr, const int subChunkCount, const int iterations, @@ -481,242 +511,7 @@ static ERL_NIF_TERM decrypt_composite_chunk(ErlNifEnv* envPtr, return decryptedChunkTerm; } -static ERL_NIF_TERM randomx_hash_nif( - ErlNifEnv* envPtr, - int argc, - const ERL_NIF_TERM argv[] -) { - int jitEnabled, largePagesEnabled, hardwareAESEnabled; - unsigned char hashPtr[RANDOMX_HASH_SIZE]; - struct state* statePtr; - ErlNifBinary inputData; - - if (argc != 5) { - return enif_make_badarg(envPtr); - } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); - } - if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[2], &jitEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[3], &largePagesEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[4], &hardwareAESEnabled)) { - return enif_make_badarg(envPtr); - } - - int isRandomxReleased; - randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); - if (vmPtr == NULL) { - if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); - } - return error(envPtr, "randomx_create_vm failed"); - } - - randomx_calculate_hash(vmPtr, inputData.data, inputData.size, hashPtr); - - destroy_vm(statePtr, vmPtr); - - return ok_tuple(envPtr, make_output_binary(envPtr, hashPtr, RANDOMX_HASH_SIZE)); -} - -static ERL_NIF_TERM randomx_encrypt_chunk_nif( - ErlNifEnv* envPtr, - int argc, - const ERL_NIF_TERM argv[] -) { - int randomxRoundCount, jitEnabled, largePagesEnabled, hardwareAESEnabled; - struct state* statePtr; - ErlNifBinary inputData; - ErlNifBinary inputChunk; - - if (argc != 7) { - return enif_make_badarg(envPtr); - } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); - } - if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { - return enif_make_badarg(envPtr); - } - if (!enif_inspect_binary(envPtr, argv[2], &inputChunk) || - inputChunk.size == 0 || - inputChunk.size > MAX_CHUNK_SIZE) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[3], &randomxRoundCount)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[4], &jitEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[5], &largePagesEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[6], &hardwareAESEnabled)) { - return enif_make_badarg(envPtr); - } - - int isRandomxReleased; - randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), - jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); - if (vmPtr == NULL) { - if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); - } - return error(envPtr, "randomx_create_vm failed"); - } - - ERL_NIF_TERM outChunkTerm = encrypt_chunk(envPtr, vmPtr, - inputData.data, inputData.size, inputChunk.data, inputChunk.size, randomxRoundCount); - - destroy_vm(statePtr, vmPtr); - - return ok_tuple(envPtr, outChunkTerm); -} - -static ERL_NIF_TERM randomx_decrypt_chunk_nif( - ErlNifEnv* envPtr, - int argc, - const ERL_NIF_TERM argv[] -) { - int outChunkLen, randomxRoundCount, jitEnabled, largePagesEnabled, hardwareAESEnabled; - struct state* statePtr; - ErlNifBinary inputData; - ErlNifBinary inputChunk; - - if (argc != 8) { - return enif_make_badarg(envPtr); - } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); - } - if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { - return enif_make_badarg(envPtr); - } - if (!enif_inspect_binary(envPtr, argv[2], &inputChunk)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[3], &outChunkLen)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[4], &randomxRoundCount)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[5], &jitEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[6], &largePagesEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[7], &hardwareAESEnabled)) { - return enif_make_badarg(envPtr); - } - - int isRandomxReleased; - randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), - jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); - if (vmPtr == NULL) { - if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); - } - return error(envPtr, "randomx_create_vm failed"); - } - - // NOTE. Because randomx_decrypt_chunk will unpack padding too, decrypt always uses the - // full 256KB chunk size. We'll then truncate the output to the correct feistel-padded - // outChunkSize. - unsigned char outChunk[MAX_CHUNK_SIZE]; - ERL_NIF_TERM decryptedChunkTerm = decrypt_chunk(envPtr, vmPtr, - inputData.data, inputData.size, inputChunk.data, inputChunk.size, - outChunk, outChunkLen, randomxRoundCount); - - destroy_vm(statePtr, vmPtr); - - return ok_tuple(envPtr, decryptedChunkTerm); -} - -static ERL_NIF_TERM randomx_reencrypt_chunk_nif( - ErlNifEnv* envPtr, - int argc, - const ERL_NIF_TERM argv[] -) { - int chunkSize, decryptRandomxRoundCount, encryptRandomxRoundCount; - int jitEnabled, largePagesEnabled, hardwareAESEnabled; - struct state* statePtr; - ErlNifBinary decryptKey; - ErlNifBinary encryptKey; - ErlNifBinary inputChunk; - - if (argc != 10) { - return enif_make_badarg(envPtr); - } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); - } - if (!enif_inspect_binary(envPtr, argv[1], &decryptKey)) { - return enif_make_badarg(envPtr); - } - if (!enif_inspect_binary(envPtr, argv[2], &encryptKey)) { - return enif_make_badarg(envPtr); - } - if (!enif_inspect_binary(envPtr, argv[3], &inputChunk) || inputChunk.size == 0) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[4], &chunkSize) || - chunkSize == 0 || - chunkSize > MAX_CHUNK_SIZE) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[5], &decryptRandomxRoundCount)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[6], &encryptRandomxRoundCount)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[7], &jitEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[8], &largePagesEnabled)) { - return enif_make_badarg(envPtr); - } - if (!enif_get_int(envPtr, argv[9], &hardwareAESEnabled)) { - return enif_make_badarg(envPtr); - } - - int isRandomxReleased; - randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), - jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); - if (vmPtr == NULL) { - if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); - } - return error(envPtr, "randomx_create_vm failed"); - } - - // NOTE. Because randomx_decrypt_chunk will unpack padding too, decrypt always uses the - // full 256KB chunk size. We'll then truncate the output to the correct feistel-padded - // outChunkSize. - unsigned char decryptedChunk[MAX_CHUNK_SIZE]; - ERL_NIF_TERM decryptedChunkTerm = decrypt_chunk(envPtr, vmPtr, - decryptKey.data, decryptKey.size, inputChunk.data, inputChunk.size, - decryptedChunk, chunkSize, decryptRandomxRoundCount); - - ERL_NIF_TERM reencryptedChunkTerm = encrypt_chunk(envPtr, vmPtr, - encryptKey.data, encryptKey.size, decryptedChunk, chunkSize, encryptRandomxRoundCount); - - destroy_vm(statePtr, vmPtr); - - return ok_tuple2(envPtr, reencryptedChunkTerm, decryptedChunkTerm); -} - -static ERL_NIF_TERM randomx_encrypt_composite_chunk_nif( +static ERL_NIF_TERM rx4096_encrypt_composite_chunk_nif( ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[] @@ -728,15 +523,15 @@ static ERL_NIF_TERM randomx_encrypt_composite_chunk_nif( // The number of sub-chunks in the chunk. int subChunkCount; int jitEnabled, largePagesEnabled, hardwareAESEnabled; - struct state* statePtr; + rx4096_state* statePtr; ErlNifBinary inputData; ErlNifBinary inputChunk; if (argc != 9) { return enif_make_badarg(envPtr); } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); + if (!enif_get_resource(envPtr, argv[0], rx4096_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx4096_state"); } if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { return enif_make_badarg(envPtr); @@ -775,7 +570,7 @@ static ERL_NIF_TERM randomx_encrypt_composite_chunk_nif( jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); if (vmPtr == NULL) { if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); + return error(envPtr, "rx4096_state has been released"); } return error(envPtr, "randomx_create_vm failed"); } @@ -787,7 +582,7 @@ static ERL_NIF_TERM randomx_encrypt_composite_chunk_nif( return ok_tuple(envPtr, encryptedChunkTerm); } -static ERL_NIF_TERM randomx_decrypt_composite_chunk_nif( +static ERL_NIF_TERM rx4096_decrypt_composite_chunk_nif( ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[] @@ -800,15 +595,15 @@ static ERL_NIF_TERM randomx_decrypt_composite_chunk_nif( // The number of sub-chunks in the chunk. int subChunkCount; int jitEnabled, largePagesEnabled, hardwareAESEnabled; - struct state* statePtr; + rx4096_state* statePtr; ErlNifBinary inputData; ErlNifBinary inputChunk; if (argc != 10) { return enif_make_badarg(envPtr); } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); + if (!enif_get_resource(envPtr, argv[0], rx4096_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx4096_state"); } if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { return enif_make_badarg(envPtr); @@ -851,7 +646,7 @@ static ERL_NIF_TERM randomx_decrypt_composite_chunk_nif( jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); if (vmPtr == NULL) { if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); + return error(envPtr, "rx4096_state has been released"); } return error(envPtr, "randomx_create_vm failed"); } @@ -864,7 +659,7 @@ static ERL_NIF_TERM randomx_decrypt_composite_chunk_nif( return ok_tuple(envPtr, decryptedChunkTerm); } -static ERL_NIF_TERM randomx_decrypt_composite_sub_chunk_nif( +static ERL_NIF_TERM rx4096_decrypt_composite_sub_chunk_nif( ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[] @@ -878,15 +673,15 @@ static ERL_NIF_TERM randomx_decrypt_composite_sub_chunk_nif( // add it to the base packing key, and SHA256-hash it to get the packing key. uint32_t offset; int jitEnabled, largePagesEnabled, hardwareAESEnabled; - struct state* statePtr; + rx4096_state* statePtr; ErlNifBinary inputData; ErlNifBinary inputChunk; if (argc != 10) { return enif_make_badarg(envPtr); } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); + if (!enif_get_resource(envPtr, argv[0], rx4096_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx4096_state"); } if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { return enif_make_badarg(envPtr); @@ -933,7 +728,7 @@ static ERL_NIF_TERM randomx_decrypt_composite_sub_chunk_nif( jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); if (vmPtr == NULL) { if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); + return error(envPtr, "rx4096_state has been released"); } return error(envPtr, "randomx_create_vm failed"); } @@ -969,7 +764,7 @@ static ERL_NIF_TERM randomx_decrypt_composite_sub_chunk_nif( return ok_tuple(envPtr, decryptedSubChunkTerm); } -static ERL_NIF_TERM randomx_reencrypt_composite_chunk_nif( +static ERL_NIF_TERM rx4096_reencrypt_composite_chunk_nif( ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[] @@ -977,7 +772,7 @@ static ERL_NIF_TERM randomx_reencrypt_composite_chunk_nif( int decryptRandomxRoundCount, encryptRandomxRoundCount; int jitEnabled, largePagesEnabled, hardwareAESEnabled; int decryptSubChunkCount, encryptSubChunkCount, decryptIterations, encryptIterations; - struct state* statePtr; + rx4096_state* statePtr; ErlNifBinary decryptKey; ErlNifBinary encryptKey; ErlNifBinary inputChunk; @@ -986,8 +781,8 @@ static ERL_NIF_TERM randomx_reencrypt_composite_chunk_nif( if (argc != 13) { return enif_make_badarg(envPtr); } - if (!enif_get_resource(envPtr, argv[0], stateType, (void**) &statePtr)) { - return error(envPtr, "failed to read state"); + if (!enif_get_resource(envPtr, argv[0], rx4096_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx4096_state"); } if (!enif_inspect_binary(envPtr, argv[1], &decryptKey)) { return enif_make_badarg(envPtr); @@ -1043,7 +838,7 @@ static ERL_NIF_TERM randomx_reencrypt_composite_chunk_nif( jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); if (vmPtr == NULL) { if (isRandomxReleased != 0) { - return error(envPtr, "state has been released"); + return error(envPtr, "rx4096_state has been released"); } return error(envPtr, "randomx_create_vm failed"); } @@ -1095,45 +890,29 @@ static ERL_NIF_TERM randomx_reencrypt_composite_chunk_nif( return ok_tuple2(envPtr, reencryptedChunkTerm, decryptedChunkTerm); } -// Utility functions. - -static ERL_NIF_TERM solution_tuple(ErlNifEnv* envPtr, ERL_NIF_TERM hashTerm) { - return enif_make_tuple2(envPtr, enif_make_atom(envPtr, "true"), hashTerm); -} - -static ERL_NIF_TERM ok_tuple(ErlNifEnv* envPtr, ERL_NIF_TERM term) -{ - return enif_make_tuple2(envPtr, enif_make_atom(envPtr, "ok"), term); -} - -static ERL_NIF_TERM ok_tuple2(ErlNifEnv* envPtr, ERL_NIF_TERM term1, ERL_NIF_TERM term2) -{ - return enif_make_tuple3(envPtr, enif_make_atom(envPtr, "ok"), term1, term2); -} - -static ERL_NIF_TERM error_tuple(ErlNifEnv* envPtr, ERL_NIF_TERM term) -{ - return enif_make_tuple2(envPtr, enif_make_atom(envPtr, "error"), term); -} - -static ERL_NIF_TERM error(ErlNifEnv* envPtr, const char* reason) -{ - return error_tuple(envPtr, enif_make_string(envPtr, reason, ERL_NIF_LATIN1)); -} +static ErlNifFunc rx4096_funcs[] = { + {"rx4096_info_nif", 1, rx4096_info_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx4096_init_nif", 5, rx4096_init_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx4096_hash_nif", 5, rx4096_hash_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx4096_encrypt_composite_chunk_nif", 9, rx4096_encrypt_composite_chunk_nif, + ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx4096_decrypt_composite_chunk_nif", 10, rx4096_decrypt_composite_chunk_nif, + ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx4096_decrypt_composite_sub_chunk_nif", 10, rx4096_decrypt_composite_sub_chunk_nif, + ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx4096_reencrypt_composite_chunk_nif", 13, + rx4096_reencrypt_composite_chunk_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND} +}; -static ERL_NIF_TERM make_output_binary(ErlNifEnv* envPtr, unsigned char *dataPtr, size_t size) +static int rx4096_load(ErlNifEnv* envPtr, void** priv, ERL_NIF_TERM info) { - ERL_NIF_TERM outputTerm; - unsigned char *outputTermDataPtr; + int flags = ERL_NIF_RT_CREATE; + rx4096_stateType = enif_open_resource_type(envPtr, NULL, "rx4096_state", rx4096_state_dtor, flags, NULL); + if (rx4096_stateType == NULL) { + return 1; + } - outputTermDataPtr = enif_make_new_binary(envPtr, size, &outputTerm); - memcpy(outputTermDataPtr, dataPtr, size); - return outputTerm; + return 0; } -static int validate_hash( - unsigned char hash[RANDOMX_HASH_SIZE], - unsigned char difficulty[RANDOMX_HASH_SIZE] -) { - return memcmp(hash, difficulty, RANDOMX_HASH_SIZE); -} +ERL_NIF_INIT(ar_rx4096_nif, rx4096_funcs, rx4096_load, NULL, NULL, NULL); \ No newline at end of file diff --git a/apps/arweave/c_src/randomx/rx512/ar_rx512_nif.c b/apps/arweave/c_src/randomx/rx512/ar_rx512_nif.c new file mode 100755 index 000000000..66f053dd2 --- /dev/null +++ b/apps/arweave/c_src/randomx/rx512/ar_rx512_nif.c @@ -0,0 +1,650 @@ +#include +#include +#include +#include "randomx.h" +#include +#include "../ar_randomx.h" +#include "../randomx_long_with_entropy.h" +#include "../feistel_msgsize_key_cipher.h" + +typedef enum { FALSE, TRUE } boolean; + +typedef enum { + HASHING_MODE_FAST = 0, + HASHING_MODE_LIGHT = 1, +} hashing_mode; + +extern const int MAX_CHUNK_SIZE; + +struct workerThread { + ErlNifTid threadId; + ErlNifThreadOpts *optsPtr; + randomx_cache *cachePtr; + randomx_dataset *datasetPtr; + unsigned long datasetInitStartItem; + unsigned long datasetInitItemCount; +}; + +typedef struct { + ErlNifRWLock* lockPtr; + int isRandomxReleased; + hashing_mode mode; + randomx_dataset* datasetPtr; + randomx_cache* cachePtr; +} rx512_state; + + +ErlNifResourceType* rx512_stateType; + +const int MAX_CHUNK_SIZE = 256*1024; + +static void rx512_state_dtor(ErlNifEnv* envPtr, void* objPtr); +static void release_randomx(rx512_state *statePtr); +static boolean init_dataset(randomx_dataset *datasetPtr, randomx_cache *cachePtr, unsigned int numWorkers); +static void *init_dataset_thread(void *objPtr); +static randomx_vm* create_vm(rx512_state* statePtr, + int fullMemEnabled, int jitEnabled, int largePagesEnabled, int hardwareAESEnabled, + int* isRandomxReleased); +static void destroy_vm(rx512_state* statePtr, randomx_vm* vmPtr); +static ERL_NIF_TERM init_failed(ErlNifEnv *envPtr, rx512_state *statePtr, const char* reason); +static ERL_NIF_TERM rx512_info_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx512_init_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx512_hash_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx512_encrypt_chunk_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx512_decrypt_chunk_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); +static ERL_NIF_TERM rx512_reencrypt_chunk_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]); + + +static void rx512_state_dtor(ErlNifEnv* envPtr, void* objPtr) +{ + fprintf(stderr, "rx512_state_dtor: called\n"); + rx512_state *statePtr = (rx512_state*) objPtr; + + release_randomx(statePtr); + if (statePtr->lockPtr != NULL) { + enif_rwlock_destroy(statePtr->lockPtr); + statePtr->lockPtr = NULL; + } +} + +static void release_randomx(rx512_state *statePtr) +{ + fprintf(stderr, "release_randomx: called\n"); + if (statePtr->datasetPtr != NULL) { + randomx_release_dataset(statePtr->datasetPtr); + statePtr->datasetPtr = NULL; + } + if (statePtr->cachePtr != NULL) { + randomx_release_cache(statePtr->cachePtr); + statePtr->cachePtr = NULL; + } + statePtr->isRandomxReleased = 1; +} + +static ERL_NIF_TERM rx512_info_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]) +{ + fprintf(stderr, "rx512_info_nif: called\n"); + rx512_state* statePtr; + unsigned int datasetSize; + hashing_mode hashingMode; + ERL_NIF_TERM hashingModeTerm; + + if (argc != 1) { + return enif_make_badarg(envPtr); + } + if (!enif_get_resource(envPtr, argv[0], rx512_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx512_state"); + } + + hashingMode = statePtr->mode; + + if (hashingMode == HASHING_MODE_FAST) { + if (statePtr->datasetPtr == NULL) { + return error(envPtr, "dataset is not initialized for fast hashing mode"); + } + if (statePtr->cachePtr != NULL) { + return error(envPtr, "cache is initialized for fast hashing mode"); + } + datasetSize = randomx_dataset_item_count(); + hashingModeTerm = enif_make_atom(envPtr, "fast"); + } else if (hashingMode == HASHING_MODE_LIGHT) { + if (statePtr->datasetPtr != NULL) { + return error(envPtr, "dataset is initialized for light hashing mode"); + } + if (statePtr->cachePtr == NULL) { + return error(envPtr, "cache is not initialized for light hashing mode"); + } + datasetSize = 0; + hashingModeTerm = enif_make_atom(envPtr, "light"); + } else { + return error(envPtr, "invalid hashing mode"); + } + + + return ok_tuple2(envPtr, hashingModeTerm, enif_make_uint(envPtr, datasetSize)); +} + + +static ERL_NIF_TERM rx512_init_nif(ErlNifEnv* envPtr, int argc, const ERL_NIF_TERM argv[]) +{ + fprintf(stderr, "rx512_init_nif: called\n"); + ErlNifBinary key; + hashing_mode mode; + rx512_state *statePtr; + ERL_NIF_TERM resource; + unsigned int numWorkers; + int jitEnabled, largePagesEnabled; + randomx_flags flags; + + if (!enif_inspect_binary(envPtr, argv[0], &key)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[1], &mode)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[2], &jitEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[3], &largePagesEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_uint(envPtr, argv[4], &numWorkers)) { + return enif_make_badarg(envPtr); + } + + statePtr = enif_alloc_resource(rx512_stateType, sizeof(rx512_state)); + statePtr->cachePtr = NULL; + statePtr->datasetPtr = NULL; + statePtr->isRandomxReleased = 0; + statePtr->mode = mode; + + statePtr->lockPtr = enif_rwlock_create("state_rw_lock"); + if (statePtr->lockPtr == NULL) { + return init_failed(envPtr, statePtr, "enif_rwlock_create failed"); + } + + flags = RANDOMX_FLAG_DEFAULT; + if (jitEnabled) { + flags |= RANDOMX_FLAG_JIT; +#ifdef RANDOMX_FORCE_SECURE + flags |= RANDOMX_FLAG_SECURE; +#endif + } + if (largePagesEnabled) { + flags |= RANDOMX_FLAG_LARGE_PAGES; + } + + statePtr->cachePtr = randomx_alloc_cache(flags); + if (statePtr->cachePtr == NULL) { + return init_failed(envPtr, statePtr, "randomx_alloc_cache failed"); + } + + randomx_init_cache( + statePtr->cachePtr, + key.data, + key.size); + + if (mode == HASHING_MODE_FAST) { + statePtr->datasetPtr = randomx_alloc_dataset(flags); + if (statePtr->datasetPtr == NULL) { + return init_failed(envPtr, statePtr, "randomx_alloc_dataset failed"); + } + if (!init_dataset(statePtr->datasetPtr, statePtr->cachePtr, numWorkers)) { + return init_failed(envPtr, statePtr, "init_dataset failed"); + } + randomx_release_cache(statePtr->cachePtr); + statePtr->cachePtr = NULL; + } else { + statePtr->datasetPtr = NULL; + } + + resource = enif_make_resource(envPtr, statePtr); + enif_release_resource(statePtr); + + return ok_tuple(envPtr, resource); +} + +static boolean init_dataset( + randomx_dataset *datasetPtr, + randomx_cache *cachePtr, + unsigned int numWorkers +) { + fprintf(stderr, "init_dataset: called\n"); + struct workerThread **workerPtrPtr; + struct workerThread *workerPtr; + unsigned long itemsPerThread; + unsigned long itemsRemainder; + unsigned long startItem; + boolean anyThreadFailed; + + workerPtrPtr = enif_alloc(sizeof(struct workerThread *) * numWorkers); + itemsPerThread = randomx_dataset_item_count() / numWorkers; + itemsRemainder = randomx_dataset_item_count() % numWorkers; + startItem = 0; + for (int i = 0; i < numWorkers; i++) { + workerPtrPtr[i] = enif_alloc(sizeof(struct workerThread)); + workerPtr = workerPtrPtr[i]; + + workerPtr->cachePtr = cachePtr; + workerPtr->datasetPtr = datasetPtr; + + workerPtr->datasetInitStartItem = startItem; + if (i + 1 == numWorkers) { + workerPtr->datasetInitItemCount = itemsPerThread + itemsRemainder; + } else { + workerPtr->datasetInitItemCount = itemsPerThread; + } + startItem += workerPtr->datasetInitItemCount; + workerPtr->optsPtr = enif_thread_opts_create("init_fast_worker"); + if (0 != enif_thread_create( + "init_dataset_worker", + &(workerPtr->threadId), + &init_dataset_thread, + workerPtr, + workerPtr->optsPtr)) + { + enif_thread_opts_destroy(workerPtr->optsPtr); + enif_free(workerPtrPtr[i]); + workerPtrPtr[i] = NULL; + } + } + anyThreadFailed = FALSE; + for (int i = 0; i < numWorkers; i++) { + workerPtr = workerPtrPtr[i]; + if (workerPtr == NULL) { + anyThreadFailed = TRUE; + } else if (0 != enif_thread_join(workerPtr->threadId, NULL)) { + anyThreadFailed = TRUE; + } + if (workerPtr != NULL) { + enif_thread_opts_destroy(workerPtr->optsPtr); + enif_free(workerPtr); + } + } + enif_free(workerPtrPtr); + return !anyThreadFailed; +} + +static void *init_dataset_thread(void *objPtr) +{ + fprintf(stderr, "init_dataset_thread: called\n"); + struct workerThread *workerPtr = (struct workerThread*) objPtr; + randomx_init_dataset( + workerPtr->datasetPtr, + workerPtr->cachePtr, + workerPtr->datasetInitStartItem, + workerPtr->datasetInitItemCount); + return NULL; +} + +static ERL_NIF_TERM init_failed(ErlNifEnv *envPtr, rx512_state *statePtr, const char* reason) +{ + fprintf(stderr, "init_failed: called\n"); + if (statePtr->lockPtr != NULL) { + enif_rwlock_destroy(statePtr->lockPtr); + statePtr->lockPtr = NULL; + } + if (statePtr->cachePtr != NULL) { + randomx_release_cache(statePtr->cachePtr); + statePtr->cachePtr = NULL; + } + if (statePtr->datasetPtr != NULL) { + randomx_release_dataset(statePtr->datasetPtr); + statePtr->datasetPtr = NULL; + } + enif_release_resource(statePtr); + return error(envPtr, reason); +} + +static randomx_vm* create_vm(rx512_state* statePtr, + int fullMemEnabled, int jitEnabled, int largePagesEnabled, int hardwareAESEnabled, + int* isRandomxReleased) { + fprintf(stderr, "create_vm: called\n"); + enif_rwlock_rlock(statePtr->lockPtr); + *isRandomxReleased = statePtr->isRandomxReleased; + if (statePtr->isRandomxReleased != 0) { + enif_rwlock_runlock(statePtr->lockPtr); + return NULL; + } + + randomx_flags flags = RANDOMX_FLAG_DEFAULT; + if (fullMemEnabled) { + flags |= RANDOMX_FLAG_FULL_MEM; + } + if (hardwareAESEnabled) { + flags |= RANDOMX_FLAG_HARD_AES; + } + if (jitEnabled) { + flags |= RANDOMX_FLAG_JIT; +#ifdef RANDOMX_FORCE_SECURE + flags |= RANDOMX_FLAG_SECURE; +#endif + } + if (largePagesEnabled) { + flags |= RANDOMX_FLAG_LARGE_PAGES; + } + + randomx_vm *vmPtr = randomx_create_vm(flags, statePtr->cachePtr, statePtr->datasetPtr); + if (vmPtr == NULL) { + enif_rwlock_runlock(statePtr->lockPtr); + return NULL; + } + return vmPtr; +} + +static void destroy_vm(rx512_state* statePtr, randomx_vm* vmPtr) { + fprintf(stderr, "destroy_vm: called\n"); + randomx_destroy_vm(vmPtr); + enif_rwlock_runlock(statePtr->lockPtr); +} + +static ERL_NIF_TERM rx512_hash_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +) { + fprintf(stderr, "rx512_hash_nif: called\n"); + int jitEnabled, largePagesEnabled, hardwareAESEnabled; + unsigned char hashPtr[RANDOMX_HASH_SIZE]; + rx512_state* statePtr; + ErlNifBinary inputData; + + fprintf(stderr, "A\n"); + + if (argc != 5) { + return enif_make_badarg(envPtr); + } + fprintf(stderr, "B\n"); + if (!enif_get_resource(envPtr, argv[0], rx512_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx512_state"); + } + fprintf(stderr, "C\n"); + if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { + return enif_make_badarg(envPtr); + } + fprintf(stderr, "D\n"); + if (!enif_get_int(envPtr, argv[2], &jitEnabled)) { + return enif_make_badarg(envPtr); + } + fprintf(stderr, "E\n"); + if (!enif_get_int(envPtr, argv[3], &largePagesEnabled)) { + return enif_make_badarg(envPtr); + } + fprintf(stderr, "F\n"); + if (!enif_get_int(envPtr, argv[4], &hardwareAESEnabled)) { + return enif_make_badarg(envPtr); + } + + fprintf(stderr, "rx512_hash_nif: jitEnabled: %d, largePagesEnabled: %d, hardwareAESEnabled: %d\n", jitEnabled, largePagesEnabled, hardwareAESEnabled); + + int isRandomxReleased; + randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); + if (vmPtr == NULL) { + if (isRandomxReleased != 0) { + return error(envPtr, "rx512_state has been released"); + } + return error(envPtr, "randomx_create_vm failed"); + } + + randomx_calculate_hash(vmPtr, inputData.data, inputData.size, hashPtr); + + destroy_vm(statePtr, vmPtr); + + return ok_tuple(envPtr, make_output_binary(envPtr, hashPtr, RANDOMX_HASH_SIZE)); +} + + +static ERL_NIF_TERM decrypt_chunk(ErlNifEnv* envPtr, + randomx_vm *machine, const unsigned char *input, const size_t inputSize, + const unsigned char *inChunk, const size_t inChunkSize, + unsigned char* outChunk, const size_t outChunkSize, + const int randomxProgramCount) { + fprintf(stderr, "decrypt_chunk: called\n"); + randomx_decrypt_chunk( + machine, input, inputSize, inChunk, inChunkSize, outChunk, randomxProgramCount); + return make_output_binary(envPtr, outChunk, outChunkSize); +} + +static ERL_NIF_TERM encrypt_chunk(ErlNifEnv* envPtr, + randomx_vm *machine, const unsigned char *input, const size_t inputSize, + const unsigned char *inChunk, const size_t inChunkSize, + const int randomxProgramCount) { + fprintf(stderr, "encrypt_chunk: called\n"); + ERL_NIF_TERM encryptedChunkTerm; + unsigned char* encryptedChunk = enif_make_new_binary( + envPtr, MAX_CHUNK_SIZE, &encryptedChunkTerm); + + if (inChunkSize < MAX_CHUNK_SIZE) { + unsigned char *paddedInChunk = (unsigned char*)malloc(MAX_CHUNK_SIZE); + memset(paddedInChunk, 0, MAX_CHUNK_SIZE); + memcpy(paddedInChunk, inChunk, inChunkSize); + randomx_encrypt_chunk( + machine, input, inputSize, paddedInChunk, MAX_CHUNK_SIZE, + encryptedChunk, randomxProgramCount); + free(paddedInChunk); + } else { + randomx_encrypt_chunk( + machine, input, inputSize, inChunk, inChunkSize, + encryptedChunk, randomxProgramCount); + } + + return encryptedChunkTerm; +} + +static ERL_NIF_TERM rx512_encrypt_chunk_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +) { + fprintf(stderr, "rx512_encrypt_chunk_nif: called\n"); + int randomxRoundCount, jitEnabled, largePagesEnabled, hardwareAESEnabled; + rx512_state* statePtr; + ErlNifBinary inputData; + ErlNifBinary inputChunk; + + if (argc != 7) { + return enif_make_badarg(envPtr); + } + if (!enif_get_resource(envPtr, argv[0], rx512_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx512_state"); + } + if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { + return enif_make_badarg(envPtr); + } + if (!enif_inspect_binary(envPtr, argv[2], &inputChunk) || + inputChunk.size == 0 || + inputChunk.size > MAX_CHUNK_SIZE) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[3], &randomxRoundCount)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[4], &jitEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[5], &largePagesEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[6], &hardwareAESEnabled)) { + return enif_make_badarg(envPtr); + } + + int isRandomxReleased; + randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), + jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); + if (vmPtr == NULL) { + if (isRandomxReleased != 0) { + return error(envPtr, "rx512_state has been released"); + } + return error(envPtr, "randomx_create_vm failed"); + } + + ERL_NIF_TERM outChunkTerm = encrypt_chunk(envPtr, vmPtr, + inputData.data, inputData.size, inputChunk.data, inputChunk.size, randomxRoundCount); + + destroy_vm(statePtr, vmPtr); + + return ok_tuple(envPtr, outChunkTerm); +} + +static ERL_NIF_TERM rx512_decrypt_chunk_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +) { + fprintf(stderr, "rx512_decrypt_chunk_nif: called\n"); + int outChunkLen, randomxRoundCount, jitEnabled, largePagesEnabled, hardwareAESEnabled; + rx512_state* statePtr; + ErlNifBinary inputData; + ErlNifBinary inputChunk; + + if (argc != 8) { + return enif_make_badarg(envPtr); + } + if (!enif_get_resource(envPtr, argv[0], rx512_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx512_state"); + } + if (!enif_inspect_binary(envPtr, argv[1], &inputData)) { + return enif_make_badarg(envPtr); + } + if (!enif_inspect_binary(envPtr, argv[2], &inputChunk)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[3], &outChunkLen)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[4], &randomxRoundCount)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[5], &jitEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[6], &largePagesEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[7], &hardwareAESEnabled)) { + return enif_make_badarg(envPtr); + } + + int isRandomxReleased; + randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), + jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); + if (vmPtr == NULL) { + if (isRandomxReleased != 0) { + return error(envPtr, "rx512_state has been released"); + } + return error(envPtr, "randomx_create_vm failed"); + } + + // NOTE. Because randomx_decrypt_chunk will unpack padding too, decrypt always uses the + // full 256KB chunk size. We'll then truncate the output to the correct feistel-padded + // outChunkSize. + unsigned char outChunk[MAX_CHUNK_SIZE]; + ERL_NIF_TERM decryptedChunkTerm = decrypt_chunk(envPtr, vmPtr, + inputData.data, inputData.size, inputChunk.data, inputChunk.size, + outChunk, outChunkLen, randomxRoundCount); + + destroy_vm(statePtr, vmPtr); + + return ok_tuple(envPtr, decryptedChunkTerm); +} + +static ERL_NIF_TERM rx512_reencrypt_chunk_nif( + ErlNifEnv* envPtr, + int argc, + const ERL_NIF_TERM argv[] +) { + fprintf(stderr, "rx512_reencrypt_chunk_nif: called\n"); + int chunkSize, decryptRandomxRoundCount, encryptRandomxRoundCount; + int jitEnabled, largePagesEnabled, hardwareAESEnabled; + rx512_state* statePtr; + ErlNifBinary decryptKey; + ErlNifBinary encryptKey; + ErlNifBinary inputChunk; + + if (argc != 10) { + return enif_make_badarg(envPtr); + } + if (!enif_get_resource(envPtr, argv[0], rx512_stateType, (void**) &statePtr)) { + return error(envPtr, "failed to read rx512_state"); + } + if (!enif_inspect_binary(envPtr, argv[1], &decryptKey)) { + return enif_make_badarg(envPtr); + } + if (!enif_inspect_binary(envPtr, argv[2], &encryptKey)) { + return enif_make_badarg(envPtr); + } + if (!enif_inspect_binary(envPtr, argv[3], &inputChunk) || inputChunk.size == 0) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[4], &chunkSize) || + chunkSize == 0 || + chunkSize > MAX_CHUNK_SIZE) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[5], &decryptRandomxRoundCount)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[6], &encryptRandomxRoundCount)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[7], &jitEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[8], &largePagesEnabled)) { + return enif_make_badarg(envPtr); + } + if (!enif_get_int(envPtr, argv[9], &hardwareAESEnabled)) { + return enif_make_badarg(envPtr); + } + + int isRandomxReleased; + randomx_vm *vmPtr = create_vm(statePtr, (statePtr->mode == HASHING_MODE_FAST), + jitEnabled, largePagesEnabled, hardwareAESEnabled, &isRandomxReleased); + if (vmPtr == NULL) { + if (isRandomxReleased != 0) { + return error(envPtr, "rx512_state has been released"); + } + return error(envPtr, "randomx_create_vm failed"); + } + + // NOTE. Because randomx_decrypt_chunk will unpack padding too, decrypt always uses the + // full 256KB chunk size. We'll then truncate the output to the correct feistel-padded + // outChunkSize. + unsigned char decryptedChunk[MAX_CHUNK_SIZE]; + ERL_NIF_TERM decryptedChunkTerm = decrypt_chunk(envPtr, vmPtr, + decryptKey.data, decryptKey.size, inputChunk.data, inputChunk.size, + decryptedChunk, chunkSize, decryptRandomxRoundCount); + + ERL_NIF_TERM reencryptedChunkTerm = encrypt_chunk(envPtr, vmPtr, + encryptKey.data, encryptKey.size, decryptedChunk, chunkSize, encryptRandomxRoundCount); + + destroy_vm(statePtr, vmPtr); + + return ok_tuple2(envPtr, reencryptedChunkTerm, decryptedChunkTerm); +} + +static ErlNifFunc rx512_funcs[] = { + {"rx512_info_nif", 1, rx512_info_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx512_init_nif", 5, rx512_init_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx512_hash_nif", 5, rx512_hash_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx512_encrypt_chunk_nif", 7, rx512_encrypt_chunk_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx512_decrypt_chunk_nif", 8, rx512_decrypt_chunk_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"rx512_reencrypt_chunk_nif", 10, rx512_reencrypt_chunk_nif, + ERL_NIF_DIRTY_JOB_CPU_BOUND} +}; + +static int rx512_load(ErlNifEnv* envPtr, void** priv, ERL_NIF_TERM info) +{ + fprintf(stderr, "rx512_load: called\n"); + int flags = ERL_NIF_RT_CREATE; + rx512_stateType = enif_open_resource_type(envPtr, NULL, "rx512_state", rx512_state_dtor, flags, NULL); + if (rx512_stateType == NULL) { + return 1; + } + + return 0; +} + +ERL_NIF_INIT(ar_rx512_nif, rx512_funcs, rx512_load, NULL, NULL, NULL); + diff --git a/apps/arweave/c_src/sha-256.h b/apps/arweave/c_src/sha-256.h deleted file mode 100644 index 4c6ea9ea1..000000000 --- a/apps/arweave/c_src/sha-256.h +++ /dev/null @@ -1,11 +0,0 @@ -#include - -// -1 warning -void calc_sha_256(uint8_t hash[32], const void *input, size_t len); - -void calc_sha_256(uint8_t hash[32], const void *input, size_t len) { - SHA256_CTX sha256; - SHA256_Init(&sha256); - SHA256_Update(&sha256, input, len); - SHA256_Final(hash, &sha256); -} diff --git a/apps/arweave/c_src/ar_mine_vdf.h b/apps/arweave/c_src/vdf/ar_vdf_nif.c similarity index 89% rename from apps/arweave/c_src/ar_mine_vdf.h rename to apps/arweave/c_src/vdf/ar_vdf_nif.c index 8572df46f..8027c7e1a 100755 --- a/apps/arweave/c_src/ar_mine_vdf.h +++ b/apps/arweave/c_src/vdf/ar_vdf_nif.c @@ -1,3 +1,14 @@ +#include +#include +#include +#include +#include "vdf.h" + +static int load(ErlNifEnv* envPtr, void** priv, ERL_NIF_TERM info) +{ + return 0; +} + //////////////////////////////////////////////////////////////////////////////////////////////////// // SHA //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -122,3 +133,11 @@ static ERL_NIF_TERM vdf_parallel_sha_verify_with_reset_nif( return ok_tuple(envPtr, outputTermCheckpoint); } + +static ErlNifFunc nif_funcs[] = { + {"vdf_sha2_nif", 5, vdf_sha2_nif, ERL_NIF_DIRTY_JOB_CPU_BOUND}, + {"vdf_parallel_sha_verify_with_reset_nif", 10, vdf_parallel_sha_verify_with_reset_nif, + ERL_NIF_DIRTY_JOB_CPU_BOUND} +}; + +ERL_NIF_INIT(ar_vdf_nif, nif_funcs, load, NULL, NULL, NULL); diff --git a/apps/arweave/c_src/vdf.cpp b/apps/arweave/c_src/vdf/vdf.cpp similarity index 100% rename from apps/arweave/c_src/vdf.cpp rename to apps/arweave/c_src/vdf/vdf.cpp diff --git a/apps/arweave/c_src/vdf.h b/apps/arweave/c_src/vdf/vdf.h similarity index 100% rename from apps/arweave/c_src/vdf.h rename to apps/arweave/c_src/vdf/vdf.h diff --git a/apps/arweave/priv/symbols_rx4096.txt b/apps/arweave/priv/symbols_rx4096.txt new file mode 100644 index 000000000..07e45138c --- /dev/null +++ b/apps/arweave/priv/symbols_rx4096.txt @@ -0,0 +1,814 @@ +0000000000023810 T allocLargePagesMemory +00000000000237a0 T allocMemoryPages + U __assert_fail@GLIBC_2.2.5 +000000000001d060 t blake2b_compress +000000000002adc0 r blake2b_sigma + U calloc@GLIBC_2.2.5 +00000000000202dc t call_offset +0000000000036940 b completed.0 +0000000000017400 T create_vm + U __cxa_allocate_exception@CXXABI_1.3 + U __cxa_atexit@GLIBC_2.2.5 + U __cxa_begin_catch@CXXABI_1.3 + U __cxa_end_catch@CXXABI_1.3 + w __cxa_finalize@GLIBC_2.2.5 + U __cxa_free_exception@CXXABI_1.3 + w __cxa_pure_virtual@CXXABI_1.3 + U __cxa_throw@CXXABI_1.3 +00000000000183c0 t decrypt_composite_chunk.constprop.0 +0000000000016c40 t deregister_tm_clones +00000000000174b0 T destroy_vm +0000000000016cb0 t __do_global_dtors_aux +0000000000033c70 d __do_global_dtors_aux_fini_array_entry +0000000000035680 d __dso_handle +00000000000357e8 d DW.ref.__gxx_personality_v0 +00000000000357e0 d DW.ref._ZTISt9exception +0000000000034a30 d _DYNAMIC +0000000000018950 t encrypt_composite_chunk.constprop.0 + U enif_alloc + U enif_alloc_resource + U enif_free + U enif_get_int + U enif_get_resource + U enif_get_uint + U enif_inspect_binary + U enif_make_atom + U enif_make_badarg + U enif_make_new_binary + U enif_make_resource + U enif_make_string + U enif_make_tuple + U enif_make_uint + U enif_open_resource_type + U enif_release_resource + U enif_rwlock_create + U enif_rwlock_destroy + U enif_rwlock_rlock + U enif_rwlock_runlock + U enif_thread_create + U enif_thread_join + U enif_thread_opts_create + U enif_thread_opts_destroy +00000000000356a0 d entry.0 +0000000000017fa0 T error +0000000000017f60 T error_tuple +0000000000020110 t exp240 +0000000000017aa0 T feistel_decrypt +0000000000017990 T feistel_encrypt +0000000000021060 t fill_block +0000000000021ba0 t fill_block +0000000000022520 t fill_block +00000000000298e4 t _fini +0000000000016cf0 t frame_dummy +0000000000033c00 d __frame_dummy_init_array_entry +0000000000031c74 r __FRAME_END__ + U free@GLIBC_2.2.5 +0000000000023850 T freePagedMemory +0000000000035000 d _GLOBAL_OFFSET_TABLE_ +00000000000163a0 t _GLOBAL__sub_I_allocator.cpp +0000000000016c10 t _GLOBAL__sub_I_bytecode_machine.cpp +0000000000016340 t _GLOBAL__sub_I_dataset.cpp +0000000000016be0 t _GLOBAL__sub_I_instructions_portable.cpp +0000000000016200 t _GLOBAL__sub_I_jit_compiler_x86.cpp +0000000000016110 t _GLOBAL__sub_I_randomx.cpp +00000000000160e0 t _GLOBAL__sub_I_randomx_long_with_entropy.cpp +00000000000163d0 t _GLOBAL__sub_I_superscalar.cpp +00000000000160c2 t _GLOBAL__sub_I_superscalar.cpp.cold +00000000000161a0 t _GLOBAL__sub_I_virtual_machine.cpp +0000000000016140 t _GLOBAL__sub_I_vm_compiled.cpp +00000000000161d0 t _GLOBAL__sub_I_vm_compiled_light.cpp +0000000000016370 t _GLOBAL__sub_I_vm_interpreted.cpp +0000000000016170 t _GLOBAL__sub_I_vm_interpreted_light.cpp + w __gmon_start__ +000000000002d630 r __GNU_EH_FRAME_HDR + U __gxx_personality_v0@CXXABI_1.3 +0000000000015000 t _init +00000000000171b0 T init +00000000000202d1 t init_block_loop +0000000000016f90 T init_dataset +0000000000016d00 T init_dataset_thread +0000000000017140 T init_failed + w _ITM_deregisterTMCloneTable + w _ITM_registerTMCloneTable +0000000000016d30 T load +0000000000017fc0 T make_output_binary + U malloc@GLIBC_2.2.5 +0000000000020100 t mantissaMask +000000000002a1c8 R MAX_CHUNK_SIZE + U memcmp@GLIBC_2.2.5 + U __memcpy_chk@GLIBC_2.3.4 + U memcpy@GLIBC_2.14 + U memmove@GLIBC_2.2.5 + U memset@GLIBC_2.2.5 + U mmap@GLIBC_2.2.5 + U mprotect@GLIBC_2.2.5 + U munmap@GLIBC_2.2.5 +0000000000035700 d nif_funcs +0000000000019320 T nif_init +0000000000017ee0 T ok_tuple +0000000000017f20 T ok_tuple2 +000000000002a538 R PACKING_KEY_SIZE + U posix_memalign@GLIBC_2.2.5 +0000000000020480 t r0_mul +0000000000020488 t r1_add +0000000000020490 t r2_add +0000000000020498 t r3_add +00000000000204a0 t r4_add +00000000000204a8 t r5_add +00000000000204b0 t r6_add +00000000000204b8 t r7_add +0000000000019510 T randomx_alloc_cache +0000000000015d48 t randomx_alloc_cache.cold +00000000000197a0 T randomx_alloc_dataset +0000000000015dac t randomx_alloc_dataset.cold +0000000000028580 T randomx_argon2_fill_memory_blocks +0000000000022b30 T randomx_argon2_fill_segment_avx2 +00000000000219f0 T randomx_argon2_fill_segment_ref +0000000000022310 T randomx_argon2_fill_segment_ssse3 +0000000000022d30 T randomx_argon2_impl_avx2 +0000000000022510 T randomx_argon2_impl_ssse3 +00000000000284a0 T randomx_argon2_index_alpha +0000000000028ab0 T randomx_argon2_initialize +0000000000028610 T randomx_argon2_validate_inputs +000000000001dc60 T randomx_blake2b +000000000001db20 T randomx_blake2b_final +000000000001d700 T randomx_blake2b_init +000000000001d9f0 T randomx_blake2b_init_key +000000000001d580 T randomx_blake2b_init_param +000000000001dd60 T randomx_blake2b_long +000000000001d7c0 T randomx_blake2b_update +000000000001a330 T randomx_calculate_commitment +000000000001a090 T randomx_calculate_hash +000000000001a190 T randomx_calculate_hash_first +000000000001a2a0 T randomx_calculate_hash_last +0000000000017c00 T randomx_calculate_hash_long_with_entropy_get_entropy +000000000001a1e0 T randomx_calculate_hash_next +0000000000019850 T randomx_create_vm +0000000000015df2 t randomx_create_vm.cold +00000000000202c0 T randomx_dataset_init +0000000000019730 T randomx_dataset_item_count +0000000000017e20 T randomx_decrypt_chunk +0000000000018690 t randomx_decrypt_composite_chunk_nif +0000000000018020 t randomx_decrypt_composite_sub_chunk_nif +000000000001a070 T randomx_destroy_vm +0000000000017da0 T randomx_encrypt_chunk +0000000000018c50 t randomx_encrypt_composite_chunk_nif +0000000000019770 T randomx_get_dataset_memory +0000000000019330 T randomx_get_flags +00000000000174d0 T randomx_hash_nif +0000000000016de0 T randomx_info_nif +00000000000193d0 T randomx_init_cache +0000000000015d31 t randomx_init_cache.cold +0000000000019740 T randomx_init_dataset +00000000000173f0 T randomx_init_nif +0000000000020000 T randomx_prefetch_scratchpad +000000000002001a T randomx_prefetch_scratchpad_end +00000000000204c0 T randomx_program_end +0000000000020340 T randomx_program_epilogue +0000000000020140 T randomx_program_loop_begin +00000000000202a6 T randomx_program_loop_end +0000000000020141 T randomx_program_loop_load +0000000000020262 T randomx_program_loop_store +0000000000020040 T randomx_program_prologue +00000000000201b2 T randomx_program_read_dataset +0000000000020232 T randomx_program_read_dataset_sshash_fin +00000000000201ee T randomx_program_read_dataset_sshash_init +00000000000201b1 T randomx_program_start +0000000000028cd0 T randomx_reciprocal +00000000000204c1 T randomx_reciprocal_fast +0000000000018ef0 t randomx_reencrypt_composite_chunk_nif +00000000000194d0 T randomx_release_cache +0000000000019780 T randomx_release_dataset +00000000000203f0 T randomx_sshash_end +0000000000020400 T randomx_sshash_init +00000000000203c0 T randomx_sshash_load +00000000000203df T randomx_sshash_prefetch +0000000000019fd0 T randomx_vm_set_cache +000000000001a060 T randomx_vm_set_dataset +0000000000016c70 t register_tm_clones +0000000000016d70 T release_randomx +0000000000028760 T rxa2_fill_first_blocks +00000000000288c0 T rxa2_initial_hash +00000000000202c0 t rx_dataset_init +00000000000204c0 t rx_program_end +0000000000020140 t rx_program_loop_begin +0000000000020120 t scaleMask +00000000000237e0 T setPagesRW +0000000000023800 T setPagesRWX +00000000000237f0 T setPagesRX + U SHA256_Final@OPENSSL_3.0.0 + U SHA256_Init@OPENSSL_3.0.0 + U SHA256_Update@OPENSSL_3.0.0 +0000000000017ea0 T solution_tuple + U __stack_chk_fail@GLIBC_2.4 +0000000000016db0 T state_dtor +0000000000036948 B stateType +0000000000036940 d __TMC_END__ + U _Unwind_Resume@GCC_3.0 +00000000000176b0 T validate_hash +00000000000208a0 W _Z11fillAes1Rx4ILb0EEvPvmS0_ +00000000000207a0 W _Z11fillAes1Rx4ILb1EEvPvmS0_ +0000000000020b50 W _Z11fillAes4Rx4ILb0EEvPvmS0_ +0000000000020920 W _Z11fillAes4Rx4ILb1EEvPvmS0_ +00000000000204e0 W _Z11hashAes1Rx4ILb0EEvPKvmPv +0000000000020580 W _Z11hashAes1Rx4ILb1EEvPKvmPv +0000000000023680 T _Z11soft_aesdecDv2_xS_ +0000000000023560 T _Z11soft_aesencDv2_xS_ +00000000000176c0 T _Z12feistel_hashPKhS0_Ph +0000000000020c10 W _Z18hashAndFillAes1Rx4ILb0EEvPvmS0_S0_ +0000000000020d70 W _Z18hashAndFillAes1Rx4ILb1EEvPvmS0_S0_ +0000000000028cc0 T _Z18loadDoublePortablePKv +0000000000017870 T _Z21feistel_decrypt_blockPKhS0_S0_PhS1_ +0000000000017750 T _Z21feistel_encrypt_blockPKhS0_S0_PhS1_ +0000000000028c80 T _Z4mulhmm +0000000000028cb0 T _Z4rotlmj +0000000000028ca0 T _Z4rotrmj +0000000000022d40 T _Z5cpuidPii +0000000000028c90 T _Z5smulhll + U _ZdlPv@GLIBCXX_3.4 +000000000002bf00 r _ZL7lutDec0 +000000000002bb00 r _ZL7lutDec1 +000000000002b700 r _ZL7lutDec2 +000000000002b300 r _ZL7lutDec3 +000000000002cf00 r _ZL7lutEnc0 +000000000002cb00 r _ZL7lutEnc1 +000000000002c700 r _ZL7lutEnc2 +000000000002c300 r _ZL7lutEnc3 +000000000001c000 T _ZN10randomx_vm10initializeEv +000000000001c1f0 W _ZN10randomx_vm10setDatasetEP15randomx_dataset +000000000001bfe0 T _ZN10randomx_vm17resetRoundingModeEv +000000000001a3d0 W _ZN10randomx_vm8setCacheEP13randomx_cache +000000000001bfc0 T _ZN10randomx_vmD0Ev +000000000001bf80 T _ZN10randomx_vmD1Ev +000000000001bf80 T _ZN10randomx_vmD2Ev +0000000000036808 D _ZN7randomx10codeShhEndE +000000000001aec0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001b070 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EE3runEPv +000000000001b040 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EE7executeEv +000000000001afa0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEC1Ev +000000000001afa0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEC2Ev +000000000001abe0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EED0Ev +000000000001aa00 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EED1Ev +000000000001aa00 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EED2Ev +000000000001af90 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEdlEPv +000000000001af40 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm.part.0 +000000000001af00 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001b650 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EE3runEPv +000000000001b620 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EE7executeEv +000000000001b5a0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEC1Ev +000000000001b5a0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEC2Ev +000000000001ab60 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EED0Ev +000000000001aa60 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EED1Ev +000000000001aa60 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EED2Ev +000000000001b590 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEdlEPv +000000000001b540 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm.part.0 +000000000001aed0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001b1f0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EE3runEPv +000000000001b1c0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EE7executeEv +000000000001b120 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEC1Ev +000000000001b120 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEC2Ev +000000000001ae40 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EED0Ev +000000000001ac60 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EED1Ev +000000000001ac60 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EED2Ev +000000000001b110 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEdlEPv +000000000001b0c0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm.part.0 +000000000001af10 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001b7d0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EE3runEPv +000000000001b7a0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EE7executeEv +000000000001b720 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEC1Ev +000000000001b720 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEC2Ev +000000000001adc0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EED0Ev +000000000001acc0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EED1Ev +000000000001acc0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EED2Ev +000000000001b710 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEdlEPv +000000000001b6c0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm.part.0 +000000000001aee0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001b370 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EE3runEPv +000000000001b340 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EE7executeEv +000000000001b2a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEC1Ev +000000000001b2a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEC2Ev +000000000001a720 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EED0Ev +000000000001a540 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EED1Ev +000000000001a540 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EED2Ev +000000000001b290 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEdlEPv +000000000001b240 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEnwEm.part.0 +000000000001af20 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001b950 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EE3runEPv +000000000001b920 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EE7executeEv +000000000001b8a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEC1Ev +000000000001b8a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEC2Ev +000000000001a6a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EED0Ev +000000000001a5a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EED1Ev +000000000001a5a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EED2Ev +000000000001b890 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEdlEPv +000000000001b840 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEnwEm.part.0 +000000000001aef0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001b4f0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EE3runEPv +000000000001b4c0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EE7executeEv +000000000001b420 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEC1Ev +000000000001b420 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEC2Ev +000000000001a980 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EED0Ev +000000000001a7a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EED1Ev +000000000001a7a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EED2Ev +000000000001b410 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEdlEPv +000000000001b3c0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEnwEm.part.0 +000000000001af30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001bad0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EE3runEPv +000000000001baa0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EE7executeEv +000000000001ba20 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEC1Ev +000000000001ba20 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEC2Ev +000000000001a900 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EED0Ev +000000000001a800 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EED1Ev +000000000001a800 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EED2Ev +000000000001ba10 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEdlEPv +000000000001b9c0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEnwEm.part.0 +0000000000036830 D _ZN7randomx11codeLoopEndE +0000000000036800 D _ZN7randomx11codeShhInitE +0000000000036818 D _ZN7randomx11codeShhLoadE +0000000000022fe0 T _ZN7randomx11initDatasetEP13randomx_cachePhjj +0000000000036828 D _ZN7randomx12codeEpilogueE +0000000000036868 D _ZN7randomx12codeLoopLoadE +0000000000036878 D _ZN7randomx12codePrologueE +0000000000023370 W _ZN7randomx12deallocCacheINS_16AlignedAllocatorILm64EEEEEvP13randomx_cache +00000000000233c0 W _ZN7randomx12deallocCacheINS_18LargePageAllocatorEEEvP13randomx_cache +0000000000036870 D _ZN7randomx13codeLoopBeginE +0000000000036838 D _ZN7randomx13codeLoopStoreE +0000000000036920 D _ZN7randomx13DecoderBuffer13decodeBuffersE +0000000000036ac0 B _ZN7randomx13DecoderBuffer15decodeBuffer484E +0000000000036a60 B _ZN7randomx13DecoderBuffer15decodeBuffer493E +0000000000036a20 B _ZN7randomx13DecoderBuffer16decodeBuffer3310E +0000000000036a80 B _ZN7randomx13DecoderBuffer16decodeBuffer3733E +0000000000036a40 B _ZN7randomx13DecoderBuffer16decodeBuffer4444E +0000000000036aa0 B _ZN7randomx13DecoderBuffer16decodeBuffer7333E +0000000000036a00 B _ZN7randomx13DecoderBuffer7DefaultE +0000000000023860 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE10setDatasetEP15randomx_dataset +0000000000023880 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE11datasetReadEmRA8_m +0000000000023ba0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE15datasetPrefetchEm +0000000000024160 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE3runEPv +0000000000023c40 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE7executeEv +000000000001ab00 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EED0Ev +000000000001aac0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EED1Ev +000000000001aac0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EED2Ev +0000000000023c30 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEdlEPv +0000000000023be0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEnwEm.part.0 +0000000000023930 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE10setDatasetEP15randomx_dataset +0000000000023950 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE11datasetReadEmRA8_m +0000000000023bb0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE15datasetPrefetchEm +0000000000024700 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE3runEPv +00000000000241e0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE7executeEv +000000000001ad60 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EED0Ev +000000000001ad20 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EED1Ev +000000000001ad20 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EED2Ev +00000000000241d0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEdlEPv +0000000000024180 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEnwEm.part.0 +0000000000023a00 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE10setDatasetEP15randomx_dataset +0000000000023a20 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE11datasetReadEmRA8_m +0000000000023bc0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE15datasetPrefetchEm +0000000000024ca0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE3runEPv +0000000000024780 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE7executeEv +000000000001a640 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EED0Ev +000000000001a600 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EED1Ev +000000000001a600 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EED2Ev +0000000000024770 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEdlEPv +0000000000024720 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEnwEm.part.0 +0000000000023ad0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE10setDatasetEP15randomx_dataset +0000000000023af0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE11datasetReadEmRA8_m +0000000000023bd0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE15datasetPrefetchEm +0000000000025240 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE3runEPv +0000000000024d20 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE7executeEv +000000000001a8a0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EED0Ev +000000000001a860 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EED1Ev +000000000001a860 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EED2Ev +0000000000024d10 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEdlEPv +0000000000024cc0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEnwEm.part.0 +0000000000036820 D _ZN7randomx14codeProgramEndE +000000000001a4e0 W _ZN7randomx14deallocDatasetINS_16AlignedAllocatorILm64EEEEEvP15randomx_dataset +000000000001a510 W _ZN7randomx14deallocDatasetINS_18LargePageAllocatorEEEvP15randomx_dataset +000000000001e600 T _ZN7randomx14JitCompilerX8610h_IMUL_RCPERNS_11InstructionEi +000000000001f430 T _ZN7randomx14JitCompilerX8610h_ISMULH_MERNS_11InstructionEi +000000000001e140 T _ZN7randomx14JitCompilerX8610h_ISMULH_RERNS_11InstructionEi +000000000001e990 T _ZN7randomx14JitCompilerX8611getCodeSizeEv +000000000001fa60 T _ZN7randomx14JitCompilerX8612generateCodeERNS_11InstructionEi +000000000001ea70 T _ZN7randomx14JitCompilerX8613enableWritingEv +000000000001efe0 T _ZN7randomx14JitCompilerX8613genAddressImmERNS_11InstructionE +000000000001ec20 T _ZN7randomx14JitCompilerX8613genAddressRegERNS_11InstructionEb +000000000001ea90 T _ZN7randomx14JitCompilerX8615enableExecutionEv +000000000001fc10 T _ZN7randomx14JitCompilerX8615generateProgramERNS_7ProgramERNS_20ProgramConfigurationE +000000000001eea0 T _ZN7randomx14JitCompilerX8616genAddressRegDstERNS_11InstructionE +000000000001fc70 T _ZN7randomx14JitCompilerX8620generateProgramLightERNS_7ProgramERNS_20ProgramConfigurationEj +000000000001eab0 T _ZN7randomx14JitCompilerX8623generateDatasetInitCodeEv +000000000001ead0 T _ZN7randomx14JitCompilerX8623generateProgramEpilogueERNS_7ProgramERNS_20ProgramConfigurationE +000000000001fae0 T _ZN7randomx14JitCompilerX8623generateProgramPrologueERNS_7ProgramERNS_20ProgramConfigurationE +000000000001f620 T _ZN7randomx14JitCompilerX8623generateSuperscalarCodeERNS_11InstructionERSt6vectorImSaImEE +000000000001fd50 W _ZN7randomx14JitCompilerX8623generateSuperscalarHashILm8EEEvRAT__NS_18SuperscalarProgramERSt6vectorImSaImEE +000000000001fa40 T _ZN7randomx14JitCompilerX865h_NOPERNS_11InstructionEi +0000000000035800 D _ZN7randomx14JitCompilerX866engineE +000000000001f550 T _ZN7randomx14JitCompilerX866genSIBEiii +000000000001ed00 T _ZN7randomx14JitCompilerX868h_FADD_MERNS_11InstructionEi +000000000001e370 T _ZN7randomx14JitCompilerX868h_FADD_RERNS_11InstructionEi +000000000001ee00 T _ZN7randomx14JitCompilerX868h_FDIV_MERNS_11InstructionEi +000000000001e3f0 T _ZN7randomx14JitCompilerX868h_FMUL_RERNS_11InstructionEi +000000000001ed80 T _ZN7randomx14JitCompilerX868h_FSUB_MERNS_11InstructionEi +000000000001e3b0 T _ZN7randomx14JitCompilerX868h_FSUB_RERNS_11InstructionEi +000000000001f000 T _ZN7randomx14JitCompilerX868h_IADD_MERNS_11InstructionEi +000000000001f240 T _ZN7randomx14JitCompilerX868h_IMUL_MERNS_11InstructionEi +000000000001e8e0 T _ZN7randomx14JitCompilerX868h_IMUL_RERNS_11InstructionEi +000000000001e200 T _ZN7randomx14JitCompilerX868h_INEG_RERNS_11InstructionEi +000000000001f960 T _ZN7randomx14JitCompilerX868h_IROL_RERNS_11InstructionEi +000000000001e800 T _ZN7randomx14JitCompilerX868h_IROR_RERNS_11InstructionEi +000000000001ef70 T _ZN7randomx14JitCompilerX868h_ISTOREERNS_11InstructionEi +000000000001f0c0 T _ZN7randomx14JitCompilerX868h_ISUB_MERNS_11InstructionEi +000000000001e6a0 T _ZN7randomx14JitCompilerX868h_ISUB_RERNS_11InstructionEi +000000000001f180 T _ZN7randomx14JitCompilerX868h_IXOR_MERNS_11InstructionEi +000000000001e750 T _ZN7randomx14JitCompilerX868h_IXOR_RERNS_11InstructionEi +000000000001ea50 T _ZN7randomx14JitCompilerX869enableAllEv +000000000001e4d0 T _ZN7randomx14JitCompilerX869h_CBRANCHERNS_11InstructionEi +000000000001e430 T _ZN7randomx14JitCompilerX869h_CFROUNDERNS_11InstructionEi +000000000001e2f0 T _ZN7randomx14JitCompilerX869h_FSCAL_RERNS_11InstructionEi +000000000001e330 T _ZN7randomx14JitCompilerX869h_FSQRT_RERNS_11InstructionEi +000000000001e2a0 T _ZN7randomx14JitCompilerX869h_FSWAP_RERNS_11InstructionEi +000000000001f570 T _ZN7randomx14JitCompilerX869h_IADD_RSERNS_11InstructionEi +000000000001f310 T _ZN7randomx14JitCompilerX869h_IMULH_MERNS_11InstructionEi +000000000001e080 T _ZN7randomx14JitCompilerX869h_IMULH_RERNS_11InstructionEi +000000000001e240 T _ZN7randomx14JitCompilerX869h_ISWAP_RERNS_11InstructionEi +000000000001e9a0 T _ZN7randomx14JitCompilerX86C1Ev +000000000001e9a0 T _ZN7randomx14JitCompilerX86C2Ev +0000000000016000 t _ZN7randomx14JitCompilerX86C2Ev.cold +000000000001ea20 T _ZN7randomx14JitCompilerX86D1Ev +000000000001ea20 T _ZN7randomx14JitCompilerX86D2Ev +0000000000028c20 T _ZN7randomx15Blake2Generator7getByteEv +0000000000028be0 T _ZN7randomx15Blake2Generator9checkDataEm +0000000000028c50 T _ZN7randomx15Blake2Generator9getUInt32Ev +0000000000028b20 T _ZN7randomx15Blake2GeneratorC1EPKvmi +0000000000028b20 T _ZN7randomx15Blake2GeneratorC2EPKvmi +00000000000290d0 T _ZN7randomx15BytecodeMachine18compileInstructionERNS_11InstructionEiRNS_19InstructionByteCodeE +0000000000028d10 T _ZN7randomx15BytecodeMachine18executeInstructionERNS_19InstructionByteCodeERiPhRNS_20ProgramConfigurationE +000000000002d610 R _ZN7randomx15BytecodeMachine4zeroE +0000000000036840 D _ZN7randomx15codeDatasetInitE +0000000000036860 D _ZN7randomx15codeProgamStartE +0000000000036858 D _ZN7randomx15codeReadDatasetE +0000000000036810 D _ZN7randomx15codeShhPrefetchE +000000000001a460 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001c9a0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EE3runEPv +000000000001c8e0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EE8setCacheEP13randomx_cache +000000000001ac20 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EED0Ev +000000000001aa30 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EED1Ev +000000000001aa30 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EED2Ev +000000000001cdb0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEdlEPv +000000000001cd60 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm.part.0 +000000000001a470 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001cbe0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EE3runEPv +000000000001caa0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EE8setCacheEP13randomx_cache +000000000001aba0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EED0Ev +000000000001aa90 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EED1Ev +000000000001aa90 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EED2Ev +000000000001cf30 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEdlEPv +000000000001cee0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm.part.0 +000000000001a4a0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001c9e0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EE3runEPv +000000000001c910 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EE8setCacheEP13randomx_cache +000000000001ae80 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EED0Ev +000000000001ac90 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EED1Ev +000000000001ac90 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EED2Ev +000000000001ce10 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEdlEPv +000000000001cdc0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm.part.0 +000000000001a4b0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001cc40 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EE3runEPv +000000000001caf0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EE8setCacheEP13randomx_cache +000000000001ae00 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EED0Ev +000000000001acf0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EED1Ev +000000000001acf0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EED2Ev +000000000001cf90 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEdlEPv +000000000001cf40 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm.part.0 +000000000001a3e0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001ca20 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EE3runEPv +000000000001c940 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EE8setCacheEP13randomx_cache +000000000001a760 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EED0Ev +000000000001a570 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EED1Ev +000000000001a570 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EED2Ev +000000000001ce70 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEdlEPv +000000000001ce20 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEnwEm.part.0 +000000000001a3f0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001cca0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EE3runEPv +000000000001cb40 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EE8setCacheEP13randomx_cache +000000000001a6e0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EED0Ev +000000000001a5d0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EED1Ev +000000000001a5d0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EED2Ev +000000000001cff0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEdlEPv +000000000001cfa0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEnwEm.part.0 +000000000001a420 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001ca60 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EE3runEPv +000000000001c970 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EE8setCacheEP13randomx_cache +000000000001a9c0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EED0Ev +000000000001a7d0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EED1Ev +000000000001a7d0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EED2Ev +000000000001ced0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEdlEPv +000000000001ce80 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEnwEm.part.0 +000000000001a430 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001cd00 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EE3runEPv +000000000001cb90 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EE8setCacheEP13randomx_cache +000000000001a940 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EED0Ev +000000000001a830 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EED1Ev +000000000001a830 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EED2Ev +000000000001d050 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEdlEPv +000000000001d000 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEnwEm.part.0 +0000000000022e10 T _ZN7randomx15initDatasetItemEP13randomx_cachePhm +0000000000025320 W _ZN7randomx16AlignedAllocatorILm64EE10freeMemoryEPvm +0000000000025290 W _ZN7randomx16AlignedAllocatorILm64EE11allocMemoryEm +0000000000023330 T _ZN7randomx16initCacheCompileEP13randomx_cachePKvm +0000000000025330 T _ZN7randomx18executeSuperscalarERA8_mRNS_18SuperscalarProgramEPSt6vectorImSaImEE +000000000001a480 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE10setDatasetEP15randomx_dataset +000000000001bbc0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE11datasetReadEmRA8_m +000000000001a490 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE15datasetPrefetchEm +000000000001bb40 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE8setCacheEP13randomx_cache +000000000001ab30 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EED0Ev +000000000001aae0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EED1Ev +000000000001aae0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EED2Ev +000000000001be50 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEdlEPv +000000000001be00 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEnwEm.part.0 +000000000001a4c0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE10setDatasetEP15randomx_dataset +000000000001bc50 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE11datasetReadEmRA8_m +000000000001a4d0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE15datasetPrefetchEm +000000000001bb60 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE8setCacheEP13randomx_cache +000000000001ad90 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EED0Ev +000000000001ad40 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EED1Ev +000000000001ad40 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EED2Ev +000000000001beb0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEdlEPv +000000000001be60 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEnwEm.part.0 +000000000001a400 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE10setDatasetEP15randomx_dataset +000000000001bce0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE11datasetReadEmRA8_m +000000000001a410 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE15datasetPrefetchEm +000000000001bb80 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE8setCacheEP13randomx_cache +000000000001a670 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EED0Ev +000000000001a620 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EED1Ev +000000000001a620 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EED2Ev +000000000001bf10 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEdlEPv +000000000001bec0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEnwEm.part.0 +000000000001a440 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE10setDatasetEP15randomx_dataset +000000000001bd70 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE11datasetReadEmRA8_m +000000000001a450 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE15datasetPrefetchEm +000000000001bba0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE8setCacheEP13randomx_cache +000000000001a8d0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EED0Ev +000000000001a880 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EED1Ev +000000000001a880 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EED2Ev +000000000001bf70 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEdlEPv +000000000001bf20 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEnwEm.part.0 +0000000000025280 T _ZN7randomx18LargePageAllocator10freeMemoryEPvm +0000000000025260 T _ZN7randomx18LargePageAllocator11allocMemoryEm +0000000000016060 t _ZN7randomx18LargePageAllocator11allocMemoryEm.cold +0000000000025540 T _ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE +000000000001608e t _ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE.cold +00000000000369c0 B _ZN7randomx22SuperscalarInstruction4NullE +0000000000036848 D _ZN7randomx26codeReadDatasetLightSshFinE +0000000000036ae0 B _ZN7randomx26SuperscalarInstructionInfo3NOPE +0000000000036da0 B _ZN7randomx26SuperscalarInstructionInfo6IMUL_RE +0000000000036d60 B _ZN7randomx26SuperscalarInstructionInfo6IROR_CE +0000000000036e60 B _ZN7randomx26SuperscalarInstructionInfo6ISUB_RE +0000000000036e20 B _ZN7randomx26SuperscalarInstructionInfo6IXOR_RE +0000000000036d20 B _ZN7randomx26SuperscalarInstructionInfo7IADD_C7E +0000000000036ca0 B _ZN7randomx26SuperscalarInstructionInfo7IADD_C8E +0000000000036c20 B _ZN7randomx26SuperscalarInstructionInfo7IADD_C9E +0000000000036de0 B _ZN7randomx26SuperscalarInstructionInfo7IADD_RSE +0000000000036ba0 B _ZN7randomx26SuperscalarInstructionInfo7IMULH_RE +0000000000036ce0 B _ZN7randomx26SuperscalarInstructionInfo7IXOR_C7E +0000000000036c60 B _ZN7randomx26SuperscalarInstructionInfo7IXOR_C8E +0000000000036be0 B _ZN7randomx26SuperscalarInstructionInfo7IXOR_C9E +0000000000036b20 B _ZN7randomx26SuperscalarInstructionInfo8IMUL_RCPE +0000000000036b60 B _ZN7randomx26SuperscalarInstructionInfo8ISMULH_RE +00000000000282b0 W _ZN7randomx26SuperscalarInstructionInfoC1EPKcNS_26SuperscalarInstructionTypeERKNS_7MacroOpEi +0000000000028150 W _ZN7randomx26SuperscalarInstructionInfoC1ILm3EEEPKcNS_26SuperscalarInstructionTypeERAT__KNS_7MacroOpEiii +00000000000282b0 W _ZN7randomx26SuperscalarInstructionInfoC2EPKcNS_26SuperscalarInstructionTypeERKNS_7MacroOpEi +0000000000028150 W _ZN7randomx26SuperscalarInstructionInfoC2ILm3EEEPKcNS_26SuperscalarInstructionTypeERAT__KNS_7MacroOpEiii +0000000000027fb0 W _ZN7randomx26SuperscalarInstructionInfoD1Ev +0000000000027fb0 W _ZN7randomx26SuperscalarInstructionInfoD2Ev +0000000000036850 D _ZN7randomx27codeReadDatasetLightSshInitE +0000000000022d60 T _ZN7randomx3CpuC1Ev +0000000000022d60 T _ZN7randomx3CpuC2Ev +0000000000036900 D _ZN7randomx6slot_3E +00000000000368c0 D _ZN7randomx6slot_4E +00000000000368b0 D _ZN7randomx6slot_7E +00000000000368a0 D _ZN7randomx6slot_8E +0000000000036890 D _ZN7randomx6slot_9E +000000000001c3f0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE11hashAndFillEPvmPm +000000000001c350 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE14getFinalResultEPvm +000000000001c310 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE14initScratchpadEPv +000000000001c770 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE15generateProgramEPv +000000000001c280 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE8allocateEv +000000000001c750 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EED0Ev +000000000001c720 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EED1Ev +000000000001c720 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EED2Ev +000000000001c570 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE11hashAndFillEPvmPm +000000000001c4d0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE14getFinalResultEPvm +000000000001c490 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE14initScratchpadEPv +000000000001c7e0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE15generateProgramEPv +000000000001c200 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE8allocateEv +000000000001c7c0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EED0Ev +000000000001c790 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EED1Ev +000000000001c790 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EED2Ev +000000000001c440 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE11hashAndFillEPvmPm +000000000001c3a0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE14getFinalResultEPvm +000000000001c330 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE14initScratchpadEPv +000000000001c850 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE15generateProgramEPv +000000000001c610 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE8allocateEv +000000000001c830 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EED0Ev +000000000001c800 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EED1Ev +000000000001c800 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EED2Ev +000000000001c5c0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE11hashAndFillEPvmPm +000000000001c520 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE14getFinalResultEPvm +000000000001c4b0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE14initScratchpadEPv +000000000001c8c0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE15generateProgramEPv +000000000001c6a0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE8allocateEv +000000000001c8a0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EED0Ev +000000000001c870 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EED1Ev +000000000001c870 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EED2Ev +0000000000036ea0 B _ZN7randomx7MacroOp12TestJz_fusedE +0000000000037020 B _ZN7randomx7MacroOp5Mul_rE +0000000000036f80 B _ZN7randomx7MacroOp6Add_riE +00000000000370a0 B _ZN7randomx7MacroOp6Add_rrE +0000000000036ee0 B _ZN7randomx7MacroOp6Cmp_riE +0000000000037040 B _ZN7randomx7MacroOp6Imul_rE +0000000000037000 B _ZN7randomx7MacroOp6Mov_rrE +0000000000036fa0 B _ZN7randomx7MacroOp6Ror_riE +0000000000037080 B _ZN7randomx7MacroOp6Sub_rrE +0000000000036f60 B _ZN7randomx7MacroOp6Xor_riE +0000000000037060 B _ZN7randomx7MacroOp6Xor_rrE +0000000000036fc0 B _ZN7randomx7MacroOp7Imul_rrE +0000000000036fe0 B _ZN7randomx7MacroOp7Lea_sibE +0000000000036f20 B _ZN7randomx7MacroOp7Ror_rclE +0000000000036ec0 B _ZN7randomx7MacroOp7Setcc_rE +0000000000036f40 B _ZN7randomx7MacroOp8Mov_ri64E +0000000000036f00 B _ZN7randomx7MacroOp8Xor_selfE +0000000000036880 D _ZN7randomx7slot_10E +00000000000368e0 D _ZN7randomx7slot_3LE +0000000000023050 T _ZN7randomx9initCacheEP13randomx_cachePKvm +0000000000036984 b _ZN7randomxL12epilogueSizeE +000000000003699c b _ZN7randomxL12loopLoadSizeE +00000000000369a0 b _ZN7randomxL12prologueSizeE +000000000003698c b _ZN7randomxL13loopStoreSizeE +0000000000036974 b _ZN7randomxL14epilogueOffsetE +0000000000036978 b _ZN7randomxL15codeSshInitSizeE +0000000000036980 b _ZN7randomxL15codeSshLoadSizeE +0000000000036988 b _ZN7randomxL15datasetInitSizeE +0000000000036998 b _ZN7randomxL15readDatasetSizeE +0000000000037160 b _ZN7randomxL17IMULH_R_ops_arrayE +00000000000370c0 b _ZN7randomxL18IMUL_RCP_ops_arrayE +0000000000037100 b _ZN7randomxL18ISMULH_R_ops_arrayE +000000000003697c b _ZN7randomxL19codeSshPrefetchSizeE +0000000000036990 b _ZN7randomxL23readDatasetLightFinSizeE +0000000000036994 b _ZN7randomxL24readDatasetLightInitSizeE +000000000002d380 r _ZN7randomxL7buffer0E +000000000002d370 r _ZN7randomxL7buffer1E +000000000002d360 r _ZN7randomxL7buffer2E +000000000002d350 r _ZN7randomxL7buffer3E +000000000002d340 r _ZN7randomxL7buffer4E +000000000002d330 r _ZN7randomxL7buffer5E +0000000000036960 b _ZN7randomxL8aesDummyE + U _ZNSt13runtime_errorC1EPKc@GLIBCXX_3.4.21 + U _ZNSt13runtime_errorD1Ev@GLIBCXX_3.4 + U _ZNSt16invalid_argumentC1EPKc@GLIBCXX_3.4.21 + U _ZNSt16invalid_argumentD1Ev@GLIBCXX_3.4 +0000000000028350 W _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ +000000000001fea0 W _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ +0000000000023410 W _ZNSt6vectorImSaImEE17_M_realloc_insertIJRKmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_ +0000000000027fd0 W _ZNSt6vectorIN7randomx7MacroOpESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_ + U _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@GLIBCXX_3.4.21 + U _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_@GLIBCXX_3.4.21 + U _ZNSt8ios_base4InitC1Ev@GLIBCXX_3.4 + U _ZNSt8ios_base4InitD1Ev@GLIBCXX_3.4 + U _ZNSt9bad_allocD1Ev@GLIBCXX_3.4 + U _Znwm@GLIBCXX_3.4 + U _ZSt20__throw_length_errorPKc@GLIBCXX_3.4 +0000000000036951 b _ZStL8__ioinit +00000000000369a4 b _ZStL8__ioinit +00000000000369a7 b _ZStL8__ioinit +00000000000371c0 b _ZStL8__ioinit +0000000000036950 b _ZStL8__ioinit +0000000000036952 b _ZStL8__ioinit +0000000000036953 b _ZStL8__ioinit +0000000000036970 b _ZStL8__ioinit +0000000000036971 b _ZStL8__ioinit +00000000000369a5 b _ZStL8__ioinit +00000000000369a6 b _ZStL8__ioinit +00000000000371c1 b _ZStL8__ioinit +00000000000371c2 b _ZStL8__ioinit +0000000000033c88 V _ZTI10randomx_vm +0000000000033df8 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +0000000000033dc8 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000033d30 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000033d00 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000033f88 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000033f58 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000033ec0 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000033e90 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEE +0000000000033d78 V _ZTIN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000033cb0 V _ZTIN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000033f08 V _ZTIN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEE +0000000000033e40 V _ZTIN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEE +0000000000033c78 V _ZTIN7randomx15BytecodeMachineE +0000000000033e10 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +0000000000033de0 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000033d48 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000033d18 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000033fa0 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000033f70 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000033ed8 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000033ea8 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEE +0000000000033db0 V _ZTIN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000033ce8 V _ZTIN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000033f40 V _ZTIN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEE +0000000000033e78 V _ZTIN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEE +0000000000033d60 V _ZTIN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EEE +0000000000033c98 V _ZTIN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EEE +0000000000033ef0 V _ZTIN7randomx6VmBaseINS_18LargePageAllocatorELb0EEE +0000000000033e28 V _ZTIN7randomx6VmBaseINS_18LargePageAllocatorELb1EEE + U _ZTISt13runtime_error@GLIBCXX_3.4 + U _ZTISt16invalid_argument@GLIBCXX_3.4 + U _ZTISt9bad_alloc@GLIBCXX_3.4 + U _ZTISt9exception@GLIBCXX_3.4 +000000000002a5a0 V _ZTS10randomx_vm +000000000002a960 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +000000000002a8c0 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +000000000002a740 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +000000000002a6a0 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +000000000002ad00 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEE +000000000002ac80 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEE +000000000002ab40 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEE +000000000002aac0 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEE +000000000002a820 V _ZTSN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEE +000000000002a600 V _ZTSN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEE +000000000002ac00 V _ZTSN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEE +000000000002aa40 V _ZTSN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEE +000000000002a580 V _ZTSN7randomx15BytecodeMachineE +000000000002a9a0 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +000000000002a900 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +000000000002a780 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +000000000002a6e0 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +000000000002ad40 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEE +000000000002acc0 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEE +000000000002ab80 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEE +000000000002ab00 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEE +000000000002a860 V _ZTSN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEE +000000000002a640 V _ZTSN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEE +000000000002ac40 V _ZTSN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEE +000000000002aa80 V _ZTSN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEE +000000000002a7e0 V _ZTSN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EEE +000000000002a5c0 V _ZTSN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EEE +000000000002abc0 V _ZTSN7randomx6VmBaseINS_18LargePageAllocatorELb0EEE +000000000002aa00 V _ZTSN7randomx6VmBaseINS_18LargePageAllocatorELb1EEE +0000000000034878 V _ZTV10randomx_vm + U _ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3 + U _ZTVN10__cxxabiv120__si_class_type_infoE@CXXABI_1.3 + U _ZTVN10__cxxabiv121__vmi_class_type_infoE@CXXABI_1.3 +0000000000034368 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +00000000000342b8 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000034138 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000034088 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +00000000000347c8 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000034718 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000034598 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEE +00000000000344e8 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEE +00000000000341e8 V _ZTVN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000033fb8 V _ZTVN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000034648 V _ZTVN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEE +0000000000034418 V _ZTVN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEE +00000000000343c0 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +0000000000034310 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000034190 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +00000000000340e0 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000034820 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000034770 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEE +00000000000345f0 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000034540 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEE +0000000000034250 V _ZTVN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000034020 V _ZTVN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEE +00000000000346b0 V _ZTVN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEE +0000000000034480 V _ZTVN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEE +00000000000348d0 V _ZTVN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EEE +0000000000034928 V _ZTVN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EEE +0000000000034980 V _ZTVN7randomx6VmBaseINS_18LargePageAllocatorELb0EEE +00000000000349d8 V _ZTVN7randomx6VmBaseINS_18LargePageAllocatorELb1EEE + U _ZTVSt9bad_alloc@GLIBCXX_3.4 diff --git a/apps/arweave/priv/symbols_rx512.txt b/apps/arweave/priv/symbols_rx512.txt new file mode 100644 index 000000000..5194b518c --- /dev/null +++ b/apps/arweave/priv/symbols_rx512.txt @@ -0,0 +1,810 @@ +0000000000022d90 T allocLargePagesMemory +0000000000022d20 T allocMemoryPages + U __assert_fail@GLIBC_2.2.5 +000000000001c5f0 t blake2b_compress +0000000000029d60 r blake2b_sigma + U calloc@GLIBC_2.2.5 +000000000001f85c t call_offset +0000000000035920 b completed.0 +0000000000017400 T create_vm + U __cxa_allocate_exception@CXXABI_1.3 + U __cxa_atexit@GLIBC_2.2.5 + U __cxa_begin_catch@CXXABI_1.3 + U __cxa_end_catch@CXXABI_1.3 + w __cxa_finalize@GLIBC_2.2.5 + U __cxa_free_exception@CXXABI_1.3 + w __cxa_pure_virtual@CXXABI_1.3 + U __cxa_throw@CXXABI_1.3 +0000000000016c40 t deregister_tm_clones +00000000000174b0 T destroy_vm +0000000000016cb0 t __do_global_dtors_aux +0000000000032c70 d __do_global_dtors_aux_fini_array_entry +0000000000034680 d __dso_handle +00000000000347c8 d DW.ref.__gxx_personality_v0 +00000000000347c0 d DW.ref._ZTISt9exception +0000000000033a30 d _DYNAMIC +0000000000018020 t encrypt_chunk + U enif_alloc + U enif_alloc_resource + U enif_free + U enif_get_int + U enif_get_resource + U enif_get_uint + U enif_inspect_binary + U enif_make_atom + U enif_make_badarg + U enif_make_new_binary + U enif_make_resource + U enif_make_string + U enif_make_tuple + U enif_make_uint + U enif_open_resource_type + U enif_release_resource + U enif_rwlock_create + U enif_rwlock_destroy + U enif_rwlock_rlock + U enif_rwlock_runlock + U enif_thread_create + U enif_thread_join + U enif_thread_opts_create + U enif_thread_opts_destroy +00000000000346a0 d entry.0 +0000000000017fa0 T error +0000000000017f60 T error_tuple +000000000001f690 t exp240 +0000000000017aa0 T feistel_decrypt +0000000000017990 T feistel_encrypt +00000000000205e0 t fill_block +0000000000021120 t fill_block +0000000000021aa0 t fill_block +0000000000028e64 t _fini +0000000000016cf0 t frame_dummy +0000000000032c00 d __frame_dummy_init_array_entry +0000000000030aec r __FRAME_END__ + U free@GLIBC_2.2.5 +0000000000022dd0 T freePagedMemory +0000000000034000 d _GLOBAL_OFFSET_TABLE_ +00000000000163a0 t _GLOBAL__sub_I_allocator.cpp +0000000000016c10 t _GLOBAL__sub_I_bytecode_machine.cpp +0000000000016340 t _GLOBAL__sub_I_dataset.cpp +0000000000016be0 t _GLOBAL__sub_I_instructions_portable.cpp +0000000000016200 t _GLOBAL__sub_I_jit_compiler_x86.cpp +0000000000016110 t _GLOBAL__sub_I_randomx.cpp +00000000000160e0 t _GLOBAL__sub_I_randomx_long_with_entropy.cpp +00000000000163d0 t _GLOBAL__sub_I_superscalar.cpp +00000000000160c2 t _GLOBAL__sub_I_superscalar.cpp.cold +00000000000161a0 t _GLOBAL__sub_I_virtual_machine.cpp +0000000000016140 t _GLOBAL__sub_I_vm_compiled.cpp +00000000000161d0 t _GLOBAL__sub_I_vm_compiled_light.cpp +0000000000016370 t _GLOBAL__sub_I_vm_interpreted.cpp +0000000000016170 t _GLOBAL__sub_I_vm_interpreted_light.cpp + w __gmon_start__ +000000000002c5d0 r __GNU_EH_FRAME_HDR + U __gxx_personality_v0@CXXABI_1.3 +0000000000015000 t _init +00000000000171b0 T init +000000000001f851 t init_block_loop +0000000000016f90 T init_dataset +0000000000016d00 T init_dataset_thread +0000000000017140 T init_failed + w _ITM_deregisterTMCloneTable + w _ITM_registerTMCloneTable +0000000000016d30 T load +0000000000017fc0 T make_output_binary +000000000001f680 t mantissaMask +00000000000291c8 R MAX_CHUNK_SIZE + U memcmp@GLIBC_2.2.5 + U __memcpy_chk@GLIBC_2.3.4 + U memcpy@GLIBC_2.14 + U memmove@GLIBC_2.2.5 + U memset@GLIBC_2.2.5 + U mmap@GLIBC_2.2.5 + U mprotect@GLIBC_2.2.5 + U munmap@GLIBC_2.2.5 +0000000000034700 d nif_funcs +00000000000188c0 T nif_init +0000000000017ee0 T ok_tuple +0000000000017f20 T ok_tuple2 + U posix_memalign@GLIBC_2.2.5 +000000000001fa00 t r0_mul +000000000001fa08 t r1_add +000000000001fa10 t r2_add +000000000001fa18 t r3_add +000000000001fa20 t r4_add +000000000001fa28 t r5_add +000000000001fa30 t r6_add +000000000001fa38 t r7_add +0000000000018ab0 T randomx_alloc_cache +0000000000015d48 t randomx_alloc_cache.cold +0000000000018d40 T randomx_alloc_dataset +0000000000015dac t randomx_alloc_dataset.cold +0000000000027b00 T randomx_argon2_fill_memory_blocks +00000000000220b0 T randomx_argon2_fill_segment_avx2 +0000000000020f70 T randomx_argon2_fill_segment_ref +0000000000021890 T randomx_argon2_fill_segment_ssse3 +00000000000222b0 T randomx_argon2_impl_avx2 +0000000000021a90 T randomx_argon2_impl_ssse3 +0000000000027a20 T randomx_argon2_index_alpha +0000000000028030 T randomx_argon2_initialize +0000000000027b90 T randomx_argon2_validate_inputs +000000000001d1f0 T randomx_blake2b +000000000001d0b0 T randomx_blake2b_final +000000000001cc90 T randomx_blake2b_init +000000000001cf80 T randomx_blake2b_init_key +000000000001cb10 T randomx_blake2b_init_param +000000000001d2f0 T randomx_blake2b_long +000000000001cd50 T randomx_blake2b_update +00000000000198c0 T randomx_calculate_commitment +0000000000019620 T randomx_calculate_hash +0000000000019720 T randomx_calculate_hash_first +0000000000019830 T randomx_calculate_hash_last +0000000000017c00 T randomx_calculate_hash_long_with_entropy_get_entropy +0000000000019770 T randomx_calculate_hash_next +0000000000018de0 T randomx_create_vm +0000000000015df2 t randomx_create_vm.cold +000000000001f840 T randomx_dataset_init +0000000000018cd0 T randomx_dataset_item_count +0000000000017e20 T randomx_decrypt_chunk +0000000000018420 t randomx_decrypt_chunk_nif +0000000000019600 T randomx_destroy_vm +0000000000017da0 T randomx_encrypt_chunk +00000000000186a0 t randomx_encrypt_chunk_nif +0000000000018d10 T randomx_get_dataset_memory +00000000000188d0 T randomx_get_flags +00000000000174d0 T randomx_hash_nif +0000000000016de0 T randomx_info_nif +0000000000018970 T randomx_init_cache +0000000000015d31 t randomx_init_cache.cold +0000000000018ce0 T randomx_init_dataset +00000000000173f0 T randomx_init_nif +000000000001f580 T randomx_prefetch_scratchpad +000000000001f59a T randomx_prefetch_scratchpad_end +000000000001fa40 T randomx_program_end +000000000001f8c0 T randomx_program_epilogue +000000000001f6c0 T randomx_program_loop_begin +000000000001f82c T randomx_program_loop_end +000000000001f6c1 T randomx_program_loop_load +000000000001f7e8 T randomx_program_loop_store +000000000001f5c0 T randomx_program_prologue +000000000001f732 T randomx_program_read_dataset +000000000001f7b8 T randomx_program_read_dataset_sshash_fin +000000000001f774 T randomx_program_read_dataset_sshash_init +000000000001f731 T randomx_program_start +0000000000028250 T randomx_reciprocal +000000000001fa41 T randomx_reciprocal_fast +0000000000018120 t randomx_reencrypt_chunk_nif +0000000000018a70 T randomx_release_cache +0000000000018d20 T randomx_release_dataset +000000000001f970 T randomx_sshash_end +000000000001f980 T randomx_sshash_init +000000000001f940 T randomx_sshash_load +000000000001f95f T randomx_sshash_prefetch +0000000000019560 T randomx_vm_set_cache +00000000000195f0 T randomx_vm_set_dataset +0000000000016c70 t register_tm_clones +0000000000016d70 T release_randomx +0000000000027ce0 T rxa2_fill_first_blocks +0000000000027e40 T rxa2_initial_hash +000000000001f840 t rx_dataset_init +000000000001fa40 t rx_program_end +000000000001f6c0 t rx_program_loop_begin +000000000001f6a0 t scaleMask +0000000000022d60 T setPagesRW +0000000000022d80 T setPagesRWX +0000000000022d70 T setPagesRX + U SHA256_Final@OPENSSL_3.0.0 + U SHA256_Init@OPENSSL_3.0.0 + U SHA256_Update@OPENSSL_3.0.0 +0000000000017ea0 T solution_tuple + U __stack_chk_fail@GLIBC_2.4 +0000000000016db0 T state_dtor +0000000000035928 B stateType +0000000000035920 d __TMC_END__ + U _Unwind_Resume@GCC_3.0 +00000000000176b0 T validate_hash +000000000001fe20 W _Z11fillAes1Rx4ILb0EEvPvmS0_ +000000000001fd20 W _Z11fillAes1Rx4ILb1EEvPvmS0_ +00000000000200d0 W _Z11fillAes4Rx4ILb0EEvPvmS0_ +000000000001fea0 W _Z11fillAes4Rx4ILb1EEvPvmS0_ +000000000001fa60 W _Z11hashAes1Rx4ILb0EEvPKvmPv +000000000001fb00 W _Z11hashAes1Rx4ILb1EEvPKvmPv +0000000000022c00 T _Z11soft_aesdecDv2_xS_ +0000000000022ae0 T _Z11soft_aesencDv2_xS_ +00000000000176c0 T _Z12feistel_hashPKhS0_Ph +0000000000020190 W _Z18hashAndFillAes1Rx4ILb0EEvPvmS0_S0_ +00000000000202f0 W _Z18hashAndFillAes1Rx4ILb1EEvPvmS0_S0_ +0000000000028240 T _Z18loadDoublePortablePKv +0000000000017870 T _Z21feistel_decrypt_blockPKhS0_S0_PhS1_ +0000000000017750 T _Z21feistel_encrypt_blockPKhS0_S0_PhS1_ +0000000000028200 T _Z4mulhmm +0000000000028230 T _Z4rotlmj +0000000000028220 T _Z4rotrmj +00000000000222c0 T _Z5cpuidPii +0000000000028210 T _Z5smulhll + U _ZdlPv@GLIBCXX_3.4 +000000000002aea0 r _ZL7lutDec0 +000000000002aaa0 r _ZL7lutDec1 +000000000002a6a0 r _ZL7lutDec2 +000000000002a2a0 r _ZL7lutDec3 +000000000002bea0 r _ZL7lutEnc0 +000000000002baa0 r _ZL7lutEnc1 +000000000002b6a0 r _ZL7lutEnc2 +000000000002b2a0 r _ZL7lutEnc3 +000000000001b590 T _ZN10randomx_vm10initializeEv +000000000001b780 W _ZN10randomx_vm10setDatasetEP15randomx_dataset +000000000001b570 T _ZN10randomx_vm17resetRoundingModeEv +0000000000019960 W _ZN10randomx_vm8setCacheEP13randomx_cache +000000000001b550 T _ZN10randomx_vmD0Ev +000000000001b510 T _ZN10randomx_vmD1Ev +000000000001b510 T _ZN10randomx_vmD2Ev +00000000000357e8 D _ZN7randomx10codeShhEndE +000000000001a450 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001a600 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EE3runEPv +000000000001a5d0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EE7executeEv +000000000001a530 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEC1Ev +000000000001a530 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEC2Ev +000000000001a170 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EED0Ev +0000000000019f90 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EED1Ev +0000000000019f90 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EED2Ev +000000000001a520 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEdlEPv +000000000001a4d0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm.part.0 +000000000001a490 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001abe0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EE3runEPv +000000000001abb0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EE7executeEv +000000000001ab30 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEC1Ev +000000000001ab30 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEC2Ev +000000000001a0f0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EED0Ev +0000000000019ff0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EED1Ev +0000000000019ff0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EED2Ev +000000000001ab20 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEdlEPv +000000000001aad0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm.part.0 +000000000001a460 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001a780 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EE3runEPv +000000000001a750 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EE7executeEv +000000000001a6b0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEC1Ev +000000000001a6b0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEC2Ev +000000000001a3d0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EED0Ev +000000000001a1f0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EED1Ev +000000000001a1f0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EED2Ev +000000000001a6a0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEdlEPv +000000000001a650 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm.part.0 +000000000001a4a0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001ad60 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EE3runEPv +000000000001ad30 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EE7executeEv +000000000001acb0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEC1Ev +000000000001acb0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEC2Ev +000000000001a350 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EED0Ev +000000000001a250 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EED1Ev +000000000001a250 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EED2Ev +000000000001aca0 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEdlEPv +000000000001ac50 W _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm.part.0 +000000000001a470 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001a900 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EE3runEPv +000000000001a8d0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EE7executeEv +000000000001a830 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEC1Ev +000000000001a830 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEC2Ev +0000000000019cb0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EED0Ev +0000000000019ad0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EED1Ev +0000000000019ad0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EED2Ev +000000000001a820 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEdlEPv +000000000001a7d0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEnwEm.part.0 +000000000001a4b0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001aee0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EE3runEPv +000000000001aeb0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EE7executeEv +000000000001ae30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEC1Ev +000000000001ae30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEC2Ev +0000000000019c30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EED0Ev +0000000000019b30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EED1Ev +0000000000019b30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EED2Ev +000000000001ae20 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEdlEPv +000000000001add0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEnwEm.part.0 +000000000001a480 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001aa80 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EE3runEPv +000000000001aa50 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EE7executeEv +000000000001a9b0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEC1Ev +000000000001a9b0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEC2Ev +0000000000019f10 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EED0Ev +0000000000019d30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EED1Ev +0000000000019d30 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EED2Ev +000000000001a9a0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEdlEPv +000000000001a950 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEnwEm.part.0 +000000000001a4c0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001b060 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EE3runEPv +000000000001b030 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EE7executeEv +000000000001afb0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEC1Ev +000000000001afb0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEC2Ev +0000000000019e90 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EED0Ev +0000000000019d90 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EED1Ev +0000000000019d90 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EED2Ev +000000000001afa0 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEdlEPv +000000000001af50 W _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEnwEm.part.0 +0000000000035810 D _ZN7randomx11codeLoopEndE +00000000000357e0 D _ZN7randomx11codeShhInitE +00000000000357f8 D _ZN7randomx11codeShhLoadE +0000000000022560 T _ZN7randomx11initDatasetEP13randomx_cachePhjj +0000000000035808 D _ZN7randomx12codeEpilogueE +0000000000035848 D _ZN7randomx12codeLoopLoadE +0000000000035858 D _ZN7randomx12codePrologueE +00000000000228f0 W _ZN7randomx12deallocCacheINS_16AlignedAllocatorILm64EEEEEvP13randomx_cache +0000000000022940 W _ZN7randomx12deallocCacheINS_18LargePageAllocatorEEEvP13randomx_cache +0000000000035850 D _ZN7randomx13codeLoopBeginE +0000000000035818 D _ZN7randomx13codeLoopStoreE +0000000000035900 D _ZN7randomx13DecoderBuffer13decodeBuffersE +0000000000035aa0 B _ZN7randomx13DecoderBuffer15decodeBuffer484E +0000000000035a40 B _ZN7randomx13DecoderBuffer15decodeBuffer493E +0000000000035a00 B _ZN7randomx13DecoderBuffer16decodeBuffer3310E +0000000000035a60 B _ZN7randomx13DecoderBuffer16decodeBuffer3733E +0000000000035a20 B _ZN7randomx13DecoderBuffer16decodeBuffer4444E +0000000000035a80 B _ZN7randomx13DecoderBuffer16decodeBuffer7333E +00000000000359e0 B _ZN7randomx13DecoderBuffer7DefaultE +0000000000022de0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE10setDatasetEP15randomx_dataset +0000000000022e00 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE11datasetReadEmRA8_m +0000000000023120 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE15datasetPrefetchEm +00000000000236e0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE3runEPv +00000000000231c0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EE7executeEv +000000000001a090 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EED0Ev +000000000001a050 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EED1Ev +000000000001a050 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EED2Ev +00000000000231b0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEdlEPv +0000000000023160 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEnwEm.part.0 +0000000000022eb0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE10setDatasetEP15randomx_dataset +0000000000022ed0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE11datasetReadEmRA8_m +0000000000023130 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE15datasetPrefetchEm +0000000000023c80 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE3runEPv +0000000000023760 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EE7executeEv +000000000001a2f0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EED0Ev +000000000001a2b0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EED1Ev +000000000001a2b0 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EED2Ev +0000000000023750 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEdlEPv +0000000000023700 W _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEnwEm.part.0 +0000000000022f80 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE10setDatasetEP15randomx_dataset +0000000000022fa0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE11datasetReadEmRA8_m +0000000000023140 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE15datasetPrefetchEm +0000000000024220 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE3runEPv +0000000000023d00 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EE7executeEv +0000000000019bd0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EED0Ev +0000000000019b90 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EED1Ev +0000000000019b90 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EED2Ev +0000000000023cf0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEdlEPv +0000000000023ca0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEnwEm.part.0 +0000000000023050 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE10setDatasetEP15randomx_dataset +0000000000023070 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE11datasetReadEmRA8_m +0000000000023150 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE15datasetPrefetchEm +00000000000247c0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE3runEPv +00000000000242a0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EE7executeEv +0000000000019e30 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EED0Ev +0000000000019df0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EED1Ev +0000000000019df0 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EED2Ev +0000000000024290 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEdlEPv +0000000000024240 W _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEnwEm +0000000000015d00 t _ZN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEnwEm.part.0 +0000000000035800 D _ZN7randomx14codeProgramEndE +0000000000019a70 W _ZN7randomx14deallocDatasetINS_16AlignedAllocatorILm64EEEEEvP15randomx_dataset +0000000000019aa0 W _ZN7randomx14deallocDatasetINS_18LargePageAllocatorEEEvP15randomx_dataset +000000000001db90 T _ZN7randomx14JitCompilerX8610h_IMUL_RCPERNS_11InstructionEi +000000000001e9c0 T _ZN7randomx14JitCompilerX8610h_ISMULH_MERNS_11InstructionEi +000000000001d6d0 T _ZN7randomx14JitCompilerX8610h_ISMULH_RERNS_11InstructionEi +000000000001df20 T _ZN7randomx14JitCompilerX8611getCodeSizeEv +000000000001eff0 T _ZN7randomx14JitCompilerX8612generateCodeERNS_11InstructionEi +000000000001e000 T _ZN7randomx14JitCompilerX8613enableWritingEv +000000000001e570 T _ZN7randomx14JitCompilerX8613genAddressImmERNS_11InstructionE +000000000001e1b0 T _ZN7randomx14JitCompilerX8613genAddressRegERNS_11InstructionEb +000000000001e020 T _ZN7randomx14JitCompilerX8615enableExecutionEv +000000000001f1a0 T _ZN7randomx14JitCompilerX8615generateProgramERNS_7ProgramERNS_20ProgramConfigurationE +000000000001e430 T _ZN7randomx14JitCompilerX8616genAddressRegDstERNS_11InstructionE +000000000001f200 T _ZN7randomx14JitCompilerX8620generateProgramLightERNS_7ProgramERNS_20ProgramConfigurationEj +000000000001e040 T _ZN7randomx14JitCompilerX8623generateDatasetInitCodeEv +000000000001e060 T _ZN7randomx14JitCompilerX8623generateProgramEpilogueERNS_7ProgramERNS_20ProgramConfigurationE +000000000001f070 T _ZN7randomx14JitCompilerX8623generateProgramPrologueERNS_7ProgramERNS_20ProgramConfigurationE +000000000001ebb0 T _ZN7randomx14JitCompilerX8623generateSuperscalarCodeERNS_11InstructionERSt6vectorImSaImEE +000000000001f2e0 W _ZN7randomx14JitCompilerX8623generateSuperscalarHashILm8EEEvRAT__NS_18SuperscalarProgramERSt6vectorImSaImEE +000000000001efd0 T _ZN7randomx14JitCompilerX865h_NOPERNS_11InstructionEi +00000000000347e0 D _ZN7randomx14JitCompilerX866engineE +000000000001eae0 T _ZN7randomx14JitCompilerX866genSIBEiii +000000000001e290 T _ZN7randomx14JitCompilerX868h_FADD_MERNS_11InstructionEi +000000000001d900 T _ZN7randomx14JitCompilerX868h_FADD_RERNS_11InstructionEi +000000000001e390 T _ZN7randomx14JitCompilerX868h_FDIV_MERNS_11InstructionEi +000000000001d980 T _ZN7randomx14JitCompilerX868h_FMUL_RERNS_11InstructionEi +000000000001e310 T _ZN7randomx14JitCompilerX868h_FSUB_MERNS_11InstructionEi +000000000001d940 T _ZN7randomx14JitCompilerX868h_FSUB_RERNS_11InstructionEi +000000000001e590 T _ZN7randomx14JitCompilerX868h_IADD_MERNS_11InstructionEi +000000000001e7d0 T _ZN7randomx14JitCompilerX868h_IMUL_MERNS_11InstructionEi +000000000001de70 T _ZN7randomx14JitCompilerX868h_IMUL_RERNS_11InstructionEi +000000000001d790 T _ZN7randomx14JitCompilerX868h_INEG_RERNS_11InstructionEi +000000000001eef0 T _ZN7randomx14JitCompilerX868h_IROL_RERNS_11InstructionEi +000000000001dd90 T _ZN7randomx14JitCompilerX868h_IROR_RERNS_11InstructionEi +000000000001e500 T _ZN7randomx14JitCompilerX868h_ISTOREERNS_11InstructionEi +000000000001e650 T _ZN7randomx14JitCompilerX868h_ISUB_MERNS_11InstructionEi +000000000001dc30 T _ZN7randomx14JitCompilerX868h_ISUB_RERNS_11InstructionEi +000000000001e710 T _ZN7randomx14JitCompilerX868h_IXOR_MERNS_11InstructionEi +000000000001dce0 T _ZN7randomx14JitCompilerX868h_IXOR_RERNS_11InstructionEi +000000000001dfe0 T _ZN7randomx14JitCompilerX869enableAllEv +000000000001da60 T _ZN7randomx14JitCompilerX869h_CBRANCHERNS_11InstructionEi +000000000001d9c0 T _ZN7randomx14JitCompilerX869h_CFROUNDERNS_11InstructionEi +000000000001d880 T _ZN7randomx14JitCompilerX869h_FSCAL_RERNS_11InstructionEi +000000000001d8c0 T _ZN7randomx14JitCompilerX869h_FSQRT_RERNS_11InstructionEi +000000000001d830 T _ZN7randomx14JitCompilerX869h_FSWAP_RERNS_11InstructionEi +000000000001eb00 T _ZN7randomx14JitCompilerX869h_IADD_RSERNS_11InstructionEi +000000000001e8a0 T _ZN7randomx14JitCompilerX869h_IMULH_MERNS_11InstructionEi +000000000001d610 T _ZN7randomx14JitCompilerX869h_IMULH_RERNS_11InstructionEi +000000000001d7d0 T _ZN7randomx14JitCompilerX869h_ISWAP_RERNS_11InstructionEi +000000000001df30 T _ZN7randomx14JitCompilerX86C1Ev +000000000001df30 T _ZN7randomx14JitCompilerX86C2Ev +0000000000016000 t _ZN7randomx14JitCompilerX86C2Ev.cold +000000000001dfb0 T _ZN7randomx14JitCompilerX86D1Ev +000000000001dfb0 T _ZN7randomx14JitCompilerX86D2Ev +00000000000281a0 T _ZN7randomx15Blake2Generator7getByteEv +0000000000028160 T _ZN7randomx15Blake2Generator9checkDataEm +00000000000281d0 T _ZN7randomx15Blake2Generator9getUInt32Ev +00000000000280a0 T _ZN7randomx15Blake2GeneratorC1EPKvmi +00000000000280a0 T _ZN7randomx15Blake2GeneratorC2EPKvmi +0000000000028650 T _ZN7randomx15BytecodeMachine18compileInstructionERNS_11InstructionEiRNS_19InstructionByteCodeE +0000000000028290 T _ZN7randomx15BytecodeMachine18executeInstructionERNS_19InstructionByteCodeERiPhRNS_20ProgramConfigurationE +000000000002c5b0 R _ZN7randomx15BytecodeMachine4zeroE +0000000000035820 D _ZN7randomx15codeDatasetInitE +0000000000035840 D _ZN7randomx15codeProgamStartE +0000000000035838 D _ZN7randomx15codeReadDatasetE +00000000000357f0 D _ZN7randomx15codeShhPrefetchE +00000000000199f0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001bf30 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EE3runEPv +000000000001be70 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EE8setCacheEP13randomx_cache +000000000001a1b0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EED0Ev +0000000000019fc0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EED1Ev +0000000000019fc0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EED2Ev +000000000001c340 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEdlEPv +000000000001c2f0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEnwEm.part.0 +0000000000019a00 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001c170 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EE3runEPv +000000000001c030 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EE8setCacheEP13randomx_cache +000000000001a130 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EED0Ev +000000000001a020 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EED1Ev +000000000001a020 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EED2Ev +000000000001c4c0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEdlEPv +000000000001c470 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEnwEm.part.0 +0000000000019a30 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001bf70 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EE3runEPv +000000000001bea0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EE8setCacheEP13randomx_cache +000000000001a410 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EED0Ev +000000000001a220 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EED1Ev +000000000001a220 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EED2Ev +000000000001c3a0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEdlEPv +000000000001c350 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEnwEm.part.0 +0000000000019a40 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001c1d0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EE3runEPv +000000000001c080 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EE8setCacheEP13randomx_cache +000000000001a390 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EED0Ev +000000000001a280 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EED1Ev +000000000001a280 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EED2Ev +000000000001c520 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEdlEPv +000000000001c4d0 W _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEnwEm.part.0 +0000000000019970 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EE10setDatasetEP15randomx_dataset +000000000001bfb0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EE3runEPv +000000000001bed0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EE8setCacheEP13randomx_cache +0000000000019cf0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EED0Ev +0000000000019b00 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EED1Ev +0000000000019b00 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EED2Ev +000000000001c400 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEdlEPv +000000000001c3b0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEnwEm.part.0 +0000000000019980 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EE10setDatasetEP15randomx_dataset +000000000001c230 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EE3runEPv +000000000001c0d0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EE8setCacheEP13randomx_cache +0000000000019c70 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EED0Ev +0000000000019b60 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EED1Ev +0000000000019b60 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EED2Ev +000000000001c580 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEdlEPv +000000000001c530 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEnwEm.part.0 +00000000000199b0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EE10setDatasetEP15randomx_dataset +000000000001bff0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EE3runEPv +000000000001bf00 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EE8setCacheEP13randomx_cache +0000000000019f50 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EED0Ev +0000000000019d60 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EED1Ev +0000000000019d60 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EED2Ev +000000000001c460 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEdlEPv +000000000001c410 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEnwEm.part.0 +00000000000199c0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EE10setDatasetEP15randomx_dataset +000000000001c290 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EE3runEPv +000000000001c120 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EE8setCacheEP13randomx_cache +0000000000019ed0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EED0Ev +0000000000019dc0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EED1Ev +0000000000019dc0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EED2Ev +000000000001c5e0 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEdlEPv +000000000001c590 W _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEnwEm +0000000000015d00 t _ZN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEnwEm.part.0 +0000000000022390 T _ZN7randomx15initDatasetItemEP13randomx_cachePhm +00000000000248a0 W _ZN7randomx16AlignedAllocatorILm64EE10freeMemoryEPvm +0000000000024810 W _ZN7randomx16AlignedAllocatorILm64EE11allocMemoryEm +00000000000228b0 T _ZN7randomx16initCacheCompileEP13randomx_cachePKvm +00000000000248b0 T _ZN7randomx18executeSuperscalarERA8_mRNS_18SuperscalarProgramEPSt6vectorImSaImEE +0000000000019a10 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE10setDatasetEP15randomx_dataset +000000000001b150 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE11datasetReadEmRA8_m +0000000000019a20 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE15datasetPrefetchEm +000000000001b0d0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EE8setCacheEP13randomx_cache +000000000001a0c0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EED0Ev +000000000001a070 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EED1Ev +000000000001a070 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EED2Ev +000000000001b3e0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEdlEPv +000000000001b390 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEnwEm.part.0 +0000000000019a50 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE10setDatasetEP15randomx_dataset +000000000001b1e0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE11datasetReadEmRA8_m +0000000000019a60 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE15datasetPrefetchEm +000000000001b0f0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EE8setCacheEP13randomx_cache +000000000001a320 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EED0Ev +000000000001a2d0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EED1Ev +000000000001a2d0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EED2Ev +000000000001b440 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEdlEPv +000000000001b3f0 W _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEnwEm.part.0 +0000000000019990 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE10setDatasetEP15randomx_dataset +000000000001b270 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE11datasetReadEmRA8_m +00000000000199a0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE15datasetPrefetchEm +000000000001b110 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EE8setCacheEP13randomx_cache +0000000000019c00 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EED0Ev +0000000000019bb0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EED1Ev +0000000000019bb0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EED2Ev +000000000001b4a0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEdlEPv +000000000001b450 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEnwEm.part.0 +00000000000199d0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE10setDatasetEP15randomx_dataset +000000000001b300 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE11datasetReadEmRA8_m +00000000000199e0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE15datasetPrefetchEm +000000000001b130 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EE8setCacheEP13randomx_cache +0000000000019e60 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EED0Ev +0000000000019e10 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EED1Ev +0000000000019e10 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EED2Ev +000000000001b500 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEdlEPv +000000000001b4b0 W _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEnwEm +0000000000015d00 t _ZN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEnwEm.part.0 +0000000000024800 T _ZN7randomx18LargePageAllocator10freeMemoryEPvm +00000000000247e0 T _ZN7randomx18LargePageAllocator11allocMemoryEm +0000000000016060 t _ZN7randomx18LargePageAllocator11allocMemoryEm.cold +0000000000024ac0 T _ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE +000000000001608e t _ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE.cold +00000000000359a0 B _ZN7randomx22SuperscalarInstruction4NullE +0000000000035828 D _ZN7randomx26codeReadDatasetLightSshFinE +0000000000035ac0 B _ZN7randomx26SuperscalarInstructionInfo3NOPE +0000000000035d80 B _ZN7randomx26SuperscalarInstructionInfo6IMUL_RE +0000000000035d40 B _ZN7randomx26SuperscalarInstructionInfo6IROR_CE +0000000000035e40 B _ZN7randomx26SuperscalarInstructionInfo6ISUB_RE +0000000000035e00 B _ZN7randomx26SuperscalarInstructionInfo6IXOR_RE +0000000000035d00 B _ZN7randomx26SuperscalarInstructionInfo7IADD_C7E +0000000000035c80 B _ZN7randomx26SuperscalarInstructionInfo7IADD_C8E +0000000000035c00 B _ZN7randomx26SuperscalarInstructionInfo7IADD_C9E +0000000000035dc0 B _ZN7randomx26SuperscalarInstructionInfo7IADD_RSE +0000000000035b80 B _ZN7randomx26SuperscalarInstructionInfo7IMULH_RE +0000000000035cc0 B _ZN7randomx26SuperscalarInstructionInfo7IXOR_C7E +0000000000035c40 B _ZN7randomx26SuperscalarInstructionInfo7IXOR_C8E +0000000000035bc0 B _ZN7randomx26SuperscalarInstructionInfo7IXOR_C9E +0000000000035b00 B _ZN7randomx26SuperscalarInstructionInfo8IMUL_RCPE +0000000000035b40 B _ZN7randomx26SuperscalarInstructionInfo8ISMULH_RE +0000000000027830 W _ZN7randomx26SuperscalarInstructionInfoC1EPKcNS_26SuperscalarInstructionTypeERKNS_7MacroOpEi +00000000000276d0 W _ZN7randomx26SuperscalarInstructionInfoC1ILm3EEEPKcNS_26SuperscalarInstructionTypeERAT__KNS_7MacroOpEiii +0000000000027830 W _ZN7randomx26SuperscalarInstructionInfoC2EPKcNS_26SuperscalarInstructionTypeERKNS_7MacroOpEi +00000000000276d0 W _ZN7randomx26SuperscalarInstructionInfoC2ILm3EEEPKcNS_26SuperscalarInstructionTypeERAT__KNS_7MacroOpEiii +0000000000027530 W _ZN7randomx26SuperscalarInstructionInfoD1Ev +0000000000027530 W _ZN7randomx26SuperscalarInstructionInfoD2Ev +0000000000035830 D _ZN7randomx27codeReadDatasetLightSshInitE +00000000000222e0 T _ZN7randomx3CpuC1Ev +00000000000222e0 T _ZN7randomx3CpuC2Ev +00000000000358e0 D _ZN7randomx6slot_3E +00000000000358a0 D _ZN7randomx6slot_4E +0000000000035890 D _ZN7randomx6slot_7E +0000000000035880 D _ZN7randomx6slot_8E +0000000000035870 D _ZN7randomx6slot_9E +000000000001b980 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE11hashAndFillEPvmPm +000000000001b8e0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE14getFinalResultEPvm +000000000001b8a0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE14initScratchpadEPv +000000000001bd00 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE15generateProgramEPv +000000000001b810 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EE8allocateEv +000000000001bce0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EED0Ev +000000000001bcb0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EED1Ev +000000000001bcb0 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EED2Ev +000000000001bb00 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE11hashAndFillEPvmPm +000000000001ba60 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE14getFinalResultEPvm +000000000001ba20 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE14initScratchpadEPv +000000000001bd70 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE15generateProgramEPv +000000000001b790 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EE8allocateEv +000000000001bd50 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EED0Ev +000000000001bd20 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EED1Ev +000000000001bd20 W _ZN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EED2Ev +000000000001b9d0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE11hashAndFillEPvmPm +000000000001b930 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE14getFinalResultEPvm +000000000001b8c0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE14initScratchpadEPv +000000000001bde0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE15generateProgramEPv +000000000001bba0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EE8allocateEv +000000000001bdc0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EED0Ev +000000000001bd90 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EED1Ev +000000000001bd90 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb0EED2Ev +000000000001bb50 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE11hashAndFillEPvmPm +000000000001bab0 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE14getFinalResultEPvm +000000000001ba40 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE14initScratchpadEPv +000000000001be50 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE15generateProgramEPv +000000000001bc30 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EE8allocateEv +000000000001be30 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EED0Ev +000000000001be00 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EED1Ev +000000000001be00 W _ZN7randomx6VmBaseINS_18LargePageAllocatorELb1EED2Ev +0000000000035e80 B _ZN7randomx7MacroOp12TestJz_fusedE +0000000000036000 B _ZN7randomx7MacroOp5Mul_rE +0000000000035f60 B _ZN7randomx7MacroOp6Add_riE +0000000000036080 B _ZN7randomx7MacroOp6Add_rrE +0000000000035ec0 B _ZN7randomx7MacroOp6Cmp_riE +0000000000036020 B _ZN7randomx7MacroOp6Imul_rE +0000000000035fe0 B _ZN7randomx7MacroOp6Mov_rrE +0000000000035f80 B _ZN7randomx7MacroOp6Ror_riE +0000000000036060 B _ZN7randomx7MacroOp6Sub_rrE +0000000000035f40 B _ZN7randomx7MacroOp6Xor_riE +0000000000036040 B _ZN7randomx7MacroOp6Xor_rrE +0000000000035fa0 B _ZN7randomx7MacroOp7Imul_rrE +0000000000035fc0 B _ZN7randomx7MacroOp7Lea_sibE +0000000000035f00 B _ZN7randomx7MacroOp7Ror_rclE +0000000000035ea0 B _ZN7randomx7MacroOp7Setcc_rE +0000000000035f20 B _ZN7randomx7MacroOp8Mov_ri64E +0000000000035ee0 B _ZN7randomx7MacroOp8Xor_selfE +0000000000035860 D _ZN7randomx7slot_10E +00000000000358c0 D _ZN7randomx7slot_3LE +00000000000225d0 T _ZN7randomx9initCacheEP13randomx_cachePKvm +0000000000035964 b _ZN7randomxL12epilogueSizeE +000000000003597c b _ZN7randomxL12loopLoadSizeE +0000000000035980 b _ZN7randomxL12prologueSizeE +000000000003596c b _ZN7randomxL13loopStoreSizeE +0000000000035954 b _ZN7randomxL14epilogueOffsetE +0000000000035958 b _ZN7randomxL15codeSshInitSizeE +0000000000035960 b _ZN7randomxL15codeSshLoadSizeE +0000000000035968 b _ZN7randomxL15datasetInitSizeE +0000000000035978 b _ZN7randomxL15readDatasetSizeE +0000000000036140 b _ZN7randomxL17IMULH_R_ops_arrayE +00000000000360a0 b _ZN7randomxL18IMUL_RCP_ops_arrayE +00000000000360e0 b _ZN7randomxL18ISMULH_R_ops_arrayE +000000000003595c b _ZN7randomxL19codeSshPrefetchSizeE +0000000000035970 b _ZN7randomxL23readDatasetLightFinSizeE +0000000000035974 b _ZN7randomxL24readDatasetLightInitSizeE +000000000002c320 r _ZN7randomxL7buffer0E +000000000002c310 r _ZN7randomxL7buffer1E +000000000002c300 r _ZN7randomxL7buffer2E +000000000002c2f0 r _ZN7randomxL7buffer3E +000000000002c2e0 r _ZN7randomxL7buffer4E +000000000002c2d0 r _ZN7randomxL7buffer5E +0000000000035940 b _ZN7randomxL8aesDummyE + U _ZNSt13runtime_errorC1EPKc@GLIBCXX_3.4.21 + U _ZNSt13runtime_errorD1Ev@GLIBCXX_3.4 + U _ZNSt16invalid_argumentC1EPKc@GLIBCXX_3.4.21 + U _ZNSt16invalid_argumentD1Ev@GLIBCXX_3.4 +00000000000278d0 W _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ +000000000001f430 W _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_ +0000000000022990 W _ZNSt6vectorImSaImEE17_M_realloc_insertIJRKmEEEvN9__gnu_cxx17__normal_iteratorIPmS1_EEDpOT_ +0000000000027550 W _ZNSt6vectorIN7randomx7MacroOpESaIS1_EE17_M_realloc_insertIJS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_ + U _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@GLIBCXX_3.4.21 + U _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_@GLIBCXX_3.4.21 + U _ZNSt8ios_base4InitC1Ev@GLIBCXX_3.4 + U _ZNSt8ios_base4InitD1Ev@GLIBCXX_3.4 + U _ZNSt9bad_allocD1Ev@GLIBCXX_3.4 + U _Znwm@GLIBCXX_3.4 + U _ZSt20__throw_length_errorPKc@GLIBCXX_3.4 +0000000000035931 b _ZStL8__ioinit +0000000000035984 b _ZStL8__ioinit +0000000000035987 b _ZStL8__ioinit +00000000000361a0 b _ZStL8__ioinit +0000000000035930 b _ZStL8__ioinit +0000000000035932 b _ZStL8__ioinit +0000000000035933 b _ZStL8__ioinit +0000000000035950 b _ZStL8__ioinit +0000000000035951 b _ZStL8__ioinit +0000000000035985 b _ZStL8__ioinit +0000000000035986 b _ZStL8__ioinit +00000000000361a1 b _ZStL8__ioinit +00000000000361a2 b _ZStL8__ioinit +0000000000032c88 V _ZTI10randomx_vm +0000000000032df8 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +0000000000032dc8 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000032d30 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000032d00 V _ZTIN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000032f88 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000032f58 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000032ec0 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000032e90 V _ZTIN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEE +0000000000032d78 V _ZTIN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000032cb0 V _ZTIN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000032f08 V _ZTIN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEE +0000000000032e40 V _ZTIN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEE +0000000000032c78 V _ZTIN7randomx15BytecodeMachineE +0000000000032e10 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +0000000000032de0 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000032d48 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000032d18 V _ZTIN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000032fa0 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000032f70 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000032ed8 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000032ea8 V _ZTIN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEE +0000000000032db0 V _ZTIN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000032ce8 V _ZTIN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000032f40 V _ZTIN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEE +0000000000032e78 V _ZTIN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEE +0000000000032d60 V _ZTIN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EEE +0000000000032c98 V _ZTIN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EEE +0000000000032ef0 V _ZTIN7randomx6VmBaseINS_18LargePageAllocatorELb0EEE +0000000000032e28 V _ZTIN7randomx6VmBaseINS_18LargePageAllocatorELb1EEE + U _ZTISt13runtime_error@GLIBCXX_3.4 + U _ZTISt16invalid_argument@GLIBCXX_3.4 + U _ZTISt9bad_alloc@GLIBCXX_3.4 + U _ZTISt9exception@GLIBCXX_3.4 +0000000000029540 V _ZTS10randomx_vm +0000000000029900 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +0000000000029860 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +00000000000296e0 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000029640 V _ZTSN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000029ca0 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000029c20 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000029ae0 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000029a60 V _ZTSN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEE +00000000000297c0 V _ZTSN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEE +00000000000295a0 V _ZTSN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000029ba0 V _ZTSN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEE +00000000000299e0 V _ZTSN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEE +0000000000029520 V _ZTSN7randomx15BytecodeMachineE +0000000000029940 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +00000000000298a0 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000029720 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000029680 V _ZTSN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000029ce0 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000029c60 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000029b20 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000029aa0 V _ZTSN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEE +0000000000029800 V _ZTSN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEE +00000000000295e0 V _ZTSN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000029be0 V _ZTSN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEE +0000000000029a20 V _ZTSN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEE +0000000000029780 V _ZTSN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EEE +0000000000029560 V _ZTSN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EEE +0000000000029b60 V _ZTSN7randomx6VmBaseINS_18LargePageAllocatorELb0EEE +00000000000299a0 V _ZTSN7randomx6VmBaseINS_18LargePageAllocatorELb1EEE +0000000000033878 V _ZTV10randomx_vm + U _ZTVN10__cxxabiv117__class_type_infoE@CXXABI_1.3 + U _ZTVN10__cxxabiv120__si_class_type_infoE@CXXABI_1.3 + U _ZTVN10__cxxabiv121__vmi_class_type_infoE@CXXABI_1.3 +0000000000033368 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +00000000000332b8 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000033138 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +0000000000033088 V _ZTVN7randomx10CompiledVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +00000000000337c8 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000033718 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb0ELb1EEE +0000000000033598 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb0EEE +00000000000334e8 V _ZTVN7randomx10CompiledVmINS_18LargePageAllocatorELb1ELb1EEE +00000000000331e8 V _ZTVN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000032fb8 V _ZTVN7randomx13InterpretedVmINS_16AlignedAllocatorILm64EEELb1EEE +0000000000033648 V _ZTVN7randomx13InterpretedVmINS_18LargePageAllocatorELb0EEE +0000000000033418 V _ZTVN7randomx13InterpretedVmINS_18LargePageAllocatorELb1EEE +00000000000333c0 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb0EEE +0000000000033310 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb0ELb1EEE +0000000000033190 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb0EEE +00000000000330e0 V _ZTVN7randomx15CompiledLightVmINS_16AlignedAllocatorILm64EEELb1ELb1EEE +0000000000033820 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb0EEE +0000000000033770 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb0ELb1EEE +00000000000335f0 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb0EEE +0000000000033540 V _ZTVN7randomx15CompiledLightVmINS_18LargePageAllocatorELb1ELb1EEE +0000000000033250 V _ZTVN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb0EEE +0000000000033020 V _ZTVN7randomx18InterpretedLightVmINS_16AlignedAllocatorILm64EEELb1EEE +00000000000336b0 V _ZTVN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb0EEE +0000000000033480 V _ZTVN7randomx18InterpretedLightVmINS_18LargePageAllocatorELb1EEE +00000000000338d0 V _ZTVN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb0EEE +0000000000033928 V _ZTVN7randomx6VmBaseINS_16AlignedAllocatorILm64EEELb1EEE +0000000000033980 V _ZTVN7randomx6VmBaseINS_18LargePageAllocatorELb0EEE +00000000000339d8 V _ZTVN7randomx6VmBaseINS_18LargePageAllocatorELb1EEE + U _ZTVSt9bad_alloc@GLIBCXX_3.4 diff --git a/apps/arweave/src/ar_bench_hash.erl b/apps/arweave/src/ar_bench_hash.erl index ba9163ff5..9547a45e3 100644 --- a/apps/arweave/src/ar_bench_hash.erl +++ b/apps/arweave/src/ar_bench_hash.erl @@ -12,7 +12,7 @@ run_benchmark_from_cli(Args) -> HardwareAES = list_to_integer(get_flag_value(Args, "hw_aes", "1")), Schedulers = erlang:system_info(dirty_cpu_schedulers_online), - {ok, RandomXStateRef} = ar_mine_randomx:init_randomx_nif( + {ok, RandomXStateRef} = ar_rx512_nif:rx512_init_nif( ?RANDOMX_PACKING_KEY, ?RANDOMX_HASHING_MODE_FAST, JIT, LargePages, Schedulers), {H0, H1} = run_benchmark(RandomXStateRef, JIT, LargePages, HardwareAES), H0String = io_lib:format("~.3f", [H0 / 1000]), @@ -49,7 +49,8 @@ run_benchmark(RandomXStateRef, JIT, LargePages, HardwareAES) -> PartitionNumber = rand:uniform(1000), Data = << NonceLimiterOutput:32/binary, PartitionNumber:256, Seed:32/binary, MiningAddr/binary >>, - ar_mine_randomx:hash_nif(RandomXStateRef, Data, JIT, LargePages, HardwareAES) + ?LOG_ERROR(RandomXStateRef), + ar_rx512_nif:rx512_hash_nif(RandomXStateRef, Data, JIT, LargePages, HardwareAES) end, lists:seq(1, Iterations)) end), diff --git a/apps/arweave/src/ar_bench_packing.erl b/apps/arweave/src/ar_bench_packing.erl index 4a7529e2c..c6f16f9da 100644 --- a/apps/arweave/src/ar_bench_packing.erl +++ b/apps/arweave/src/ar_bench_packing.erl @@ -235,7 +235,7 @@ write_packed_data(Config, UnpackedFilename, PackedFilename) -> } = Config, io:format("Generating input file: ~s~n", [PackedFilename]), {ok, RandomXState} = ar_bench_timer:record({init}, - fun ar_mine_randomx:init_randomx_nif/5, + fun ar_rx512_nif:rx512_init_nif/5, [?RANDOMX_PACKING_KEY, ?RANDOMX_HASHING_MODE_FAST, JIT, LargePages, NumWorkers]), UnpackedFileHandle = open_file(UnpackedFilename, [read, binary]), @@ -292,7 +292,7 @@ run_dirty_benchmark(Config) -> end, {ok, RandomXState} = ar_bench_timer:record({init}, - fun ar_mine_randomx:init_randomx_nif/5, + fun ar_rx512_nif:rx512_init_nif/5, [?RANDOMX_PACKING_KEY, ?RANDOMX_HASHING_MODE_FAST, JIT, LargePages, NumWorkers]), run_dirty_test(Config2#test_config{randomx_state = RandomXState}). @@ -368,7 +368,7 @@ baseline_pack_chunks(WorkerID, Config, Offset, Size) -> ReadResult = file:pread(UnpackedFileHandle, Offset, ChunkSize), RemainingSize = case ReadResult of {ok, UnpackedChunk} -> - {ok, PackedChunk} = ar_mine_randomx:randomx_encrypt_chunk_nif( + {ok, PackedChunk} = ar_rx512_nif:rx512_encrypt_chunk_nif( RandomXState, Key, UnpackedChunk, ?RANDOMX_PACKING_ROUNDS_2_6, JIT, LargePages, HardwareAES), file:pwrite(PackedFileHandle, Offset, PackedChunk), @@ -406,7 +406,7 @@ baseline_pack_composite_chunks(WorkerID, Config, Offset, Size) -> ReadResult = file:pread(UnpackedFileHandle, Offset, ChunkSize), RemainingSize = case ReadResult of {ok, UnpackedChunk} -> - {ok, PackedChunk} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif( + {ok, PackedChunk} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif( RandomXState, Key, UnpackedChunk, JIT, LargePages, HardwareAES, Rounds, PackingDifficulty, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT), @@ -443,10 +443,10 @@ baseline_repack_chunks(WorkerID, Config, Offset, Size) -> ReadResult = file:pread(PackedFileHandle, Offset, ChunkSize), RemainingSize = case ReadResult of {ok, PackedChunk} -> - {ok, UnpackedChunk} = ar_mine_randomx:randomx_decrypt_chunk_nif( + {ok, UnpackedChunk} = ar_rx512_nif:rx512_decrypt_chunk_nif( RandomXState, UnpackKey, PackedChunk, ChunkSize, ?RANDOMX_PACKING_ROUNDS_2_6, JIT, LargePages, HardwareAES), - {ok, RepackedChunk} =ar_mine_randomx:randomx_encrypt_chunk_nif( + {ok, RepackedChunk} =ar_rx512_nif:rx512_encrypt_chunk_nif( RandomXState, PackKey, UnpackedChunk, ?RANDOMX_PACKING_ROUNDS_2_6, JIT, LargePages, HardwareAES), file:pwrite(RepackedFileHandle, Offset, RepackedChunk), @@ -482,7 +482,7 @@ nif_repack_chunks(WorkerID, Config, Offset, Size) -> ReadResult = file:pread(PackedFileHandle, Offset, ChunkSize), RemainingSize = case ReadResult of {ok, PackedChunk} -> - {ok, RepackedChunk, _} = ar_mine_randomx:randomx_reencrypt_chunk_nif( + {ok, RepackedChunk, _} = ar_rx512_nif:rx512_reencrypt_chunk_nif( RandomXState, UnpackKey, PackKey, PackedChunk, ChunkSize, ?RANDOMX_PACKING_ROUNDS_2_6, ?RANDOMX_PACKING_ROUNDS_2_6, JIT, LargePages, HardwareAES), @@ -555,7 +555,7 @@ nif_repack_composite_chunks(WorkerID, Config, Offset, Size) -> ReadResult = file:pread(PackedFileHandle, Offset, ChunkSize), RemainingSize = case ReadResult of {ok, PackedChunk} -> - {ok, RepackedChunk, _} = ar_mine_randomx:randomx_reencrypt_composite_chunk_nif( + {ok, RepackedChunk, _} = ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif( RandomXState, UnpackKey, PackKey, PackedChunk, JIT, LargePages, HardwareAES, Rounds, Rounds, PackingDifficulty, PackingDifficulty, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT), diff --git a/apps/arweave/src/ar_mine_randomx.erl b/apps/arweave/src/ar_mine_randomx.erl index 1619a2371..90c4cb6da 100755 --- a/apps/arweave/src/ar_mine_randomx.erl +++ b/apps/arweave/src/ar_mine_randomx.erl @@ -1,7 +1,5 @@ -module(ar_mine_randomx). --on_load(init_nif/0). - -export([init_fast/2, init_light/1, hash/2, randomx_encrypt_chunk/4, randomx_decrypt_chunk/5, @@ -10,18 +8,7 @@ %% These exports are required for the DEBUG mode, where these functions are unused. %% Also, some of these functions are used in ar_mine_randomx_tests. --export([hash_nif/5, randomx_info_nif/1, init_randomx_nif/5, - jit/0, large_pages/0, hardware_aes/0, - randomx_encrypt_chunk_nif/7, randomx_decrypt_chunk_nif/8, - randomx_reencrypt_chunk_nif/10, - vdf_sha2_nif/5, - vdf_parallel_sha_verify_with_reset_nif/10, - - randomx_encrypt_composite_chunk_nif/9, - randomx_decrypt_composite_chunk_nif/10, - randomx_decrypt_composite_sub_chunk_nif/10, - randomx_reencrypt_composite_chunk_nif/13 -]). +-export([jit/0, large_pages/0, hardware_aes/0]). -include_lib("arweave/include/ar.hrl"). -include_lib("arweave/include/ar_consensus.hrl"). @@ -40,14 +27,15 @@ hash({debug_state, Key}, Data) -> crypto:hash(sha256, << Key/binary, Data/binary >>). -else. init_fast(Key, Threads) -> - {ok, FastState} = init_randomx_nif(Key, ?RANDOMX_HASHING_MODE_FAST, jit(), large_pages(), Threads), + {ok, FastState} = ar_rx512_nif:rx512_init_nif(Key, ?RANDOMX_HASHING_MODE_FAST, jit(), large_pages(), Threads), FastState. init_light(Key) -> - {ok, LightState} = init_randomx_nif(Key, ?RANDOMX_HASHING_MODE_LIGHT, jit(), large_pages(), 0), + {ok, LightState} = ar_rx512_nif:rx512_init_nif(Key, ?RANDOMX_HASHING_MODE_LIGHT, jit(), large_pages(), 0), LightState. hash(State, Data) -> + ?LOG_ERROR("hash(State, Data)"), {ok, Hash} = - hash_nif(State, Data, jit(), large_pages(), hardware_aes()), + ar_rx512_nif:rx512_hash_nif(State, Data, jit(), large_pages(), hardware_aes()), Hash. -endif. @@ -148,11 +136,11 @@ split_into_sub_chunks(<< SubChunk:8192/binary, Rest/binary >>, StartOffset) -> %% DEBUG implementation randomx_decrypt_chunk2({debug_state, _}, Key, Chunk, _ChunkSize, - {composite, _, PackingDifficulty} = _Packing) -> -Options = [{encrypt, false}], -IV = binary:part(Key, {0, 16}), -SubChunks = split_into_sub_chunks(Chunk), -{ok, iolist_to_binary(lists:map( + {composite, _, PackingDifficulty} = _Packing) -> + Options = [{encrypt, false}], + IV = binary:part(Key, {0, 16}), + SubChunks = split_into_sub_chunks(Chunk), + {ok, iolist_to_binary(lists:map( fun({SubChunkStartOffset, SubChunk}) -> Key2 = crypto:hash(sha256, << Key/binary, SubChunkStartOffset:24 >>), lists:foldl( @@ -170,14 +158,14 @@ randomx_decrypt_chunk2({debug_state, _}, Key, Chunk, _ChunkSize, _Packing) -> {ok, crypto:crypto_one_time(aes_256_cbc, Key, IV, Chunk, Options)}; %% Non-DEBUG implementation randomx_decrypt_chunk2(RandomxState, Key, Chunk, ChunkSize, spora_2_5) -> - randomx_decrypt_chunk_nif(RandomxState, Key, Chunk, ChunkSize, ?RANDOMX_PACKING_ROUNDS, + ar_rx512_nif:rx512_decrypt_chunk_nif(RandomxState, Key, Chunk, ChunkSize, ?RANDOMX_PACKING_ROUNDS, jit(), large_pages(), hardware_aes()); randomx_decrypt_chunk2(RandomxState, Key, Chunk, ChunkSize, {spora_2_6, _Addr}) -> - randomx_decrypt_chunk_nif(RandomxState, Key, Chunk, ChunkSize, ?RANDOMX_PACKING_ROUNDS_2_6, + ar_rx512_nif:rx512_decrypt_chunk_nif(RandomxState, Key, Chunk, ChunkSize, ?RANDOMX_PACKING_ROUNDS_2_6, jit(), large_pages(), hardware_aes()); randomx_decrypt_chunk2(RandomxState, Key, Chunk, ChunkSize, {composite, _Addr, PackingDifficulty}) -> - randomx_decrypt_composite_chunk_nif(RandomxState, Key, Chunk, ChunkSize, + ar_rx4096_nif:rx4096_decrypt_composite_chunk_nif(RandomxState, Key, Chunk, ChunkSize, jit(), large_pages(), hardware_aes(), ?COMPOSITE_PACKING_ROUND_COUNT, PackingDifficulty, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT). @@ -195,7 +183,7 @@ randomx_decrypt_sub_chunk2(Packing, RandomxState, Key, Chunk, SubChunkStartOffse {_, _, IterationCount} = Packing, RoundCount = ?COMPOSITE_PACKING_ROUND_COUNT, OutSize = ?COMPOSITE_PACKING_SUB_CHUNK_SIZE, - randomx_decrypt_composite_sub_chunk_nif(RandomxState, Key, Chunk, OutSize, + ar_rx4096_nif:rx4096_decrypt_composite_sub_chunk_nif(RandomxState, Key, Chunk, OutSize, jit(), large_pages(), hardware_aes(), RoundCount, IterationCount, SubChunkStartOffset). %% DEBUG implementation @@ -222,7 +210,7 @@ randomx_encrypt_chunk2(_Packing, {debug_state, _}, Key, Chunk) -> ar_packing_server:pad_chunk(Chunk), Options)}; %% Non-DEBUG implementation randomx_encrypt_chunk2(spora_2_5, RandomxState, Key, Chunk) -> - case randomx_encrypt_chunk_nif(RandomxState, Key, Chunk, ?RANDOMX_PACKING_ROUNDS, jit(), + case ar_rx512_nif:rx512_encrypt_chunk_nif(RandomxState, Key, Chunk, ?RANDOMX_PACKING_ROUNDS, jit(), large_pages(), hardware_aes()) of {error, Error} -> {exception, Error}; @@ -230,7 +218,7 @@ randomx_encrypt_chunk2(spora_2_5, RandomxState, Key, Chunk) -> Reply end; randomx_encrypt_chunk2({spora_2_6, _Addr}, RandomxState, Key, Chunk) -> - case randomx_encrypt_chunk_nif(RandomxState, Key, Chunk, ?RANDOMX_PACKING_ROUNDS_2_6, + case ar_rx512_nif:rx512_encrypt_chunk_nif(RandomxState, Key, Chunk, ?RANDOMX_PACKING_ROUNDS_2_6, jit(), large_pages(), hardware_aes()) of {error, Error} -> {exception, Error}; @@ -238,7 +226,7 @@ randomx_encrypt_chunk2({spora_2_6, _Addr}, RandomxState, Key, Chunk) -> Reply end; randomx_encrypt_chunk2({composite, _Addr, PackingDifficulty}, RandomxState, Key, Chunk) -> - case randomx_encrypt_composite_chunk_nif(RandomxState, Key, Chunk, + case ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(RandomxState, Key, Chunk, jit(), large_pages(), hardware_aes(), ?COMPOSITE_PACKING_ROUND_COUNT, PackingDifficulty, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT) of {error, Error} -> @@ -268,7 +256,7 @@ randomx_reencrypt_chunk2(SourcePacking, TargetPacking, randomx_reencrypt_chunk2({composite, Addr1, PackingDifficulty1}, {composite, Addr2, PackingDifficulty2}, RandomxState, UnpackKey, PackKey, Chunk, ChunkSize) -> - case randomx_reencrypt_composite_chunk_nif(RandomxState, UnpackKey, + case ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif(RandomxState, UnpackKey, PackKey, Chunk, jit(), large_pages(), hardware_aes(), ?COMPOSITE_PACKING_ROUND_COUNT, ?COMPOSITE_PACKING_ROUND_COUNT, PackingDifficulty1, PackingDifficulty2, @@ -306,64 +294,10 @@ randomx_reencrypt_chunk2(SourcePacking, TargetPacking, RandomxState, UnpackKey, PackKey, Chunk, ChunkSize) -> UnpackRounds = packing_rounds(SourcePacking), PackRounds = packing_rounds(TargetPacking), - case randomx_reencrypt_chunk_nif(RandomxState, UnpackKey, PackKey, Chunk, ChunkSize, + case ar_rx512_nif:rx512_reencrypt_chunk_nif(RandomxState, UnpackKey, PackKey, Chunk, ChunkSize, UnpackRounds, PackRounds, jit(), large_pages(), hardware_aes()) of {error, Error} -> {exception, Error}; Reply -> Reply end. - -%% ------------------------------------------------------------------------------------------- -%% NIF functions -%% ------------------------------------------------------------------------------------------- -randomx_info_nif(_State) -> - erlang:nif_error(nif_not_loaded). - -init_randomx_nif(_Key, _HashingMode, _JIT, _LargePages, _Threads) -> - erlang:nif_error(nif_not_loaded). - -hash_nif(_State, _Data, _JIT, _LargePages, _HardwareAES) -> - erlang:nif_error(nif_not_loaded). - -randomx_encrypt_chunk_nif(_State, _Data, _Chunk, _RoundCount, _JIT, _LargePages, _HardwareAES) -> - erlang:nif_error(nif_not_loaded). - -randomx_decrypt_chunk_nif(_State, _Data, _Chunk, _OutSize, _RoundCount, _JIT, _LargePages, - _HardwareAES) -> - erlang:nif_error(nif_not_loaded). - -randomx_reencrypt_chunk_nif(_State, _DecryptKey, _EncryptKey, _Chunk, _ChunkSize, - _DecryptRoundCount, _EncryptRoundCount, _JIT, _LargePages, _HardwareAES) -> - erlang:nif_error(nif_not_loaded). - -vdf_sha2_nif(_Salt, _PrevState, _CheckpointCount, _skipCheckpointCount, _Iterations) -> - erlang:nif_error(nif_not_loaded). -vdf_parallel_sha_verify_with_reset_nif(_Salt, _PrevState, _CheckpointCount, - _skipCheckpointCount, _Iterations, _InCheckpoint, _InRes, _ResetSalt, _ResetSeed, - _MaxThreadCount) -> - erlang:nif_error(nif_not_loaded). - -randomx_encrypt_composite_chunk_nif(_State, _Key, _Chunk, _JIT, _LargePages, _HardwareAES, - _RoundCount, _IterationCount, _SubChunkCount) -> - erlang:nif_error(nif_not_loaded). - -randomx_decrypt_composite_chunk_nif(_State, _Data, _Chunk, _OutSize, - _JIT, _LargePages, _HardwareAES, _RoundCount, _IterationCount, _SubChunkCount) -> - erlang:nif_error(nif_not_loaded). - -randomx_decrypt_composite_sub_chunk_nif(_State, _Data, _Chunk, _OutSize, - _JIT, _LargePages, _HardwareAES, _RoundCount, _IterationCount, _Offset) -> - erlang:nif_error(nif_not_loaded). - -randomx_reencrypt_composite_chunk_nif(_State, - _DecryptKey, _EncryptKey, _Chunk, - _JIT, _LargePages, _HardwareAES, - _DecryptRoundCount, _EncryptRoundCount, - _DecryptIterationCount, _EncryptIterationCount, - _DecryptSubChunkCount, _EncryptSubChunkCount) -> - erlang:nif_error(nif_not_loaded). - -init_nif() -> - PrivDir = code:priv_dir(arweave), - ok = erlang:load_nif(filename:join([PrivDir, "arweave"]), 0). diff --git a/apps/arweave/src/ar_packing_server.erl b/apps/arweave/src/ar_packing_server.erl index 5559494df..c69c7a6ef 100644 --- a/apps/arweave/src/ar_packing_server.erl +++ b/apps/arweave/src/ar_packing_server.erl @@ -171,14 +171,17 @@ start_link() -> %%%=================================================================== init([]) -> + ?LOG_ERROR([{event, init}, {module, ?MODULE}]), {ok, Config} = application:get_env(arweave, config), Schedulers = erlang:system_info(dirty_cpu_schedulers_online), ar:console("~nInitialising RandomX dataset for fast packing. Key: ~p. " "The process may take several minutes.~n", [ar_util:encode(?RANDOMX_PACKING_KEY)]), PackingStateRef = ar_mine_randomx:init_fast(?RANDOMX_PACKING_KEY, Schedulers), + ?LOG_ERROR([{event, init}, {module, ?MODULE}, {loc, a}]), ar:console("RandomX dataset initialisation complete.~n", []), ets:insert(?MODULE, {randomx_packing_state, PackingStateRef}), {H0, H1} = ar_bench_hash:run_benchmark(PackingStateRef), + ?LOG_ERROR([{event, init}, {module, ?MODULE}, {loc, b}]), H0String = io_lib:format("~.3f", [H0 / 1000]), H1String = io_lib:format("~.3f", [H1 / 1000]), ar:console("Hashing benchmark~nH0: ~s ms~nH1/H2: ~s ms~n", [H0String, H1String]), @@ -206,9 +209,11 @@ init([]) -> end, {ConfiguredRate, SchedulersRequired2} end, + record_packing_benchmarks({TheoreticalMaxRate, PackingRate, Schedulers, ActualRatePack_2_5, ActualRatePack_2_6, ActualRateUnpack_2_5, ActualRateUnpack_2_6}), + ?LOG_ERROR([{event, init}, {module, ?MODULE}, {loc, c}]), SpawnSchedulers = min(SchedulersRequired, Schedulers), ar:console("~nStarting ~B packing threads.~n", [SpawnSchedulers]), %% Since the total rate of spawned processes might exceed the desired rate, @@ -233,6 +238,7 @@ init([]) -> ar:console("~nSetting the packing chunk cache size limit to ~B chunks.~n", [MaxSize]), ets:insert(?MODULE, {buffer_size_limit, MaxSize}), timer:apply_interval(200, ?MODULE, record_buffer_size_metric, []), + ?LOG_ERROR([{event, init}, {module, ?MODULE}, {loc, d}]), {ok, #state{ workers = Workers, num_workers = SpawnSchedulers }}. diff --git a/apps/arweave/src/ar_rx4096_nif.erl b/apps/arweave/src/ar_rx4096_nif.erl new file mode 100755 index 000000000..5ab69dd97 --- /dev/null +++ b/apps/arweave/src/ar_rx4096_nif.erl @@ -0,0 +1,58 @@ +-module(ar_rx4096_nif). + +-include_lib("arweave/include/ar.hrl"). + +-on_load(init_nif/0). + +-export([rx4096_hash_nif/5, rx4096_info_nif/1, rx4096_init_nif/5, + rx4096_encrypt_composite_chunk_nif/9, + rx4096_decrypt_composite_chunk_nif/10, + rx4096_decrypt_composite_sub_chunk_nif/10, + rx4096_reencrypt_composite_chunk_nif/13 +]). + +%%%=================================================================== +%%% Public interface. +%%%=================================================================== + +rx4096_info_nif(_State) -> + ?LOG_ERROR("rx4096_info_nif"), + erlang:nif_error(nif_not_loaded). + +rx4096_init_nif(_Key, _HashingMode, _JIT, _LargePages, _Threads) -> + ?LOG_ERROR("rx4096_init_nif"), + erlang:nif_error(nif_not_loaded). + +rx4096_hash_nif(_State, _Data, _JIT, _LargePages, _HardwareAES) -> + ?LOG_ERROR("rx4096_hash_nif"), + erlang:nif_error(nif_not_loaded). + +rx4096_encrypt_composite_chunk_nif(_State, _Key, _Chunk, _JIT, _LargePages, _HardwareAES, + _RoundCount, _IterationCount, _SubChunkCount) -> + ?LOG_ERROR("rx4096_encrypt_composite_chunk_nif"), + erlang:nif_error(nif_not_loaded). + +rx4096_decrypt_composite_chunk_nif(_State, _Data, _Chunk, _OutSize, + _JIT, _LargePages, _HardwareAES, _RoundCount, _IterationCount, _SubChunkCount) -> + ?LOG_ERROR("rx4096_decrypt_composite_chunk_nif"), + erlang:nif_error(nif_not_loaded). + +rx4096_decrypt_composite_sub_chunk_nif(_State, _Data, _Chunk, _OutSize, + _JIT, _LargePages, _HardwareAES, _RoundCount, _IterationCount, _Offset) -> + ?LOG_ERROR("rx4096_decrypt_composite_sub_chunk_nif"), + erlang:nif_error(nif_not_loaded). + +rx4096_reencrypt_composite_chunk_nif(_State, + _DecryptKey, _EncryptKey, _Chunk, + _JIT, _LargePages, _HardwareAES, + _DecryptRoundCount, _EncryptRoundCount, + _DecryptIterationCount, _EncryptIterationCount, + _DecryptSubChunkCount, _EncryptSubChunkCount) -> + ?LOG_ERROR("rx4096_reencrypt_composite_chunk_nif"), + erlang:nif_error(nif_not_loaded). + +init_nif() -> + ?LOG_ERROR("Loading ar_rx4096_nif"), + PrivDir = code:priv_dir(arweave), + ok = erlang:load_nif(filename:join([PrivDir, "rx4096_arweave"]), 0), + ?LOG_ERROR("Loaded ar_rx4096_nif"). diff --git a/apps/arweave/src/ar_rx512_nif.erl b/apps/arweave/src/ar_rx512_nif.erl new file mode 100755 index 000000000..027281cf6 --- /dev/null +++ b/apps/arweave/src/ar_rx512_nif.erl @@ -0,0 +1,46 @@ +-module(ar_rx512_nif). + +-include_lib("arweave/include/ar.hrl"). + +-on_load(init_nif/0). + +-export([rx512_hash_nif/5, rx512_info_nif/1, rx512_init_nif/5, + rx512_encrypt_chunk_nif/7, rx512_decrypt_chunk_nif/8, + rx512_reencrypt_chunk_nif/10 +]). + +%%%=================================================================== +%%% Public interface. +%%%=================================================================== + +rx512_info_nif(_State) -> + ?LOG_ERROR("rx512_info_nif"), + erlang:nif_error(nif_not_loaded). + +rx512_init_nif(_Key, _HashingMode, _JIT, _LargePages, _Threads) -> + ?LOG_ERROR("rx512_init_nif"), + erlang:nif_error(nif_not_loaded). + +rx512_hash_nif(_State, _Data, _JIT, _LargePages, _HardwareAES) -> + ?LOG_ERROR("rx512_hash_nif"), + erlang:nif_error(nif_not_loaded). + +rx512_encrypt_chunk_nif(_State, _Data, _Chunk, _RoundCount, _JIT, _LargePages, _HardwareAES) -> + ?LOG_ERROR("rx512_encrypt_chunk_nif"), + erlang:nif_error(nif_not_loaded). + +rx512_decrypt_chunk_nif(_State, _Data, _Chunk, _OutSize, _RoundCount, _JIT, _LargePages, + _HardwareAES) -> + ?LOG_ERROR("rx512_decrypt_chunk_nif"), + erlang:nif_error(nif_not_loaded). + +rx512_reencrypt_chunk_nif(_State, _DecryptKey, _EncryptKey, _Chunk, _ChunkSize, + _DecryptRoundCount, _EncryptRoundCount, _JIT, _LargePages, _HardwareAES) -> + ?LOG_ERROR("rx512_reencrypt_chunk_nif"), + erlang:nif_error(nif_not_loaded). + +init_nif() -> + ?LOG_ERROR("Loading ar_rx512_nif"), + PrivDir = code:priv_dir(arweave), + ok = erlang:load_nif(filename:join([PrivDir, "rx512_arweave"]), 0), + ?LOG_ERROR("Loaded ar_rx512_nif"). diff --git a/apps/arweave/src/ar_vdf.erl b/apps/arweave/src/ar_vdf.erl index c08ef2250..1b3a7f86a 100755 --- a/apps/arweave/src/ar_vdf.erl +++ b/apps/arweave/src/ar_vdf.erl @@ -16,7 +16,7 @@ step_number_to_salt_number(StepNumber) -> compute(StartStepNumber, PrevOutput, IterationCount) -> Salt = step_number_to_salt_number(StartStepNumber - 1), SaltBinary = << Salt:256 >>, - ar_mine_randomx:vdf_sha2_nif(SaltBinary, PrevOutput, ?VDF_CHECKPOINT_COUNT_IN_STEP - 1, 0, + ar_vdf_nif:vdf_sha2_nif(SaltBinary, PrevOutput, ?VDF_CHECKPOINT_COUNT_IN_STEP - 1, 0, IterationCount). -ifdef(DEBUG). @@ -44,7 +44,7 @@ verify(StartSalt, PrevOutput, NumCheckpointsBetweenHashes, Hashes, RestStepsSize = ?VDF_BYTE_SIZE * (NumHashes - 1), case HashBuffer of << RestSteps:RestStepsSize/binary, LastStep:?VDF_BYTE_SIZE/binary >> -> - case ar_mine_randomx:vdf_parallel_sha_verify_with_reset_nif(StartSaltBinary, + case ar_vdf_nif:vdf_parallel_sha_verify_with_reset_nif(StartSaltBinary, PrevOutput, NumHashes - 1, NumCheckpointsBetweenHashes - 1, IterationCount, RestSteps, LastStep, ResetSaltBinary, ResetSeed, ThreadCount) of diff --git a/apps/arweave/src/ar_vdf_nif.erl b/apps/arweave/src/ar_vdf_nif.erl new file mode 100755 index 000000000..0d7251717 --- /dev/null +++ b/apps/arweave/src/ar_vdf_nif.erl @@ -0,0 +1,25 @@ +-module(ar_vdf_nif). + +-include_lib("arweave/include/ar.hrl"). + +-on_load(init_nif/0). + +-export([vdf_sha2_nif/5, vdf_parallel_sha_verify_with_reset_nif/10]). + +%%%=================================================================== +%%% Public interface. +%%%=================================================================== +vdf_sha2_nif(_Salt, _PrevState, _CheckpointCount, _skipCheckpointCount, _Iterations) -> + ?LOG_ERROR("vdf_sha2_nif"), + erlang:nif_error(nif_not_loaded). +vdf_parallel_sha_verify_with_reset_nif(_Salt, _PrevState, _CheckpointCount, + _skipCheckpointCount, _Iterations, _InCheckpoint, _InRes, _ResetSalt, _ResetSeed, + _MaxThreadCount) -> + ?LOG_ERROR("vdf_parallel_sha_verify_with_reset_nif"), + erlang:nif_error(nif_not_loaded). + +init_nif() -> + ?LOG_ERROR("Loading ar_vdf_nif"), + PrivDir = code:priv_dir(arweave), + ok = erlang:load_nif(filename:join([PrivDir, "vdf_arweave"]), 0), + ?LOG_ERROR("Loaded ar_vdf_nif"). diff --git a/apps/arweave/test/ar_mine_randomx_tests.erl b/apps/arweave/test/ar_mine_randomx_tests.erl index 914df00eb..bdd284d9f 100644 --- a/apps/arweave/test/ar_mine_randomx_tests.erl +++ b/apps/arweave/test/ar_mine_randomx_tests.erl @@ -12,44 +12,44 @@ ). encrypt_chunk(FastState, Key, Chunk, PackingRounds, JIT, LargePages, HardwareAES, _ExtraArgs) -> - ar_mine_randomx:randomx_encrypt_chunk_nif( + ar_rx512_nif:rx512_encrypt_chunk_nif( FastState, Key, Chunk, PackingRounds, JIT, LargePages, HardwareAES). decrypt_chunk(FastState, Key, Chunk, PackingRounds, JIT, LargePages, HardwareAES, _ExtraArgs) -> - ar_mine_randomx:randomx_decrypt_chunk_nif( + ar_rx512_nif:rx512_decrypt_chunk_nif( FastState, Key, Chunk, byte_size(Chunk), PackingRounds, JIT, LargePages, HardwareAES). reencrypt_chunk(FastState, Key1, Key2, Chunk, PackingRounds1, PackingRounds2, JIT, LargePages, HardwareAES, _ExtraArgs) -> - ar_mine_randomx:randomx_reencrypt_chunk_nif( + ar_rx512_nif:rx512_reencrypt_chunk_nif( FastState, Key1, Key2, Chunk, byte_size(Chunk), PackingRounds1, PackingRounds2, JIT, LargePages, HardwareAES). encrypt_composite_chunk(FastState, Key, Chunk, PackingRounds, JIT, LargePages, HardwareAES, [IterationCount, SubChunkCount] = _ExtraArgs) -> - ar_mine_randomx:randomx_encrypt_composite_chunk_nif( + ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif( FastState, Key, Chunk, JIT, LargePages, HardwareAES, PackingRounds, IterationCount, SubChunkCount). decrypt_composite_chunk(FastState, Key, Chunk, PackingRounds, JIT, LargePages, HardwareAES, [IterationCount, SubChunkCount] = _ExtraArgs) -> - ar_mine_randomx:randomx_decrypt_composite_chunk_nif( + ar_rx4096_nif:rx4096_decrypt_composite_chunk_nif( FastState, Key, Chunk, byte_size(Chunk), JIT, LargePages, HardwareAES, PackingRounds, IterationCount, SubChunkCount). reencrypt_composite_chunk(FastState, Key1, Key2, Chunk, PackingRounds1, PackingRounds2, JIT, LargePages, HardwareAES, [IterationCount1, IterationCount2, SubChunkCount1, SubChunkCount2] = _ExtraArgs) -> - ar_mine_randomx:randomx_reencrypt_composite_chunk_nif( + ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif( FastState, Key1, Key2, Chunk, JIT, LargePages, HardwareAES, PackingRounds1, PackingRounds2, IterationCount1, IterationCount2, SubChunkCount1, SubChunkCount2). setup() -> - {ok, FastState} = ar_mine_randomx:init_randomx_nif( + {ok, FastState} = ar_rx512_nif:rx512_init_nif( ?RANDOMX_PACKING_KEY, ?RANDOMX_HASHING_MODE_FAST, 0, 0, erlang:system_info(dirty_cpu_schedulers_online)), - {ok, LightState} = ar_mine_randomx:init_randomx_nif( + {ok, LightState} = ar_rx512_nif:rx512_init_nif( ?RANDOMX_PACKING_KEY, ?RANDOMX_HASHING_MODE_LIGHT, 0, 0, erlang:system_info(dirty_cpu_schedulers_online)), {FastState, LightState}. @@ -87,14 +87,14 @@ test_state({FastState, LightState}) -> %% So the expected dataset size is 568,433,920 / 64 = 8,881,780 items. ?assertEqual( {ok, fast, 8881780}, - ar_mine_randomx:randomx_info_nif(FastState) + ar_rx512_nif:rx512_info_nif(FastState) ), %% Unfortunately we don't have access to the cache size. The randomx_info_nif will check %% that in fast mode the cache is not initialized, and in light mode the dataset is not %% initialized and return an error if either check fails. ?assertEqual( {ok, light, 0}, - ar_mine_randomx:randomx_info_nif(LightState) + ar_rx512_nif:rx512_info_nif(LightState) ). test_regression({FastState, LightState}) -> @@ -142,17 +142,17 @@ test_regression({FastState, LightState}) -> % UnpackedFixture = ar_test_node:load_fixture("ar_mine_randomx_tests/unpacked.bin"), % Dir = filename:dirname(?FILE), - % {ok, Packed1} = ar_mine_randomx:randomx_encrypt_chunk_nif( + % {ok, Packed1} = ar_rx512_nif:rx512_encrypt_chunk_nif( % FastState, Key, UnpackedFixture, 8, 0, 0, 0), % Packed1Filename = filename:join([Dir, "fixtures", "ar_mine_randomx_tests", "packed.spora26.bin"]), % ok = file:write_file(Packed1Filename, Packed1), - % {ok, Packed1} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif( + % {ok, Packed1} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif( % FastState, Key, UnpackedFixture, 0, 0, 0, 8, 1, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT), % Packed1Filename = filename:join([Dir, "fixtures", "ar_mine_randomx_tests", "packed.composite.1.bin"]), % ok = file:write_file(Packed1Filename, Packed1), - % {ok, Packed2} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif( + % {ok, Packed2} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif( % FastState, Key, UnpackedFixture, 0, 0, 0, 8, 2, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT), % Packed2Filename = filename:join([Dir, "fixtures", "ar_mine_randomx_tests", "packed.composite.2.bin"]), % ok = file:write_file(Packed2Filename, Packed2), @@ -193,14 +193,14 @@ test_nif_wrappers(State, Chunk) -> KeyA = crypto:strong_rand_bytes(32), KeyB= crypto:strong_rand_bytes(32), %% spora_26 randomx_encrypt_chunk - {ok, Packed_2_6A} = ar_mine_randomx:randomx_encrypt_chunk_nif( + {ok, Packed_2_6A} = ar_rx512_nif:rx512_encrypt_chunk_nif( State, KeyA, Chunk, ?RANDOMX_PACKING_ROUNDS_2_6, ar_mine_randomx:jit(), ar_mine_randomx:large_pages(), ar_mine_randomx:hardware_aes()), ?assertEqual({ok, Packed_2_6A}, ar_mine_randomx:randomx_encrypt_chunk({spora_2_6, AddrA}, State, KeyA, Chunk)), %% composite randomx_encrypt_composite_chunk - {ok, PackedCompositeA2} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif( + {ok, PackedCompositeA2} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif( State, KeyA, Chunk, ar_mine_randomx:jit(), ar_mine_randomx:large_pages(), ar_mine_randomx:hardware_aes(), ?COMPOSITE_PACKING_ROUND_COUNT, 2, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT), @@ -218,14 +218,14 @@ test_nif_wrappers(State, Chunk) -> {composite, AddrA, 2}, State, KeyA, PackedCompositeA2, byte_size(Chunk))), %% Prepare data for the reencryption tests - {ok, Packed_2_6B} = ar_mine_randomx:randomx_encrypt_chunk_nif( + {ok, Packed_2_6B} = ar_rx512_nif:rx512_encrypt_chunk_nif( State, KeyB, Chunk, ?RANDOMX_PACKING_ROUNDS_2_6, ar_mine_randomx:jit(), ar_mine_randomx:large_pages(), ar_mine_randomx:hardware_aes()), - {ok, PackedCompositeA3} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif( + {ok, PackedCompositeA3} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif( State, KeyA, Chunk, ar_mine_randomx:jit(), ar_mine_randomx:large_pages(), ar_mine_randomx:hardware_aes(), ?COMPOSITE_PACKING_ROUND_COUNT, 3, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT), - {ok, PackedCompositeB3} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif( + {ok, PackedCompositeB3} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif( State, KeyB, Chunk, ar_mine_randomx:jit(), ar_mine_randomx:large_pages(), ar_mine_randomx:hardware_aes(), ?COMPOSITE_PACKING_ROUND_COUNT, 3, ?COMPOSITE_PACKING_SUB_CHUNK_COUNT), @@ -388,16 +388,16 @@ test_composite_packing({FastState, _LightState}) -> ChunkWithoutPadding = crypto:strong_rand_bytes(?DATA_CHUNK_SIZE - 5), Chunk = << ChunkWithoutPadding/binary, 0:(5 * 8) >>, Key = crypto:strong_rand_bytes(32), - {ok, Packed} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Chunk, + {ok, Packed} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 1, 1), Key2 = crypto:hash(sha256, << Key/binary, ?DATA_CHUNK_SIZE:24 >>), - {ok, Packed2} = ar_mine_randomx:randomx_encrypt_chunk_nif(FastState, Key2, Chunk, + {ok, Packed2} = ar_rx512_nif:rx512_encrypt_chunk_nif(FastState, Key2, Chunk, 8, % RANDOMX_PACKING_ROUNDS 0, 0, 0), ?assertEqual(Packed, Packed2), - {ok, Packed3} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, + {ok, Packed3} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, ChunkWithoutPadding, 0, 0, 0, 8, 1, 1), - {ok, Packed4} = ar_mine_randomx:randomx_encrypt_chunk_nif(FastState, Key2, ChunkWithoutPadding, + {ok, Packed4} = ar_rx512_nif:rx512_encrypt_chunk_nif(FastState, Key2, ChunkWithoutPadding, 8, % RANDOMX_PACKING_ROUNDS 0, 0, 0), ?assertEqual(Packed3, Packed4). @@ -405,18 +405,18 @@ test_composite_packing({FastState, _LightState}) -> test_composite_packs_incrementally({FastState, _LightState}) -> Chunk = crypto:strong_rand_bytes(?DATA_CHUNK_SIZE - 3), Key = crypto:strong_rand_bytes(32), - {ok, Packed1} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Chunk, + {ok, Packed1} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 1, 32), - {ok, Packed2} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Packed1, + {ok, Packed2} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Packed1, 0, 0, 0, 8, 1, 32), - {ok, Packed3} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Chunk, + {ok, Packed3} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 2, 32), ?assertEqual(Packed2, Packed3), - {ok, Packed4} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Chunk, + {ok, Packed4} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 3, 32), - {ok, Packed5} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Packed1, + {ok, Packed5} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Packed1, 0, 0, 0, 8, 2, 32), - {ok, Packed6} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Packed2, + {ok, Packed6} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Packed2, 0, 0, 0, 8, 1, 32), ?assertEqual(Packed4, Packed5), ?assertEqual(Packed4, Packed6). @@ -425,12 +425,12 @@ test_composite_unpacked_sub_chunks({FastState, _LightState}) -> ChunkWithoutPadding = crypto:strong_rand_bytes(?DATA_CHUNK_SIZE - 3), Chunk = << ChunkWithoutPadding/binary, 0:24 >>, Key = crypto:strong_rand_bytes(32), - {ok, Packed} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Chunk, + {ok, Packed} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 1, 32), SubChunks = split_chunk_into_sub_chunks(Packed, ?DATA_CHUNK_SIZE div 32, 0), UnpackedInSubChunks = iolist_to_binary(lists:reverse(lists:foldl( fun({SubChunk, Offset}, Acc) -> - {ok, Unpacked} = ar_mine_randomx:randomx_decrypt_composite_sub_chunk_nif(FastState, + {ok, Unpacked} = ar_rx4096_nif:rx4096_decrypt_composite_sub_chunk_nif(FastState, Key, SubChunk, byte_size(SubChunk), 0, 0, 0, 8, 1, Offset), {ok, Unpacked2} = ar_mine_randomx:randomx_decrypt_composite_sub_chunk_nif(FastState, Key, SubChunk, byte_size(SubChunk), 0, 0, 0, 8, 1, Offset), @@ -442,12 +442,12 @@ test_composite_unpacked_sub_chunks({FastState, _LightState}) -> ))), ?assertEqual(UnpackedInSubChunks, Chunk), Chunk2 = crypto:strong_rand_bytes(?DATA_CHUNK_SIZE - 3), - {ok, Packed2} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, Chunk2, + {ok, Packed2} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk2, 0, 0, 0, 8, 3, 32), SubChunks2 = split_chunk_into_sub_chunks(Packed2, ?DATA_CHUNK_SIZE div 32, 0), UnpackedInSubChunks2 = iolist_to_binary(lists:reverse(lists:foldl( fun({SubChunk, Offset}, Acc) -> - {ok, Unpacked} = ar_mine_randomx:randomx_decrypt_composite_sub_chunk_nif(FastState, + {ok, Unpacked} = ar_rx4096_nif:rx4096_decrypt_composite_sub_chunk_nif(FastState, Key, SubChunk, byte_size(SubChunk), 0, 0, 0, 8, 3, Offset), {ok, Unpacked2} = ar_mine_randomx:randomx_decrypt_composite_sub_chunk_nif(FastState, Key, SubChunk, byte_size(SubChunk), 0, 0, 0, 8, 3, Offset), @@ -470,46 +470,46 @@ split_chunk_into_sub_chunks(Bin, Size, Offset) -> test_composite_repack({FastState, _LightState}) -> Chunk = crypto:strong_rand_bytes(?DATA_CHUNK_SIZE - 12), Key = crypto:strong_rand_bytes(32), - {ok, Packed2} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, + {ok, Packed2} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 2, 32), - {ok, Packed3} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, + {ok, Packed3} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 3, 32), {ok, Repacked_2_3, RepackInput} = - ar_mine_randomx:randomx_reencrypt_composite_chunk_nif(FastState, + ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif(FastState, Key, Key, Packed2, 0, 0, 0, 8, 8, 2, 3, 32, 32), ?assertEqual(Packed2, RepackInput), ?assertEqual(Packed3, Repacked_2_3), %% Repacking a composite chunk to same-key higher-diff composite chunk... {ok, Repacked_2_5, RepackInput} = - ar_mine_randomx:randomx_reencrypt_composite_chunk_nif(FastState, + ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif(FastState, Key, Key, Packed2, 0, 0, 0, 8, 8, 2, 5, 32, 32), - {ok, Packed5} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key, + {ok, Packed5} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key, Chunk, 0, 0, 0, 8, 5, 32), ?assertEqual(Packed5, Repacked_2_5), Key2 = crypto:strong_rand_bytes(32), %% Repacking a composite chunk to different-key higher-diff composite chunk... {ok, RepackedDiffKey_2_3, RepackInput2} = - ar_mine_randomx:randomx_reencrypt_composite_chunk_nif(FastState, + ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif(FastState, Key, Key2, Packed2, 0, 0, 0, 8, 8, 2, 3, 32, 32), ?assertEqual(<< Chunk/binary, 0:(12 * 8) >>, RepackInput2), - {ok, Packed2_3} = ar_mine_randomx:randomx_encrypt_composite_chunk_nif(FastState, Key2, + {ok, Packed2_3} = ar_rx4096_nif:rx4096_encrypt_composite_chunk_nif(FastState, Key2, Chunk, 0, 0, 0, 8, 3, 32), ?assertNotEqual(Packed2, Packed2_3), ?assertEqual(Packed2_3, RepackedDiffKey_2_3), try - ar_mine_randomx:randomx_reencrypt_composite_chunk_nif(FastState, + ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif(FastState, Key, Key, Packed2, 0, 0, 0, 8, 8, 2, 2, 32, 32), - ?assert(false, "randomx_reencrypt_composite_chunk_nif to reencrypt " + ?assert(false, "ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif to reencrypt " "to same diff should have failed") catch error:badarg -> ok end, try - ar_mine_randomx:randomx_reencrypt_composite_chunk_nif(FastState, + ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif(FastState, Key, Key, Packed2, 0, 0, 0, 8, 8, 2, 1, 32, 32), - ?assert(false, "randomx_reencrypt_composite_chunk_nif to reencrypt " + ?assert(false, "ar_rx4096_nif:rx4096_reencrypt_composite_chunk_nif to reencrypt " "to lower diff should have failed") catch error:badarg -> ok @@ -520,7 +520,8 @@ test_hash({FastState, LightState}) -> Nonce = ar_util:decode(?ENCODED_NONCE), Segment = ar_util:decode(?ENCODED_SEGMENT), Input = << Nonce/binary, Segment/binary >>, + ?LOG_ERROR("test_hash"), ?assertEqual({ok, ExpectedHash}, - ar_mine_randomx:hash_nif(FastState, Input, 0, 0, 0)), + ar_rx512_nif:rx512_hash_nif(FastState, Input, 0, 0, 0)), ?assertEqual({ok, ExpectedHash}, - ar_mine_randomx:hash_nif(LightState, Input, 0, 0, 0)). + ar_rx512_nif:rx512_hash_nif(LightState, Input, 0, 0, 0)). diff --git a/apps/arweave/test/ar_mine_vdf_tests.erl b/apps/arweave/test/ar_mine_vdf_tests.erl index 8d14ed65b..2f39fc17c 100755 --- a/apps/arweave/test/ar_mine_vdf_tests.erl +++ b/apps/arweave/test/ar_mine_vdf_tests.erl @@ -50,12 +50,12 @@ test_vdf_sha() -> Salt1 = << (1):256 >>, Salt2 = << (2):256 >>, - {ok, Real1, _OutCheckpointSha} = ar_mine_randomx:vdf_sha2_nif(Salt1, PrevState, 0, 0, ?ITERATIONS_SHA), + {ok, Real1, _OutCheckpointSha} = ar_vdf_nif:vdf_sha2_nif(Salt1, PrevState, 0, 0, ?ITERATIONS_SHA), ExpectedHash = soft_implementation_vdf_sha(Salt1, PrevState, ?ITERATIONS_SHA, 0), ?assertEqual(ExpectedHash, Real1), - {ok, RealSha2, OutCheckpointSha2} = ar_mine_randomx:vdf_sha2_nif(Salt2, Real1, ?CHECKPOINT_COUNT-1, 0, ?ITERATIONS_SHA), - {ok, RealSha3, OutCheckpointSha3} = ar_mine_randomx:vdf_sha2_nif(Salt1, PrevState, ?CHECKPOINT_COUNT, 0, ?ITERATIONS_SHA), + {ok, RealSha2, OutCheckpointSha2} = ar_vdf_nif:vdf_sha2_nif(Salt2, Real1, ?CHECKPOINT_COUNT-1, 0, ?ITERATIONS_SHA), + {ok, RealSha3, OutCheckpointSha3} = ar_vdf_nif:vdf_sha2_nif(Salt1, PrevState, ?CHECKPOINT_COUNT, 0, ?ITERATIONS_SHA), ExpectedSha3 = soft_implementation_vdf_sha(Salt1, PrevState, ?ITERATIONS_SHA, ?CHECKPOINT_COUNT), ?assertEqual(ExpectedSha3, RealSha2), ?assertEqual(ExpectedSha3, RealSha3), @@ -104,12 +104,12 @@ test_vdf_sha_skip_iterations() -> Salt1 = << (1):256 >>, SaltJump = << (1+?CHECKPOINT_SKIP_COUNT+1):256 >>, - {ok, Real1, _OutCheckpointSha} = ar_mine_randomx:vdf_sha2_nif(Salt1, PrevState, 0, ?CHECKPOINT_SKIP_COUNT, ?ITERATIONS_SHA), + {ok, Real1, _OutCheckpointSha} = ar_vdf_nif:vdf_sha2_nif(Salt1, PrevState, 0, ?CHECKPOINT_SKIP_COUNT, ?ITERATIONS_SHA), ExpectedHash = soft_implementation_vdf_sha(Salt1, PrevState, ?ITERATIONS_SHA, ?CHECKPOINT_SKIP_COUNT), ?assertEqual(ExpectedHash, Real1), - {ok, RealSha2, OutCheckpointSha2} = ar_mine_randomx:vdf_sha2_nif(SaltJump, Real1, ?CHECKPOINT_COUNT-1, ?CHECKPOINT_SKIP_COUNT, ?ITERATIONS_SHA), - {ok, RealSha3, OutCheckpointSha3} = ar_mine_randomx:vdf_sha2_nif(Salt1, PrevState, ?CHECKPOINT_COUNT, ?CHECKPOINT_SKIP_COUNT, ?ITERATIONS_SHA), + {ok, RealSha2, OutCheckpointSha2} = ar_vdf_nif:vdf_sha2_nif(SaltJump, Real1, ?CHECKPOINT_COUNT-1, ?CHECKPOINT_SKIP_COUNT, ?ITERATIONS_SHA), + {ok, RealSha3, OutCheckpointSha3} = ar_vdf_nif:vdf_sha2_nif(Salt1, PrevState, ?CHECKPOINT_COUNT, ?CHECKPOINT_SKIP_COUNT, ?ITERATIONS_SHA), ExpectedSha3 = soft_implementation_vdf_sha(Salt1, PrevState, ?ITERATIONS_SHA, (1+?CHECKPOINT_COUNT)*(1+?CHECKPOINT_SKIP_COUNT)-1), ?assertEqual(ExpectedSha3, RealSha2), ?assertEqual(ExpectedSha3, RealSha3), diff --git a/apps/arweave/test/ar_vdf_tests.erl b/apps/arweave/test/ar_vdf_tests.erl index 8e8f0f567..56a719df6 100755 --- a/apps/arweave/test/ar_vdf_tests.erl +++ b/apps/arweave/test/ar_vdf_tests.erl @@ -166,12 +166,12 @@ test_vdf_reset_mid_checkpoint_() -> Salt1 = << StartSalt1:256 >>, {ok, Output1Part1, LastStepCheckpoints1Part1} = - ar_mine_randomx:vdf_sha2_nif(Salt1, PrevOutput, ResetSaltFlat-1, 0, ?TEST_VDF_DIFFICULTY), + ar_vdf_nif:vdf_sha2_nif(Salt1, PrevOutput, ResetSaltFlat-1, 0, ?TEST_VDF_DIFFICULTY), MixOutput = reset_mix(Output1Part1, ResetSeed), Salt2 = << ResetSalt:256 >>, {ok, Output1Part2, LastStepCheckpoints1Part2} = - ar_mine_randomx:vdf_sha2_nif(Salt2, MixOutput, ?VDF_CHECKPOINT_COUNT_IN_STEP-ResetSaltFlat-1, 0, ?TEST_VDF_DIFFICULTY), + ar_vdf_nif:vdf_sha2_nif(Salt2, MixOutput, ?VDF_CHECKPOINT_COUNT_IN_STEP-ResetSaltFlat-1, 0, ?TEST_VDF_DIFFICULTY), Output1 = Output1Part2, LastStepCheckpoints1 = << LastStepCheckpoints1Part1/binary, Output1Part1/binary, diff --git a/rebar.config b/rebar.config index 047c364d3..01fc48201 100644 --- a/rebar.config +++ b/rebar.config @@ -50,7 +50,6 @@ {copy, "bin/logs", "bin/logs"}, {copy, "bin/debug-logs", "bin/debug-logs"}, {copy, "bin/check-nofile", "bin/check-nofile"}, - {copy, "apps/arweave/lib/RandomX/build/randomx-benchmark", "bin/randomx-benchmark"}, {copy, "data/not_found.html", "data/not_found.html"}, {copy, "data/hash_list_1_0", "data/hash_list_1_0"}, {copy, "data/genesis_wallets.csv", "data/genesis_wallets.csv"}, @@ -377,18 +376,33 @@ ]}. {pre_hooks, [ + % Build for randomx512 configuration {"(darwin|linux|freebsd|netbsd|openbsd)", compile, - "bash -c \"mkdir -p apps/arweave/lib/RandomX/build && cd apps/arweave/lib/RandomX/build && cmake -DRANDOMX_ARGON_MEMORY=262144 -DRANDOMX_DATASET_BASE_SIZE=536870912 .. > /dev/null\""}, - {"(darwin)", compile, "make randomx -C apps/arweave/lib/RandomX/build"}, - {"(linux)", compile, "make -C apps/arweave/lib/RandomX/build"}, - {"(freebsd|netbsd|openbsd)", compile, "gmake -C apps/arweave/lib/RandomX/build"}, - {"(linux)", compile, "env AR=gcc-ar make -C apps/arweave/c_src"}, - {"(darwin)", compile, "make -C apps/arweave/c_src"}, - {"(freebsd|netbsd|openbsd)", compile, "gmake -C apps/arweave/c_src"} + "bash -c \"mkdir -p apps/arweave/lib/RandomX/build512 && cd apps/arweave/lib/RandomX/build512 && cmake -DRANDOMX_ARGON_MEMORY=262144 -DRANDOMX_DATASET_BASE_SIZE=536870912 .. > /dev/null\""}, + {"(darwin)", compile, "make randomx -C apps/arweave/lib/RandomX/build512"}, + {"(linux)", compile, "make -C apps/arweave/lib/RandomX/build512"}, + {"(freebsd|netbsd|openbsd)", compile, "gmake -C apps/arweave/lib/RandomX/build512"}, + {"(darwin|linux|freebsd|netbsd|openbsd)", compile, "bash -c \"cd apps/arweave/lib/RandomX/build512 && mv librandomx.a librandomx512.a\""}, + % Build for randomx4096 configuration + {"(darwin|linux|freebsd|netbsd|openbsd)", compile, + "bash -c \"mkdir -p apps/arweave/lib/RandomX/build4096 && cd apps/arweave/lib/RandomX/build4096 && cmake -DRANDOMX_ARGON_MEMORY=524288 -DRANDOMX_DATASET_BASE_SIZE=4294967296 .. > /dev/null\""}, + {"(darwin)", compile, "make randomx -C apps/arweave/lib/RandomX/build4096"}, + {"(linux)", compile, "make -C apps/arweave/lib/RandomX/build4096"}, + {"(freebsd|netbsd|openbsd)", compile, "gmake -C apps/arweave/lib/RandomX/build4096"}, + {"(darwin|linux|freebsd|netbsd|openbsd)", compile, "bash -c \"cd apps/arweave/lib/RandomX/build4096 && mv librandomx.a librandomx4096.a\""}, + % Compile NIFs + {"(linux)", compile, "env AR=gcc-ar make all -C apps/arweave/c_src"}, + {"(darwin)", compile, "make all -C apps/arweave/c_src"}, + {"(freebsd|netbsd|openbsd)", compile, "gmake all -C apps/arweave/c_src"} ]}. {post_hooks, [ - {"(linux|darwin)", clean, "bash -c \"if [ -d apps/arweave/lib/RandomX/build ]; then make -C apps/arweave/lib/RandomX/build clean; fi\""}, - {"(freebsd|netbsd|openbsd)", clean, "bash -c \"if [ -d apps/arweave/lib/RandomX/build ]; then gmake -C apps/arweave/lib/RandomX/build clean; fi\""}, + % Clean randomx512 + {"(linux|darwin)", clean, "bash -c \"if [ -d apps/arweave/lib/RandomX/build512 ]; then make -C apps/arweave/lib/RandomX/build512 clean; fi\""}, + {"(freebsd|netbsd|openbsd)", clean, "bash -c \"if [ -d apps/arweave/lib/RandomX/build512 ]; then gmake -C apps/arweave/lib/RandomX/build512 clean; fi\""}, + % Clean randomx4096 + {"(linux|darwin)", clean, "bash -c \"if [ -d apps/arweave/lib/RandomX/build4096 ]; then make -C apps/arweave/lib/RandomX/build4096 clean; fi\""}, + {"(freebsd|netbsd|openbsd)", clean, "bash -c \"if [ -d apps/arweave/lib/RandomX/build4096 ]; then gmake -C apps/arweave/lib/RandomX/build4096 clean; fi\""}, + % Clan NIFs {"(linux|darwin)", clean, "make -C apps/arweave/c_src clean"}, {"(freebsd|netbsd|openbsd)", clean, "gmake -C apps/arweave/c_src clean"} ]}.