current position:Home>Uncover the veil of "mining": detailed explanation of ASIC mining machine?

Uncover the veil of "mining": detailed explanation of ASIC mining machine?

2022-05-15 05:32:47Digital financial assets research center

This article is written by Li Peijun of Tsinghua University , stay 《 Blockchain and cryptocurrency 》 In class , What you think and feel about your courses , Share and communicate with you . This article is a student work , Does not represent the central point of view .

pick want : In recent years , With the gradual rise of encrypted digital currency , The currency Bitcoin,BTC) As the representative of encrypted digital currency , Attracted widespread attention . Bitcoin based workload proof (Proof-of-Work,POW) The mechanism stipulates that miners who take the lead in solving complex mathematical problems , You can get the power of bookkeeping and bitcoin rewards . Mining equipment is the source of solving this complex mathematical problem , It needs to be calculated continuously . In the current hot bitcoin market , The rise in currency prices has not only led to more and more participants in mining , It makes all kinds of mining equipment in short supply 、 There is “ It's hard to get a chance ” The situation of . In this paper , I combine my major ( Integrated circuit technology and management ), This paper makes an interesting introduction to the mining machine equipment related to encryption algorithm and integrated circuit in bitcoin mining , The existing mainstream mining machinery products, equipment and industrial chain are analyzed .

key word : The currency ; dig ; Mining machinery equipment ;ASIC mill ; Blockchain

One 、 Bitcoin mining  

1.1 Hash function and SHA-256 

A hash function is a mathematical function , It can convert any form of data into a fixed length value by calculation . Because of its unidirectional 、 Anti collision 、 Stability and other characteristics , It has been widely used in digital signature , File check , Encrypted digital currency and other fields .

chart 1 Flow chart for encryption using hash function . In the picture , The leftmost part is the input information , The middle part is the hash function used , The rightmost part is the output result value .

chart 1 Hash function encryption flow chart  

Suppose we type “Dog” This character , After the operation according to the hash function, you will get a string of output , Such as “0eb1 29bf……”. Empathy , When the input “I am a student” String can also get an output . When we will add a... After the string “.” , That is, the original character becomes “I am a student.” when , You can see that the output text has changed dramatically , This shows that we can't push back the input only from the output . Besides , The hash function can also handle input outside of this article , Like files and so on .

In the hash function , One of the most famous algorithms is SHA Series algorithm .SHA A series of algorithms were developed by the national security agency (NSA) Design , National Institute of standards and technology (NIST) A series of published password hash functions , Include SHA-1、SHA-224、SHA-256 and SHA-512 And so on . stay SHA In a series of algorithms , The most common is SHA256 Algorithm .SHA-256 The characteristic of the algorithm is that for messages of arbitrary length , The output length is fixed to 256 The result of a .

chart 2 SHA-256 encryption algorithm

chart 2 The use of SHA-256 The process of encryption by the algorithm . However, in the figure, only “982153ce……”64 Bit character . It's because of this 64 Bit characters are actually represented in hexadecimal form , So actually the output is still 256 position (4 Binary bits can be represented by 1 Hexadecimal digits to represent : As in binary 1100 And... In hexadecimal c Equivalent ).

1.2 What is mining ?

surface 1 Different encrypted digital currencies and their encryption algorithms are given , It can be seen that the hash function adopted by bitcoin is... In cryptography SHA-256 Algorithm . The following is an example of bitcoin .

surface 1 Different encrypted digital currencies and encryption algorithms  


BTC It is composed of blocks , Each block can be divided into block header and block body . The block header mainly records the basic information of the current block , Pictured 3 Shown , contain : edition (Version)、 Time stamp (Timestamp)、 difficulty (Difficulty)、 random number (Nonce)、 Hash value of current block transaction information (Merkle root) Etc . The block body mainly records the current block transaction information .

  chart 3 Block header information  

The rule designed by Nakamoto, the founder of bitcoin, is : Who found the qualified block first , Who can get the reward of bitcoin , So how to find this block ? actually , In the block header information given above , Except for random numbers Nonce outside , Other values are known . So , What we're looking for is random numbers Nonce, Make the hash value of the current block header processed by the hash function less than the specified hash value . because SHA-256 The algorithm is a one-way calculation function, which cannot be deduced , There is no known formula , So we can only try by counting one by one , Until you find the right value .

Besides , Nakamoto also expected , With the continuous development of science and Technology , The computing resources of people's computers must be larger and larger , In order to prevent the process of finding blocks from becoming simpler and simpler , He specifies a difficulty factor when specifying the hash value , Let the specified hash value change with the change of the coefficient .

Pictured 4 Shown , Because the difficulty is in the denominator , As the difficulty coefficient increases , It is less and less likely to find the hash value of the block header that meets the conditions . So , We need a lot of calculations , To keep trying .

chart 4 Block header hash value condition formula  

For example 2022 year 4 month 6 Japan , Because the difficulty is 28.59T, Then in theory, we need to (28.59T) multiply (2 Of 32 Power ) Times hash operation . Simply speaking , The essence of mining is that many computers work together to calculate a mathematical problem , Who worked out the answer first , It's equivalent to digging into a block to get a bitcoin reward . Because the computing power of each computer is different , But it's all about mining , So , We can use computational power ( The number of hash operations that can be performed per unit time ) To measure the quality of a device .

Two 、 Mining equipment  

Mining equipment can be divided into three categories :CPU equipment 、GPU Equipment and ASIC equipment . There is a constant iteration between the three , The process of continuous development . In short , Among the three, there is a trend towards equipment specialization 、 Mining efficiency is getting higher and higher . Often people can't understand the relationship between the three , We can make an analogy : Suppose we need a lot of computation to solve a problem now 、 Very complicated math problems , that CPU Is a pupil who doesn't have much knowledge , Computing power is slow 、 Each step takes a long time to think .GPU Is a college student who has studied advanced mathematics , Have a certain mathematical foundation , Computing ability is much faster than that of primary school students . and ASIC It can be compared to an old professor in the Department of mathematics , Read countless questions , The strongest computing power , Problem solving efficiency is the highest .

surface 2 given 2018 year 1 Digging on the moon Wright coin The case when , From each Watt From the value of hash ,GPU Equipment time CPU The equipment 1800 times ;ASIC The device is GPU The equipment 188 times ,CPU The equipment 34 ten thousandfold . These three devices will be introduced in detail below .

surface 2 2018 year 1 Comparison of data of three kinds of equipment in January ( source :UEFI and BIOS explore a mystery )

2.1 CPU equipment

CPU(Central Processing Unit) The central processing unit , It is the core equipment of computer , Responsible for information processing and operation . When bitcoin was just born , Everyone uses ordinary computer equipment (CPU) To mine . Few people use a computer exclusively to mine , Because only part of the computing resources will be used in the mining process , Other resources in the computer ( Such as hard disk 、 Storage, etc ) Almost all idle , It's very uneconomical . But with the increasing number of miners , And the increasing difficulty coefficient of mining , Use... On a general-purpose computer CPU Mining efficiency is getting lower and lower . Currently in use CPU It's hard to dig out bitcoin .

2.2 GPU equipment  

GPU(Graphics Processing Unit) Graphics processor , At first, it is often used in graphics cards to speed up the rendering of images , Its excellent computing performance has attracted the attention of the coin circle . With the popularity of encrypted digital currency , Graphics cards are also used for mining , This also led to the shortage of graphics cards a while ago 、 The reason for the sharp rise in prices . at present ,GPU The market is mainly AMD company (A card ) And NVIDIA (N card ) monopoly .

2.3 ASIC equipment  

ASIC ( Application Specific Integrated Circuit) That is, ASIC , It is designed to meet the requirements of specific users and specific electronic systems 、 Integrated circuits made . We often hear ASIC Mining machine refers to the chip used in it ASIC Special chip .

because ASIC The chip can be customized for a certain algorithm , So in the field of encrypted digital currency , If the user wants to dig BTC, You can design a needle for SHA-256 Algorithm specific ASIC Chip to improve computing efficiency .

chart 5 A simple example is given , If we are going to be in CPU and ASIC On the device F=A+B*C Arithmetic , that CPU The device will go through “ Multiply first , Add again ” Calculate in two steps . And specially developed ASIC chip , You can design a multiplication and addition operation separately , Add and multiply at the same time in one step .

chart 5 CPU and ASIC Equipment calculation process

stay ASIC After the chip design is completed , It also needs to be verified in the integrated circuit 、 comprehensive 、 Test, layout and wiring , Before they can be sent to the foundry for streaming , Moreover, after the chip is streamed, it is necessary to further package and test the chip as a whole , After all the above processes are completed, the chip will return to the hands of the customization . here , Get ASIC Chip miner manufacturers also need to assemble various components to form the final product ASIC mill . because ASIC The handover of the chip from the initial design to the final physical object will involve a variety of processes , therefore ASIC The R & D cycle of mining machine is generally about one year or even longer . because ASIC Chip mining machine can carry out more efficient calculation , Greatly increase the number of operations in the same time , So at present ASIC Miner is the most efficient mining scheme .

surface 3 Three kinds of mining equipment and their corresponding characteristics are compared . about CPU equipment , Because of its general characteristics , Under the specific demand of mining, the efficiency is low .ASIC Because the device can only be developed for a specific application , So flexibility is largely sacrificed in improving efficiency .GPU Equipment is somewhere in between .

surface 3 Summary of three mining equipment


3.1 The main structure of the miner   3、 ... and 、 Miner structure 、 Indicators and products

We know ,ASIC The most important of mining machines is ASIC chip , But in addition to ASIC Off chip , There are other important components . The following will analyze the main structure of the miner .

(1) chip : namely ASIC chip , As a whole ASIC The core equipment in the miner .

(2) a main board : Easy to integrate chips and various accessories , Pictured 6 Shown .

chart 6 Schematic diagram of motherboard  

(3) so : Used for information exchange on the network  

(4) Fan : Used to dissipate heat , The miner will produce a lot of heat during operation .

(5) Power Supply : Supply power to the whole miner .

chart 7 yes D3 Model ant miner , Because the mainboard is integrated in the miner, we can't directly observe , But in the appearance of the miner , We can observe the mesh port 、 Open source switch, fan and other structures . at present , Some of the latest mining machines have also added water cooling devices , To reduce the problem of excessive temperature during equipment operation .

chart 7 Ant miner D3

3.2 Miner index  

(1) Calculate the force —— The number of hash operations can be calculated per second , The basic unit is hash per second (H/s). Besides, there are KH/s(103H/s)、MH/s(106H/s)、GH/s (109H/s)、TH/s (1012H/s) Equal unit . at present ,GPU The computing power of the equipment is generally MH/s Magnitude , The computing power of mining machinery and equipment is generally TH/s Magnitude .

(2) cost —— The purchase cost of each mining machine

(3) Electricity fees —— Power consumption of miner  

(4) maintain —— It is necessary to clean the dust and oil the fan regularly  

(5) noise —— Although the mining equipment is small , However, it often produces large noise during operation

among , From the perspective of profit , Most miners focus on the first three indicators .

3.3 Mining machinery products  

at present , The mainstream miner consists of an ant miner 、 Shenma mining machine 、 Avalon miner, etc . Here we take the ant miner produced by bit Continental as an example . Bitland is one of the world's largest producers of mining machines , Is a 2013 A young company founded in , stay 2017 The annual operating profit was 30 Million to 40 Billion dollars , In the same period, NVIDIA's operating profit was 30 Billion dollars . At the peak of currency speculation , The tax paid by the company is the first in Haidian District of Beijing , Its profit can be seen .

surface 4 given 2022 year 4 The relevant indicators of the three mining machines sold by bit continental can be seen , With the gradual upgrading of miner models , The energy efficiency of mining machines is getting higher and higher , The power consumption per unit of computing power is getting lower and lower . however , Due to the continuous fluctuation of currency price , As a result, the price of mining machines is not stable . In the present situation , The average price per unit computing power of the three mining machines is 80 dollar /TH about .

surface 4 2022 year 4 Three indicators of mining machinery in the month  

In order to further illustrate the impact of currency price on mining machine price . surface 5 Given at two different time points (2020 year 3 Month and 2022 year 4 month ), Ant miner S19 And ant miner S19Pro Relevant indicators of . It can be seen that the currency price fluctuated sharply at these two time points , From the original 7000 Carry on the up to now 43000 dollar , It can be seen that more and more users are involved in BTC In the deal . And among the three key indicators , The price of mining machine has also changed dramatically with the price of currency , Ant miner S19 The selling price of is determined by the initial 2206 The dollar has risen to its present 7030 dollar , flared up 3 times . And ants S19 Pro The selling price of the original 2957 The dollar has risen to its present 9460 dollar , It has also tripled . This causes the price per unit of computing power to triple .

surface 5 Two miner indexes at different times  

chart 8 Give support SHA-256 Of ASIC Top 10 mining machine revenue ranking . You can see , At present, the best miner on the market is still ant miner S19 Pro+Hyd, Its computing power is as high as 198TH/s. And in the top ten earnings , Bit Continental's ant miner occupies 7 mat , Shenma mining machine occupies 2 mat ,GMO The company's Pineapple miner occupies 1 mat .

chart 8 ASIC Comparison of mining machine income  

The soaring price of bitcoin 、 The prices of other digital cryptocurrencies are also at their historical highs , More and more participants are trying to join the mining and get a share , The mining machine with the highest efficiency of mining equipment is in short supply . At the end of the day , Miners want to get higher computing power , To seek higher returns . at present , Because sales are too hot , Many mining machines on bitland's official website have adopted “ Open to booking ” The pattern of . Once these mining machines and equipment are on sale, they will be sold out immediately , Countless miners are crazy about mining machines .2021 year 6 month , Zhang Nangeng, chairman of Jianan technology, once said , The company's pre-sale orders for mining machines have been scheduled for a year , It can be seen that mining machinery equipment plays an important role in all kinds of global encrypted assets . However , Behind the remarkable computing power of mining machines , There are also many problems .

such as ,① The price of mining machines is easily affected by the price of money :ASIC The R & D cycle of mining machine is long , However, the sharp fluctuation of currency price may bring huge risks to mining machinery companies .

② Continuous iteration of algorithm technology : Due to the increasingly fierce competition in mining , It is possible that the current design ASIC The chip soon became obsolete , Other companies have introduced more efficient ASIC mill .③ Opacity of delivery : buy ASIC Mining machines often need to pay in advance to book ( Almost all futures ), And it will take a long time to ship , However, in fact, some manufacturers dig their own mines after producing finished products .

Four 、 Mining machinery industry chain  

since 2013 year 1 The first TV in the world ASIC mill ——Avalon After its appearance , Many manufacturers all over the world have joined in the research and development of mining machines . today , Mining machinery and equipment have formed a relatively complete ecological chain system , Pictured 9 Shown .

chart 9 ASIC Mining machinery industry chain  

(1) chip 、 Mining machinery manufacturing  

Upstream of the mining machine is chip design 、 Mining machinery assembly and other industries , Because the mining machine as a whole will involve ASIC Chip design and manufacturing 、 Packaging and other processes , And in ASIC After the chip is released “ dig ” The veil of :ASIC After the detailed explanation of the miner, it is necessary to assemble it with the miner . at present , The biggest market share is bitcontinental's mining machine , in addition to , Jia Nan's wisdom ( Avalon miner )、 Yibang International ( Wing bit miner )、 Bit micro ( Shenma mining machine ) And other companies also occupy a certain market share .

(2) Ore pools and mines  

although ASIC The computing power of the miner is compared to CPU、GPU The equipment has been greatly improved , But because the income of a single miner is not stable , The mining trend is also gradually changing from personal mode to mine pool mode , Nowadays, mining is mainly in the form of ore pool , The top ten bitcoin mining pools in the world are shown in the figure 10 Shown . However , How to distribute rewards fairly under the mine pool mode is still worthy of our in-depth discussion ( Such as PPS、PPLNS、PPS+ Equal mechanism ), Because of this part, I have discussed it in detail in the last reading report , Therefore, I will not repeat here . Besides , In order to improve mining efficiency , Some miners hoard thousands of 、 Ten thousand mining machines , Because the miner consumes electricity 、 The noise situation cannot be placed in the daily environment , Therefore, there are also some companies responsible for building mines .

chart 10 Top 10 BTC Ore pool

(3) The miners  

Miners as users of mining machines , At the bottom of the industrial chain . Individual miners need to buy their own mining machines and build mines .


In this paper , Based on his professional knowledge, the author designs the terminal of encrypted digital assets —— The mining equipment is introduced in multiple dimensions . Firstly, the concepts of bitcoin mining and related encryption algorithms are reviewed , Secondly, according to the development process of the equipment, three classical mining equipment are introduced . At the same time, it also combines the existing mining machinery equipment products , For the internal structure of mining machinery equipment 、 Key indicators are analyzed . Finally, the existing mining machinery equipment industry chain is combed .

With the rising price of various encrypted digital currencies , All kinds of mining equipment are also rising , Double the price of graphics card equipment , It's hard to find a miner's equipment , This makes these mining equipment one of the hottest topics in the coin circle . However , While cryptocurrency brings us decentralization and high security , The process of finding it has caused a certain waste of energy and brought some problems , How to mine in a better way and how to avoid the problems caused by mining machines , It's still worth exploring .

copyright notice
author[Digital financial assets research center],Please bring the original link to reprint, thank you.

Random recommended