0

If I am trying to find a nonce and in the meantime someone finds a nonce and adds a new block to chain, then will my work be wasted or it could be useful in finding other nonces?

3 Answers 3

0

It is wasted because the mining/hashing prodecure must contain the hash of the previous block. If someone hashes the block before you do it, you have to take the hash of the other person's block and put it in your block-header and hash it with the other header-information and then, the result is completly different.

In general, you check wheather the hash of the header is < the expected hash. If it is not, you forget your result because it's useless then.

1

your work is "wasted" caused by the mining-algorithm.

you have found a new block if sha2(sha2(blockheaderOfnewBlock) starts with a certain amount of zeros. the blockheader contains a nonce, the hash of the previous block and some other information. since the previous-block-hash is another hash if a new block was found you have another information-base for your mining-software.

1

It is "wasted". All block hashes calculated in the mining process are completely independent of each other. It is effectively random guessing; there is no progress that is being made and finding a hash does not make it more likely that the next one is a valid block hash. They are independent trials and each one is useless for calculating the next hash. So any hash that is not a valid block hash is "wasted".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.