|
Monero
|
#include <assert.h>#include <stddef.h>#include <stdint.h>#include <stdbool.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <limits.h>#include "randomx.h"#include "c_threads.h"#include "hash-ops.h"#include "misc_log_ex.h"
Classes | |
| struct | rx_state |
| struct | seedinfo |
Macros | |
| #define | RX_LOGCAT "randomx" |
| #define | THREADV __thread |
| #define | SEEDHASH_EPOCH_BLOCKS 2048 /* Must be same as BLOCKS_SYNCHRONIZING_MAX_COUNT in cryptonote_config.h */ |
| #define | SEEDHASH_EPOCH_LAG 64 |
Typedefs | |
| typedef struct rx_state | rx_state |
| typedef struct seedinfo | seedinfo |
Functions | |
| static void | local_abort (const char *msg) |
| static int | disabled_flags (void) |
| static int | enabled_flags (void) |
| static int | is_power_of_2 (uint64_t n) |
| static int | get_seedhash_epoch_lag (void) |
| static unsigned int | get_seedhash_epoch_blocks (void) |
| void | rx_reorg (const uint64_t split_height) |
| uint64_t | rx_seedheight (const uint64_t height) |
| void | rx_seedheights (const uint64_t height, uint64_t *seedheight, uint64_t *nextheight) |
| static CTHR_THREAD_RTYPE | rx_seedthread (void *arg) |
| static void | rx_initdata (randomx_cache *rs_cache, const int miners, const uint64_t seedheight) |
| void | rx_slow_hash (const uint64_t mainheight, const uint64_t seedheight, const char *seedhash, const void *data, size_t length, char *hash, int miners, int is_alt) |
| void | rx_slow_hash_allocate_state (void) |
| void | rx_slow_hash_free_state (void) |
| void | rx_stop_mining (void) |
Variables | |
| static CTHR_MUTEX_TYPE | rx_mutex = CTHR_MUTEX_INIT |
| static CTHR_MUTEX_TYPE | rx_dataset_mutex = CTHR_MUTEX_INIT |
| static rx_state | rx_s [2] = {{CTHR_MUTEX_INIT,{0},0,0},{CTHR_MUTEX_INIT,{0},0,0}} |
| static randomx_dataset * | rx_dataset |
| static int | rx_dataset_nomem |
| static uint64_t | rx_dataset_height |
| static THREADV randomx_vm * | rx_vm = NULL |
| #define RX_LOGCAT "randomx" |
| #define SEEDHASH_EPOCH_BLOCKS 2048 /* Must be same as BLOCKS_SYNCHRONIZING_MAX_COUNT in cryptonote_config.h */ |
| #define SEEDHASH_EPOCH_LAG 64 |
| #define THREADV __thread |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
inlinestatic |
|
static |
|
static |
| void rx_reorg | ( | const uint64_t | split_height | ) |
| uint64_t rx_seedheight | ( | const uint64_t | height | ) |
| void rx_seedheights | ( | const uint64_t | height, |
| uint64_t * | seedheight, | ||
| uint64_t * | nextheight | ||
| ) |
|
static |
| void rx_slow_hash | ( | const uint64_t | mainheight, |
| const uint64_t | seedheight, | ||
| const char * | seedhash, | ||
| const void * | data, | ||
| size_t | length, | ||
| char * | hash, | ||
| int | miners, | ||
| int | is_alt | ||
| ) |
| void rx_slow_hash_allocate_state | ( | void | ) |
| void rx_slow_hash_free_state | ( | void | ) |
| void rx_stop_mining | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |