Revert "Remove POW mining related code"

This reverts commit bdd89df50fd239002c4457b5aec800238d26c65e.