Introduction to Cryptocurrency Mining

advertise here

Introduction to Cryptocurrency Mining


Notice to all inexperienced crypto-enthusiasts in mining, this article will guide you step by step to become a crypto miner or, at a minimum, a more informed crypto-enthusiast

We will first see how mining worked, how it was in the early days of Bitcoin, how it evolved as cryptocurrencies became popular, and how it works today. In parallel, we will see the appearance of different types of mining: hardware (CPU, GPU, FPGA, ASIC), Cloud-Mining, Staking and Masternode.

Introduction to Cryptocurrency Mining


Mining, How Does It Work?


To be able to deepen the subject of mining, we must first understand what it is for concretely. Satoshi Nakamoto (the inventor of Bitcoin) explains in detail how blockchain works and therefore mining in the Bitcoin White Paper. Rest assured, we won't need that level of understanding. The etymology of the name given to the process of securing the network will suffice. This process organizes transactions into a series of links: blocks; and this series of links forms a chain: the Blockchain.


These links are in reality information packets comprising all the modifications which will have to appear on the current block (compared to the previous block) and the characteristics which the following block will have to have.


Among this information there is:


  • The Creation of New Addresses;
  • The creation of new units (new bitcoins for example, donated to the miner of the block for the work he has provided);
  • The difficulty of mining for the next block (we will see the importance of this later);
  • And above all, the transactions carried out (signed by the private keys of their former owner).


Cryptography ensures the security of the network. The miners have a more or less complex mathematical equation to solve. Their goal is to generate hashes (cryptographic numbers) which can potentially be the solution to the equation. When they do, the block that is selected to be added to the chain is the one of the miner who solved the equation. He is rewarded for the work he has provided and above all for having succeeded in finding the solution (Proof of Work system).


All other blocks submitted by miners become obsolete, then miners must try to solve the equation of the new block to create it, and so on. For your information, the average number of hashes per second at the date of writing of this article is 100 million trillion hashes on Bitcoin (1.0 x 10²6 hashes / s).


Each block created is supposed to be immutable and unique. It should only be possible to exist one block at a time T on the chain. In practice, it is possible that two different blocks co-exist at a time T. This can happen intentionally (most often) or accidentally. When this is the case, the two blocks continue to exist and child blocks are generated from the parent block. We then have a fork in the chain, more commonly called a fork.


If this phenomenon is caused voluntarily, it will aim to create a new cryptocurrency. The two branches of the chain will continue their way independently and the miners will separate. There will therefore be no switch of the miners on the longest branch and the branch whose properties will have been modified will be that of the new cryptocurrency.


If this bifurcation happens accidentally or maliciously, a very smart mechanism is set up on the blockchain. It is the longest chain of blocks which is retained and the miners pass on this chain. As we explained earlier, the creation of blocks depends on the resolution of cryptographic equations, and therefore on the power of calculations.

For a string to be longer than another, it must be retained by 50% + 1 unit of the “total network computing power”. The network is therefore democratically secured. The most “popular” blockchain remains while the other disappears.


This Implies Two Things:

1. It is not possible to spend a unit twice (this is the key notion of double spending). If two different miners submit a transaction at the same time with a valid key, the miner's transaction in the longer chain will be executed.

2. In order to be able to maliciously modify the blockchain, you must have 50% + 1 hash of the total hashrate of the network.


An attack 51 is a scenario where malicious people attempt to modify the blockchain by owning 50% + 1 hash of the total hashrate. There are cases that have done a lot of damage but never on a popular blockchain. This is especially a problem for small cryptocurrencies that do not attract a lot of miners. 

Staging an attack on Bitcoin today would cost much more than the potential gains from the attack. No one would find any interest in it. This is the very basis of the infallibility of any security system: making the break-in so complicated that the necessary means will make it unnecessary to carry it out.


Mining from its Beginnings Until Today


We are done with the exclusively technical part and we can start to see the different types of mining. In the early days of blockchain, right after the creation of Bitcoin's Genesis Block, there was only one computer component used for mining: the CPU.


CPU Mining


The CPU has one feature that makes it a top choice: it is easy to use. Indeed, the coding of hash programs intended for the CPUs turns out to be much simpler (even today) than the coding of hash programs used for the other mining components.


The hashrate produced by the CPUs of the time was sufficient to guarantee the security of the blockchain (given its low popularity). CPU mining is now limited to browser / smartphone mining and we can no longer speak of real profitability.


To mine on your browser you can use Cryptotab


To discover a mining project on a smartphone, read our article on Pi Network


GPU Mining


It was then that a certain Laszlo Hanyecz intervened, widely known for his purchase of two pizzas ?? for 10,000 bitcoins (today this represents around $ 50 million a pizza). Crypto-enthusiasts celebrate Bitcoin Pizza Day every year on May 22 as a tribute to the first bitcoin transaction made for an IRL purchase by dear Laszlo.


He became a meme because he wouldn't have put aside a single bit of Bitcoin despite the huge contribution he made to this cryptocurrency and being one of the pioneers in the industry. In fact, he should be honored for his huge contribution to blockchain. He is the first GPU miner in crypto history and this discovery will speed things up for Bitcoin.


Satoshi Nakamoto was concerned about centralizing mining, which would make Bitcoin vulnerable to attack.51 Laszlo felt guilty for ruining Satoshi's project and stopped praising his discovery. Succeeding in adapting the hash generation algorithm to GPUs was a challenge met almost “too easily”. Laszlo was unable to explain the sharp increase in hashrate for GPU mining.


However, Laszlo didn't ruin Bitcoin in any way. Although he no longer touted the merits of his new discovery, GPU mining and therefore network hashrate continued to grow. This had a direct effect on manners:


Blockchain Works!



A high hashrate meant better security, low cost transactions, good popularity, and increased confidence in the project. Laszlo Hanyecz therefore brought two major advances to Bitcoin:


  • The first symbolic transaction “IRL” made in BTC;
  • GPU mining (with a much higher hashrate which empirically demonstrated the proper functioning of the blockchain).
  • The Achilles heel of CPUs was that they were not efficient at multitasking (the complete reverse of GPUs) and this is the main component of hash production: multitasking.
  • Conversely, the problem with GPUs (still today) is their energy efficiency. The average energy cost per hash is higher for GPUs than for any other modern mining component. By taking these parameters into account, the precursors of today's ASICs were born: FPGAs.


FPGA Mining


FPGAs are “integrated circuits made up of a network of programmable cells” according to Google's definition. It is therefore possible to modify the structure of the processor at will. They are adaptable to specifically cover the needs of a process (for mining these are hash functions).

They are the types of components that provide the best energy efficiency, but their cost and the complexity of their implementation (you have to program the chip differently for each hashing algorithm) have meant that their propagation has been limited. There are few or almost none in operation on the Bitcoin network. The biggest breakthrough that FPGAs have brought to the blockchain is that they initiated ASIC mining.


ASIC Mining


ASICs are “integrated circuits which group together on a single chip all the functions necessary for a specific application” according to Google's definition. That is, they are very good at performing a specific task but cannot (unlike FPGAs) adapt or scale when the task at hand changes (even slightly).


ASICs are basically FPGAs that cannot evolve. They are as energy efficient as FPGAs, without having the cost of the latter. Setting up an ASIC miner is also much easier than setting up an FPGA miner.


For all of these reasons, you guessed it, a majority of crypto miners today are ASICs.


The information cited above is valid for cryptocurrencies using the Proof of Work system (which is by far the most widespread system). There are many other security processes like Proof-of-Stake, but they are less used and developed.


Cloud-Mining


Cloud-Mining is technically identical to the types of hardware mining, but it is different from the miner's point of view. There is no question of having to worry about all the technical problems generated by the machine. A company installs, maintains and optimizes mining equipment on its premises. Electricity costs are also, in most cases, the responsibility of the professional. The individual will simply rent a certain hash power and mine with it.


The problem of Cloud-Mining lies in the trust that can be placed in the companies offering the offers but also and above all in its profitability. Its rental is very often more expensive than the crypto it will generate. It can become interesting only for SOLO mining under certain conditions and we will see the reasons for this in a future article.


Staking


Mining also exists in the Proof of Stake process, the confidence factor then does not reside in the computing power delivered by the miners but in the confidence given by certain owners of the cryptocurrency.


People acquire a certain amount of crypto (developers determine the minimum required in the code). Then they store them in an online wallet and receive new units as they verify Blockchain operations. This is called staking. Their capital is a guarantor for verified transactions. In this way, instead of returning the new units to the winning miners, they are returned to the owners of the nodes.


The best analogy of this model with the real world is that of democracy. While in direct democracy everyone speaks and we follow the one who has the support of the majority (PoW). With Staking (PoS), we name nodes that express our ideas for us and vote for us (representative democracy).


One of the problems with the PoS system is the “not really” part of this analogy. Nodes are not chosen by users but assigned according to the number of units they own. It's a less democratic system than PoW, and it bears a disturbing resemblance to the banking system: if you have money, you have power, and the more money you have, the more confidence you build.


Masternodes


There is a final way to mine cryptocurrency: the creation of Masternodes (Master Knots). The latter have a working principle similar to staking but with a subtle difference. It lies above all in the reason why the miner receives his reward and the way in which the winning system is organized. We will not attempt to explain this difference as the similarities between the two are great. Especially from the point of view of the miner and this is the point of view that we had taken in this article.


The emergence of new ways of mining has therefore occurred with changing needs. We will see in our next article the different ways of mining that exist today and what they involve.

Read More :

1 Comments:

avatar
This comment has been removed by the author.

Click to comment