Bitcoin mining is done by using a network of computers from around the world. The bitcoin mining process can be predominantly defined as the addition of transaction records to the bitcoin's public ledger.
These transactions are done by users in the bitcoin blockchain continuously and recorded in the public registry. A single entity records all transactions.
The Bitcoin ledger known as Bitcoin Blockchain is managed and maintained by several independent entities. It offers unmatched flexibility compared to centralized ledgers. As bitcoin is devoid of any single management authority, there has to be an agreement among users on a common ledger. New transactions are converted into lists called blocks and added to the Blockchain. Gradually, it creates a long list which covers every single transaction that is done in the bitcoin network.
The job of the miners is to confirm the creation of blocks and write them in a ledger. The block gets added to the public ledger which has all recorded transactions. All users can update their individual copies of the transaction ledger as the block is broadcast over the bitcoin network.
It is important to ensure that the Bitcoin Blockchain is never tampered. This responsibility of taking care of Bitcoin Blockchain is of miners.
When the block creation is completed, the miners start solving cryptographic problems in order to add block to the Bitcoin Blockchain. A specific formula is applied to the information provided in the block that converts the data into a random series of letters and numbers called the cryptographic hash function. The hash associated with each block must deal with a specific restriction as provided in the formula
Hashes are designed and created using a collective data such as bitcoin block. You cannot decode the hash by working backwards. It is practically impossible.
Producing a hash from a large amount of data is easy as each hash is unique. However, the hash is a complicated element in the whole bitcoin mining process. A mere change of a single character in a block of transactions will result in compete change of the hash of the block making it impossible to generate a valid hash. Miners are required to use specialized hardware to achieve the objectives.
When hashing a block, miners also use the hash from the last confirmed block in the Bitcoin Blockchain and do not merely focus on transactions. In other words, each block reference the previous one, thus become a digital version of a wax seal and establish the legitimacy of every block. Any attempt to fake a block by a rogue element would be next to impossible as it would entail investment of millions of dollars.
To earn a bitcoin, miners must solve a specific block hash problem related to the Bitcoin protocol. When they solve the problem successfully, they get rewarded in two parts - a newly created bitcoin and fees from the transactions included into the block. In 2016, 25 new bitcoins were generated from each block while the transaction fees were about 0.5 bitcoin.
Miners do not verify every transaction but authenticate many of them at once. The transactions are secured within a box with a virtual lock. Software systems are deployed to locate the key for unlocking box. Once the box is opened, the transaction is confirmed following which the miner receives 12.5 bitcoins. This is easy to say; however difficult to do as the key is not easy to locate. The attempt average is a whopping 1.7 billion. Miners, who use the right tools in a right manner get rewarded