What is Cryptocurrency Mining?

      Cryptocurrency mining is the process of preparing the process that users need to create records in the distributed ledgers of Blockchain and creating blocks. The mining process is also important for the introduction of new coins - supply and therefore the formation of cryptocurrencies. As is known, cryptocurrencies are used in a peer-to-peer decentralized network where there is no third central authority. When it comes to cryptocurrency mining, Bitcoin is the most common cryptocurrency that comes to mind. We have to say that not every cryptocurrency is created by mining. Bitcoin is mined with a consensus algorithm called Proof of Work.

 

HOW DOES IT WORK?

      A miner is a node in the network that collects transactions and organizes them into blocks. Whenever the transaction is made, the nodes in the entire network receive the transactions and validate their validity. Afterwards, the miner nodes collect all transactions from the memory pool and merge them into blocks. The first step in scraping a block is to individually encrypt all transactions collected from the memory pool. But before starting transactions, the miner node adds a transaction to which it will send the mining reward. This is also the first transaction in which cryptocurrencies are “made out of nothing”, usually when a new block is created.

 

After each transaction is encrypted, these hash(s) are organized as a Merkle tree. In other words, it is arranged in pairs and encrypted with some kind of algorithm. The root password is appended to the beginning of the block, along with a random number, also known as the hash and nonce of the previous block. Thus, each block is somehow associated with the previous one. The result is the hash value of the block and serves to generate the data necessary to generate a new block. In order for the newly created block to be validated, the output (ie the hash value of the block) is expected to be less than a specified target value. Usually, the hash value of the block starts with lots of zeros. The target value is also known as the hash difficulty. This difficulty is a value regulated by the protocol of the cryptocurrency, which guarantees a rate (rate) that remains constant during the new block creation process and is (inversely) proportional to the processing power allocated by mining in the network.

 

For this reason, if each new miner joins the network, competition increases and hash difficulty increases. This is to avoid reducing the average block generation time. On the contrary, if miners leave the network, the hashing difficulty becomes easier, keeping the time required to generate blocks constant, despite the decrease in total processing power in the network.

 

The mining process requires constant repetition of the hashing activity at the beginning of the blocks. It expires until a valid block hash is generated. In this case, the block now starts broadcasting on the network. All other nodes check if the hash is valid and if it is, they copy the block to the blockchain and the next block is started to be mined.Sometimes two miners simultaneously publish a valid block and two competitive blocks are created on the network. The miner's start to the next block depends on the completion of the previous block. The loser of this competition gets an orphaned block.

 

Mining Pools

While the block reward is given to the miners who generate the valid block hash, this reward is distributed in proportion to the total mining power they spend on the network. Whoever consumes less energy wins a lower reward. Mining pools have been created to solve this problem. In the pool, miners come together and transfer their processor power and are entitled to rewards as much as the energy they share.

Share: