Simulation of a proof-of-work algorithm