Mining: What is it?
Mining is, in simple terms, the process of verifying and adding transactions to a public ledger (blockchain), usually by solving complex mathematical problems. Miners are rewarded for their efforts in the form of cryptocurrency.
If you want to know what blockchain is, read a separate article on the subject on our channel.
Who is a cryptocurrency miner?
A cryptocurrency miner is a person who checks and adds new transactions to the blockchain. Miners are rewarded for their efforts in the form of cryptocurrency. Read more about what cryptocurrency is here.
How are cryptocurrencies mined?
Bitcoin blockchain can be described as a distributed ledger that contains a record of every transaction that has ever taken place. The record of transactions is called a block. A block consists of a “header” and a “body. The header stores the hash of the body (which is a SHA-256 function), some additional information, and a timestamp. The body is then split into several small strings (called transactions).
Mining process on the bitcoin block as an example
Bitcoin is a distributed database, so the way Bitcoin transactions are verified and validated is by consensus. Every few minutes, the Bitcoin network generates a block. When a block is created, it is divided into two parts: the header part, which contains the timestamp and information about the block, and the transaction part. Each transaction is an input to one or more outputs (which may later be reused by the same or different transactions).
To verify a transaction, the blockchain does two things. First, it hashes the input and output values to create a validation script. This script is then executed on the output data, which can show whether the transaction is valid or not. Second, the script that created the transaction (the input script) is also executed on the input data, and the results of the input and output data in combination with each other are used to decide whether the transaction is valid or not.
There are many problems in this system that make finding blocks and creating new bitcoins very computationally complex. This is because the blocks must be “encrypted” using an algorithm that takes a very long time to execute. If someone found a way to compute the hash of each block in advance, he would find many solutions that would allow him to create new bitcoins in the following blocks without prying eyes. This is called a “51% attack” and means that one person can compromise the entire network.
The way to defend against a 51% attack is to prevent people from creating blocks from the start. For example, if you keep the block creation rate at about one block every 10 minutes, no one will be able to create a single block before the 10 minutes are up, even if all the mining power in the world is dedicated to the problem.
To search for blocks and create new bitcoins in a system where each new block must be checked and encrypted for many minutes, we need a very large and fast memory pool (computer RAM and hard disk space), which is expensive to build. We need a solution that will provide us with a constant and predictable block creation rate, so that we know how to build a large pool that will not overflow before time.
Mining farm: what it is in simple words
A mining farm is a room in which computers are used to mine cryptocurrencies. The farm can be located in one place or scattered over several locations. The computers used for mining are divided into:
- Special purpose computers designed specifically for mining;
- General purpose computers that have been modified for mining.
Mining farm: is it legal?
There is no definite answer to this question, because it depends a lot on where the mining farm is located. Some countries have rules that make mining farms illegal, while other countries allow them. Before setting up a mining farm, it is always best to check your local laws to see if there are any specific rules.