What is the mining? Who is the miner?

The mining is the process where the data is collected in a block and then the block is appended to the blockchain. This process is done by the miner.

Before digging into the process of mining, I suggest you read the following articles:

Who is the miner? Why does a person decide to start mining?

The miner is a special node in the network that gives its computational power to the network. You could be a miner too, all you need to do is to download a free software and run it.
The miner earns 12.5 bitcoins for each block created (called coinbase) as well as the transaction fee.

If it’s so easy I’ll quit my job and I’m going to be a miner!

Wait! It’s not so easy! In order to secure the data on the blockchain, it has been made intentionally difficult to create a block.
During the mining process, the miner calculates a code which will identify the block within the blockchain. This calculation must comply with the criteria of complexity that increases with the hashing power of the network. This difficult puzzle is called proof-of-work (I will talk about it in the next article).
The miners are racing with each other to solve the puzzle and the winner will earn the coinbase and the transaction fees.
Nowadays, there are miners with warehouses full of special computers that are working 24/7 only for mining; so if you want to start the career as a miner, your nerd computer is not enough!

What is the proof-of-work for? Why do miners spend so much effort on mining?

The proof-of-work is a mechanism for reaching global consensus on the valid blockchain: since all nodes have a copy of the blockchain, each node must agree on the conditions that prove how much effort a node has spent on verifying transactions.
In other words: if the content of the blockchain is easy to change then everyone can tamper with it; instead, if each block is calculated with complex mathematical functions then it takes a lot of effort to tamper with the blockchain.

If everyone can be a miner, is there any risk that someone can create a fake block?

Of course. A bad miner can create an invalid block; but remember that before appending a block to the blockchain, a miner must check if the block is valid. Hence if the block received by the miner is not valid, it will be rejected.
Moreover, the identifier hash code links each block together in a chain (that’s why the name is the blockchain); if I tamper with a block, I will invalidate not only that block, but also all the following blocks!

This is the English translation of a post that I wrote for comprarebitcoin.com

References

Coinbase value: Blockchain.Info – Bitcoin Stats (you can calculate it dividing Bitcoins Mined by Blocks Mined)

Hash: wikipedia or you can wait for the next article!

Difficulty of proof-of-work: https://blockchain.info/it/charts/hash-rate?timespan=all

Related Articles

Bitcoin transaction: how does it work?

Category: Blockchain

In the previous article we had a quick introduction to the blockchain technology. In this article we are going to see what's happening behind a bitcoin transaction. Let's take a simple ...

How a blockchain works - the Proof of Work

Category: Blockchain

When we were talking about mining, we mentioned a difficult puzzle that a miner has to solve. What is this puzzle and what is it for? Before reading this article, I suggest you read these two ...

Blockchain For Not Technical People (public speech)

Category: Blockchain

A 4 minutes speech about blockchain I delivered during a course on public speaking in November 2019.

How to Test Smart Contracts - Tutorial

Category: Blockchain

Testing a smart contract is a must of the blockchain development process. Remember that the blockchain does not forgive you any errors because of its immutability! The only way to fix a bug ...

Create your Blockchain DApp with Ethereum and VueJS - Tutorial Part 2

Category: Blockchain

In the second part of the tutorial we are going to develop the front-end and see how to interact with the smart contract developed in the PART 1. If you missed the introduction and you want to ...

Create your Blockchain DApp with Ethereum and VueJS - Tutorial Part 1

Category: Blockchain

In this first part of the tutorial we are going to create the smart contract that handles the registration of users; then we are going to deploy the smart contract to the blockchain using ...