#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <stddef.h>
#include "compiler.h"
#define ETHASH_REVISION 23
#define ETHASH_DATASET_BYTES_INIT 1073741824U
#define ETHASH_DATASET_BYTES_GROWTH 8388608U
#define ETHASH_CACHE_BYTES_INIT 1073741824U
#define ETHASH_CACHE_BYTES_GROWTH 131072U
#define ETHASH_EPOCH_LENGTH 30000U
#define ETHASH_MIX_BYTES 128
#define ETHASH_HASH_BYTES 64
#define ETHASH_DATASET_PARENTS 256
#define ETHASH_CACHE_ROUNDS 3
#define ETHASH_ACCESSES 64
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ethash_h256 { uint8_t b[32]; } ethash_h256_t;
struct ethash_light;
typedef struct ethash_light* ethash_light_t;
typedef struct ethash_return_value {
ethash_h256_t result;
ethash_h256_t mix_hash;
bool success;
} ethash_return_value_t;
ethash_light_t ethash_light_new(uint64_t block_number);
void ethash_light_delete(ethash_light_t light);
ethash_return_value_t ethash_light_compute(
ethash_light_t light,
ethash_h256_t const header_hash,
uint64_t nonce
);
ethash_h256_t ethash_get_seedhash(uint64_t block_number);
#ifdef __cplusplus
}
#endif