Popular Science | Bitcoin Mining: Three Articles on Cryptography Principles, Hardware Knowledge, and a Brief History of Development

Popular Science | Bitcoin Mining: Three Articles on Cryptography Principles, Hardware Knowledge, and a Brief History of Development

Author: Village Head Two Old

The previous article used the business model of chicken farms to compare Bitcoin mining farms, and introduced the basic picture of the entire Bitcoin mining ecosystem, including mining machine companies, mining farms, mining pools, mining machine hosting, second-hand mining machine market, cloud computing power, computing power, etc. Today is the second of three articles on mining, mainly describing the mathematical principles of Bitcoin, cryptography and hardware knowledge, as well as the brief history of the development of Bitcoin mining machines.

Let’s continue to describe this process in a simplified form that is easy to understand.

Why are there 21 million bitcoins?

Putting aside the economic ideas of the designers, let's talk about the mathematical ideas directly. Starting from January 3, 2009, there was one block every ten minutes, and the reward for one block was 50 BTC. Four years later, it was halved to 25 BTC, and it continued to halve after another four years, and so on.

We are currently in the third stage, which means the block reward is 12.5, which will be halved to 6.25 next year.

Use mathematical formula to calculate.

There are 6 ten-minute periods in an hour, 24 hours in a day, 365 days in a year, and halving in four years. It keeps halving, which means it is a geometric progression.

Total amount of Bitcoin = 50 x 6 x 24 x 365 x 4 x (1+1/2+1/4+1/8+……+1/2^n)

The above equation is approximately equal to 21 million, among which (1+1/2+1/4+1/8+……+1/2^n) is a geometric sequence, which is mathematically equal to 2.

It can also be seen that in the first four years of Bitcoin, the number of mined coins was 10.5 million, which is half. Then in the second four years, the number of mined coins was half of 10.5 million, which is 5.25 million. The third four-year cycle was half of 5.25 million, which is 2.625 million. Now it is at the end of the third cycle (halving in May and June 2020), so many news reports say that the current "circulation" of Bitcoin is 17 or 18 million. You can use a calculator to add it up, which is this number, but millions of them may have been permanently lost, and the circulation is much lower than the output.

Note: Mining rewards actually consist of two parts: one is the block reward, and the other is the Bitcoin transaction fee incurred by the entire network within about ten minutes. The latter accounts for a very small proportion and can be ignored in the current stage of profit calculation.

Quoting the logic of the chicken farm in the previous article, the hen lays golden eggs, but some of the golden eggs are lost, so the total circulation is lower than the output.

Simply put, the economic model is a deflation model, and there is no major innovation in the economic model. Whether Satoshi Nakamoto (this person or this organization) has made a Nobel Prize-level contribution has nothing to do with this deflation model. Because it is an extremely simple (and relatively crude) economic model. No country in history has adopted this model to achieve economic prosperity. This article only talks about mathematical models.

What is the process of Bitcoin mining? What are the principles of cryptography?

Simply put: solve a math problem, broadcast it, and get a block reward after verification. After receiving the information, other mining machines give up solving this math problem and work on the next one to get a block reward. And so on.

To be more specific, this mathematical problem here uses a cryptographic knowledge: one-way hash function

One-way hash function, also known as hash function, the hash function in Bitcoin is SHA256.

I have written many articles about cryptography before, which you can refer to (Cryptography in Bitcoin: Five Characteristics of Hash Functions and Mining Principles). I will also briefly explain it here.

SHA256 is a hash function. SHA (information) = 256-bit binary number. You can quickly get the 256-bit binary number by inputting any information, such as a copy of "Dream of Red Mansions" or a word. If you change the input information a little bit, the result will be very different. Moreover, the input information cannot be inferred from the result information.

For binary, the more leading zeros there are, the smaller the number is. If the range is less than or equal to this number, it means that the more leading zeros there are in the binary digits, the narrower the range is, and the more difficult it is to guess the input value.

SHA256 (SHA256 (information + x)) is less than or equal to the target value (target).

Use a mining machine to find or guess x until the conditions are met. This is mining.

The information in the formula is the block header information, including version, pre_hash, merkle root, ntime, nbits and other information. It changes with the change of block height and time. The guessed x value can also be written as nonce. It doesn’t matter what it is written as. It does not affect the understanding of Bitcoin mining. Just know that it exists.

The mining process only uses the characteristics of one-way hash functions. Don’t worry about concepts such as public key encryption, signature, and verification, as they are not necessary in this problem-solving process.

If you still don't understand, please ignore the description of the one-way hash function above and simply think of it as solving a math problem. And the only way to solve this math problem is to guess, there is no reasonable calculation method to solve this problem.

Hardware knowledge and a brief history of mining machine development

This difficult mathematical problem was first solved by the CPU, then by GPU graphics cards, then FPGA, and then the current mainstream Bitcoin mining ASIC chip miners.

CPU can handle complex problems, but the problem-solving process does not require such a complex mind, just guess hard. Therefore, it is better to use GPU with parallel computing and other related features. The most famous companies are NVIDIA and AMD. In the mining circle, the former is called N card and the latter is called A card.

GPUs have power consumption and other disadvantages, so FPGAs are used. There is a very powerful drone company in Shenzhen called DJI Technology, which uses FPGAs. GPUs and FPGAs have many applications in the field of artificial intelligence (knowledge expansion, not related to today's topic).

FPGA is Field Programmable Gate Array (Again, please don't get hung up on any concepts you don't understand, just skip them). To put it simply, it is easy to program and adjust. However, it has too many functions. I just need someone who can put the dumplings into a box, not an undergraduate or PhD student. If we continue to simplify, ASIC chips will appear.

"I needed only a pair of hands, and you gave me one" - Henry Ford

Now AISC is essentially a simplified product, with only one pair of hands left to solve this one function problem.

Compared with CPU, CPU is a competition between a PhD student and a production line worker to see who can pack Yuanxiao into a box faster. Due to excellent integration, it has become a competition between a PhD student and ten or one hundred production line workers to see who can pack Yuanxiao faster. The result is predictable. Therefore, now Bitcoin mining only uses ASIC chip mining machines.

The logic of the development of mining machines has been explained above. The historical part is briefly described as follows:

On January 3, 2009, Satoshi Nakamoto used CPU to mine; in September 2010, GPU mining was available; in 2011, FPGA was available; in August 2012, Fried Cat raised funds to build ASIC mining machines. At that time, the world's mining industry began to tilt towards China. In November 2012, BTC halved for the first time, almost four years since 2009. In early 2013, Fried Cat continued to work. Avalon ASIC mining machines were developed, which were also the earliest batch of ASIC mining machines in China. The parent company is Canaan Creative, the company whose stock price plummeted on the Nasdaq recently.

At the end of 2013, many first-generation students entered the market. China saw two large-scale miners and speculators appear. The first was in 2013, and the second was in 2017. A big positive line, thousands of troops come to meet, that's what it means. The history after 2014 is easy to find on the Internet. Fried Cat disappeared in January 2015, mysteriously disappeared. Why did he disappear? Was he murdered, was he taken away by aliens after traveling through time, or was the mining machine gradually not good enough and he ran away? We don't care about these contents. This is not a gossip article. Comrade Fried Cat has made great contributions to Bitcoin mining. Here I pay tribute to Comrade Fried Cat.

Everyone knows the story that followed. Bitmain rose to prominence and occupied more than 80% of the global market in 2017 and 2018. In the past year, Bitmain's Antminer accounted for more than 60%, and Shenma's mining machines accounted for more than 20%. If you are interested, you can check it yourself to find out the grievances and specific market proportions.

This article covers three topics: the basic principles of Bitcoin mining, some basic knowledge about mining hardware, and a brief history of the development of mining machines.

Combining the first and second articles of the three mining industry articles, you can get a panoramic view of the entire Bitcoin mining industry. The next article is about computing power, cloud computing power, electricity costs, payback period, profit calculation, etc. A lot of calculation formulas will appear. Don't worry, you can use a mobile phone calculator. Stay tuned.

<<:  Popular Science | Bitcoin Mining Three Articles: Business Model, Logic of Chicken Farms

>>:  INNOSILICON T3+Pro 67T energy efficiency optimization notice

Recommend

The face of a woman whose marriage will fail

The face of a woman whose marriage will fail What...

What does a mole on the back of a man's neck mean?

Moles can be roughly divided into visible moles a...

Prefer to be alone and afraid of contact with people

In real life, when we communicate with others, we...

Never ask your partner to buy you a gift

Nowadays, many people love to compare with others...

What are the types of peach blossom luck in palmistry?

What are the types of peach blossom luck in palmi...

Broom eyebrow pictures_Broom eyebrow face analysis

Among the many types of eyebrows, there is one ty...

Analysis of the facial features of women with small noses

As one of the traditional physiognomy techniques, ...

What does a mole on the sole of the foot mean?

The most common mole on our body is mole, and mol...

Coin Zone Trends: Bitcoin Price Trends Based on Big Data This Week (2017-02-22)

The price of the currency breaks the previous hig...

Are men with small mouths poor and women with small mouths rich?

There is a saying in China that goes "A man ...