Proof-of-Work: Partial Preimage Hash Puzzle

Now that we’ve finished talking about how Prev Block Hashes , let’s talk about the nonce, the physical manifestation of Proof-of-Work.

Keep in mind that we need entities to prove that they’ve done some work before they’re allowed to submit a vote to the network, meaning that we have to design a problem or puzzle for their computers to solve to prove that they’ve done work.

The way we do this in Bitcoin is with a partial preimage hash puzzle.

Keep in mind the definition of preimage from before, which was the input.

Partial preimage then means a partial input.

In Bitcoin, we are given part of an input, and we have to find the other part which produces some particular output.

The condition that needs to be met is that the hash of the block header is less than some target value.

This condition is how Proof-of-Work is implemented in Bitcoin and almost every other popular Proof-of-Work cryptocurrency.

To satisfy our needs for a puzzle, these hash puzzles need to have three characteristics: they have to be computationally difficult, parameterizable, and easily verifiable.

Computational difficulty means ensuring that the solution to the puzzle cannot be easily found.

There’s no point if Proof-of-Work takes little work.

Parameterizable means adjustable.

The difficulty of the puzzle should be adjustable to ensure that it never gets too easy or too hard.

And finally, an easily verifiable puzzle ensures that computers don’t have to do too much work to see that an answer is correct.

It should just take one hash for example to prove that some nonce is correct, even if finding the nonce takes millions of tries.

Proof-of-Work: Mining