Skip to main content

Module pow

Module pow 

Source
Expand description

This crate provides a PoW mechanism that should be hugely expensive to reproduce on dedicated hardware. Given that Hashiverse is predominantly built upon proof of work, we want to put in some effort to make it difficult to cheat as a spammer or sybil using GPU or ASIC advantages. To this effect we cobble together a chain of different hashing algorithms with different repetition counts - all of which are pseudorandomly chosen based on the initial salt and each subsequent hashing round.

Functionsยง

pow_compute_data_hash
Pre-hash all input data into a single 32-byte Hash.
pow_generate
Try forever until a valid PoW is found.
pow_generate_with_iteration_limit
Try find a sufficient PoW.
pow_measure
pow_measure_from_data_hash
Core PoW measurement given an already-pre-hashed data blob.