Mining In A Blockchain (Part 1- The Nonce)

Mining In A Blockchain (Part 1- The Nonce)

Arpan Pandey
·Dec 16, 2021·

2 min read

Subscribe to my newsletter and never miss my upcoming articles

Play this article

Table of contents

  • Is it really that simple?
  • The Other Field
  • Why tho?
  • Conclusion

Let's continue in our quest to dig up the internals of a blockchain. In this post, we shall explore one of the fundamentals that incentivizes people to actually support a blockchain. Let's start by gathering up what a block looks like till now. Block #69.png

Is it really that simple?

On the basis of the information we currently know, we may think that it is pretty easy to generate the hash of a block. And it will be a fair assumption because it will take some milliseconds at most to generate a hash for some given data. But then, what is all the fuss about mining and it taking so much resources. As it turns out, there is another field in a block and its finally time to reveal it.

The Other Field

This next field is called the nonce. Let's start how we always do, and that is with a good old definition:

A nonce is an abbreviation for "number only used once," which, in the context of cryptocurrency mining, is a number added to a hashed—or encrypted—block in a blockchain that, when rehashed, meets the difficulty level restrictions.

Nonce1.png

Why tho?

It seems counter intuitive to add a random value to the block, when it seems like it doesn't serve any meaningful purpose. The nonce is just a random value that is used to influence the hash of the block due to the Avalanche Effect. Still not sure? Let's see 2 pictures to illustrate it better. Nonce1 (1).png Notice the nonce and the hash. Nonce1 (2).png Saw the change? Good. Hopefully now we are on the same page.

Conclusion

This was a very short post. This is because we are only setting the stones in place for the post on The Cryptographic Puzzle.

Thank you and see you in the next one!

Did you find this article valuable?

Support Arpan Pandey by becoming a sponsor. Any amount is appreciated!

See recent sponsors Learn more about Hashnode Sponsors
 
Share this