Cryptocurrency mining.

Mining (cryptocurrency mining) is the process by which cryptocurrency transactions are collected, verified and recorded in a digital ledger known as blockchain. The work done by the diggers is essential to maintaining the integrity of the network, and it is also responsible for bringing new horses into the system.

The new digital currency is generated through mining (cryptocurrency digging)

Within the traditional banking system, the fiat currency is printed and distributed by financial institutions and government bodies. But for most cryptocurrencies, new coins are not issued by centralized entities. Instead, new digital units are generated through the extraction process, which follows a predetermined set of rules established by the basic protocol. While the protocol defines what the basic rules are, the so-called consensus algorithms outline how those rules will be followed – for example, during transaction validation.

To take bitcoin as an example, participants in the mining process are called “nodes” or just “miners.” They play a key role in the security of the blockchain network. The task of each digger is to collect the unconfirmed transactions from the memory pool and organize them into a candidate block that they will try to validate.

Generation transaction

When creating a candidate block, the miner involves a transaction in which he sends the block prize to himself. This transaction is known as a “coinbase / generation transaction” and is often the first recorded in a block.

After the list of unconfirmed transactions is formed, each transaction is hashed and the outputs are organized in pairs. These pairs are then hashed, producing new results, which are also organized into pairs and re-hashed. The process is repeated until a single hash is obtained, which is called a root or Merkel tree hash.

The root hash is then combined with the hash of the pre-confirmed block along with a pseudorandom number called nonce, as well as some other parameters. These elements are hashed, creating a block hash for that candidate block.

However, the miner will only succeed if the result obtained – the block hash for their candidate block is below a predetermined value – the target. Therefore, the process is based on trial and error, and they have to perform numerous hashing functions with different nuances in order to arrive at a valid result. The first miner to find a valid hash confirms his candidate block and receives the block prize. The whole process takes an average of ten minutes.

Once the block is validated, it is added to the blockchain and the miners start working on the next block. A valid hash produced by miners functions as proof of their work, and so the Bitcoin consensus algorithm is called “proof of work”. Each confirmed block has a unique block hash that acts as an identifier.

The block reward is determined by the Bitcoin protocol and is reduced every 210,000 blocks or every four years. Initially, the block reward was 50 BTC, and now it is 12.5 BTC.