MINING

Note: This mining section talks about bitcoin mining.

The main incentive for mining is to include a new block into the Blockchain. Miners from all around the world work to add new blocks into the Blockchain to ensure that Blockchain grow as new transactions are carried out. In the beginning, one could mine bitcoins using their laptop, however as more people started mining it became more difficult to mine due to bitcoin’s scarcity. If people could mine all the bitcoins, they would have finished bitcoins long time ago. Moreover, a certain gap is needed between the creation of each block. This time gap is different for different currencies. In bitcoin, the time limit is 10 minutes. Therefore, a difficulty level is set to restrict the block creation. This difficulty level fluctuates with the number of miners. The difficulty level increases when more people are mining and decreases when less people mine. When a new block is ready to be added to the Blockchain, all the items of the block are first hashed. If the hash is smaller than the difficulty target, it is added to the Blockchain because if a hash is higher than the difficulty target people will not be able to solve it. Once a block is added to the Blockchain, everyone in the community accepts the new block.

However, this is not the case. In reality, a very lucky person will get a block like that.
This is where nonce is needed. A nonce is a random bit string.

Following are the steps of mining in a normal scenario

  1. The hash of the new block is taken and appended with the nonce.
  2. The newly generated string (in step 1) is hashed again.
  3. This final hash is checked if it is less than the difficulty level.
  4. If the answer to previous step is no, then a nonce is generated again and compared. The process is repeated until the answer is yes.
  5. The new block is generated and added to the Blockchain.
  6. The miners are rewarded with bitcoins.
Here the puzzle friendliness property is recalled.
In bitcoin mining:
X= hash of the block
K= nonce
Y= difficulty target

user

Author

Iqra Bakhtiyaar

Contact me

IB279@live.mdx.ac.uk

Supervisor

Supervisor

Prof. Raja Nagarajan