29 #define ETHASH_REVISION 23 30 #define ETHASH_DATASET_BYTES_INIT 1073741824U // 2**30 31 #define ETHASH_DATASET_BYTES_GROWTH 8388608U // 2**23 32 #define ETHASH_CACHE_BYTES_INIT 1073741824U // 2**24 33 #define ETHASH_CACHE_BYTES_GROWTH 131072U // 2**17 34 #define ETHASH_EPOCH_LENGTH 30000U 35 #define ETHASH_MIX_BYTES 128 36 #define ETHASH_HASH_BYTES 64 37 #define ETHASH_DATASET_PARENTS 256 38 #define ETHASH_CACHE_ROUNDS 3 39 #define ETHASH_ACCESSES 64 40 #define ETHASH_DAG_MAGIC_NUM_SIZE 8 41 #define ETHASH_DAG_MAGIC_NUM 0xFEE1DEADBADDCAFE 55 #define ethash_h256_static_init(...) \ struct ethash_full * ethash_full_t
ethash_h256_t ethash_get_seedhash(uint64_t block_number)
Calculate the seedhash for a given block number.
ethash_light_t ethash_light_new(uint64_t block_number)
Allocate and initialize a new ethash_light handler.
void ethash_light_delete(ethash_light_t light)
Frees a previously allocated ethash_light handler.
struct ethash_light * ethash_light_t
struct ethash_h256 ethash_h256_t
Type of a seedhash/blockhash e.t.c.
void const * ethash_full_dag(ethash_full_t full)
Get a pointer to the full DAG data.
void ethash_full_delete(ethash_full_t full)
Frees a previously allocated ethash_full handler.
ethash_return_value_t ethash_light_compute(ethash_light_t light, ethash_h256_t const header_hash, uint64_t nonce)
Calculate the light client data.
struct ethash_return_value ethash_return_value_t
Type of a seedhash/blockhash e.t.c.
uint64_t ethash_full_dag_size(ethash_full_t full)
Get the size of the DAG data.
int(* ethash_callback_t)(unsigned)
ethash_return_value_t ethash_full_compute(ethash_full_t full, ethash_h256_t const header_hash, uint64_t nonce)
Calculate the full client data.
ethash_full_t ethash_full_new(ethash_light_t light, ethash_callback_t callback)
Allocate and initialize a new ethash_full handler.