How does mining work?

All sources are from [Blockchain A-Z in Udemy]

How does mining work ?

What is mining? What is this competition that everyone wants to participate in?

A blockchain is a chain consisting of blocks, and there are several fields in the block.

Remember that a block can store multiple transactions. Multiple transactions can be stored in one block and this block can move to the next.

In addition to transactions, blocks have a previous hash field, which is a very important feature of the blockchain, and becomes a method of activating encryption links between blocks.

Now it's time to look at the new fields in the block.

Field is called nonce and refers to a number that is used only once. This is the most important field in mining. Everyone is just working on changing this field.

What determines the hash in a block is the data in the block, such as block number, nonce, data, and previous hash.

Since nonce can be changed freely, the hash value can be adjusted by changing nonce.

Suppose there is a hash pool. This hash pool contains all the hash from the smallest to the largest.

The mining method is basically a blockchain system or algorithm setting the target.

In other words, there is a target set by miners to achieve a specific hash.

At this time, a hash larger than the target is not considered.

So the miners are constantly changing the nonce value that I mentioned earlier and continuously looking for a hash that can be included under the target.

Of course, there is a more complicated process, but let's just understand it this much first.

Last updated