I want to write fast RandomX verification in Python.
I'm using pybind11 and want to bind the C function rx_slow_hash:
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)
I'm writing code that will use the asyncio module. So I have a one process which performs tasks asynchronously and I do not want to allow this process to be blocked.
Due to my poor C/C++ knowledge I do not know how to use rx_slow_hash
in my use case.
I will be grateful if I find answers to questions:
- What is the
miners
parameter for? - Can I start several processes that will use the
rx_slow_hash
function? - How exactly does verification work? For example, I have one process in which I will run verification with
rx_slow_hash
function withminers=1
. Will this process create a separate thread for verification or will execution be blocked until verification is completed?