Are mining pools and mining machines too expensive? Get your pen and paper ready and count Bitcoin with me!

Are mining pools and mining machines too expensive? Get your pen and paper ready and count Bitcoin with me!

This article gives us a new idea, that is... Who says you can't mine without spending money! Let's take a look at how foreigners use paper and pen to "mine" Bitcoin manually. In fact, the SHA-256 algorithm used for mining is relatively simple and can be calculated manually. There is no doubt that this process is definitely N times slower than the speed of GPU or CPU, and it also makes people feel a little unrealistic.
However, manually completing the calculation of the mining algorithm with paper and pen can indeed give you a deeper understanding of the working mechanism of the entire algorithm.
The following image shows a round of SHA-256 that we calculated manually using paper and pencil:


(Picture: Bitcoin manual mining process)


Mining is a key part of the overall security of the Bitcoin system. The idea of ​​mining is as follows: Bitcoin miners organize a series of Bitcoin transactions into a block, and then repeat N times of encrypted hash calculations (hash calculations) until a special hash value is found.
At this point, the block has been successfully "mined" and has become part of the Bitcoin blockchain. In fact, the computational task itself is meaningless, but since it is very difficult to find a successful block, this ensures that others cannot take over the Bitcoin system.


A cryptographic hash function can take a large amount of input data and output an unpredictable output value. For Bitcoin, the hash function it uses is called SHA-256. In order to provide additional security protection, Bitcoin uses the SHA-256 function twice, which is called double SHA-256.
In the Bitcoin system, a successful hash starts with enough zeros. Just like you rarely see mobile phone numbers or ID numbers ending with multiple zeros in daily life, it is difficult for us to find a hash value that starts with multiple zeros. But in the Bitcoin system, everything increases exponentially. Currently, a successful hash must start with about 17 zeros, so the success rate of hash calculation is about 1/1.4×1020. In other words, finding a correct hash value is harder than finding a needle in a haystack.
The image below shows a block in the Bitcoin blockchain and the corresponding hash. In the image below, the yellow-labeled hash bytes are used to generate the block hash. As you can see, the calculated hash starts with enough 0s, and now the mining has been successful.


(Figure: SHA-256 hash algorithm used by Bitcoin)


The SHA-256 hash algorithm takes a 512-bit (64-byte) input data block, combines it with the encrypted data, and generates an output value of 256 bits (32 bytes). The SHA-256 algorithm consists of 64 relatively simple repeated calculations. The following figure shows one of the rounds of calculations, where eight 4-byte data are used as input, from A to H, and a series of calculations are performed to generate a new AH value.


For the specific calculation process, please refer to Satoshi Nakamoto's Bitcoin white paper.

Human Mining


We show you below how to manually calculate the SHA-256 hash calculation just described using pen and paper. I implemented one round of hash calculations myself during the mining process, and the whole process took about 16 minutes.
The following figure shows the last round of hash calculations for a Bitcoin block, with the results marked in yellow. The multiple zeros at the end indicate a successful hash calculation.

Hardware Mining


Each step in the SHA-256 hash calculation can be easily implemented in digital logic (simple Boolean operations and 32-bit summation), so custom ASIC chips can efficiently implement the SHA-256 algorithm in hardware and perform hundreds of rounds of hash calculations in parallel on a single chip. The following figure shows a mining chip with a calculation speed of 2-3 Ghash/second: (Currently, mining machine chips generally start at 10THash/s)


In contrast, Litecoin, Dogecoin, and similar altcoins use the scrypt hashing algorithm, which is difficult to implement on simple hardware. It requires storing 1024 different hash values ​​in memory, which are then combined in an unpredictable way to generate the final value.
Therefore, the scrypt hashing algorithm will require more circuit boards and memory than SHA-256 (graphics cards are the best solution, especially the Tesla P100 launched by Nvidia). You can also understand this from the mining speed and hardware. After all, the speed of mining these altcoins (scrypt) is thousands of times slower than the speed of mining Bitcoin (SHA-256).

Summarize


The SHA-256 algorithm is actually very simple, simple enough to calculate by hand. However, the elliptic curve algorithm used to sign Bitcoin transactions is difficult to calculate by hand because it involves multiplication of 32-byte integers. It took me 16 minutes and 45 seconds to perform one round of SHA-256 hashing. At this speed, it would take 1.49 days to hash a full Bitcoin block (128 rounds), or 0.67 hashes per day.
In contrast, current Bitcoin mining hardware can perform several terahash calculations per second, which is much faster than manual calculations. There is no doubt that Bitcoin manual mining is definitely impractical.

Cost per G


A Reddit reader asked me about the energy consumption. In fact, the whole process does not require much energy. Assuming a resting metabolic rate of 1500 calories per day, the energy consumed by manually calculating hashes is about 1000 joules/hash.
The average consumption of hardware mining is 1000 megahashes/joule. This means that the energy cost of manual mining is about 10^16 times that of hardware mining.
Considering food, a regular donut costs $0.23 and has 200 calories. Electricity costs about $0.15/kWh, so the cost per hash is 6.7×10^8 times higher than the cost of hardware mining. Obviously, I don't plan to make money by mining manually , and I haven't even taken into account the cost of paper and pens required for calculations.

<<:  The difference between digital currency POW/POS/MN

>>:  What is the digital currency that the central bank is going to launch after a year of hard work?

Recommend

What are the characteristics of a man with a lucky face?

A rich life and a blessed life are what we pursue...

Will you become famous from your career line?

People whose career line begins at the Moon Hill ...

Is the civil war among Bitcoin bulls really over?

Author: Cleopatra About a year ago, a debate over...

Analysis of the Wealth Officer in the Twelve Palaces of Physiognomy

The tip of the nose is the palace of wealth. It i...

Is a man with a flat nose a good or bad sign?

In physiognomy, if a boy has a round face and a f...

How the size of your nostrils affects your destiny

How the size of your nostrils affects your destin...

What kind of people will have a sister-brother relationship?

What kind of people will have a sister-brother re...

A brief analysis of Ethereum 2.0 technology: Beacon chain and sharding

Just last July 31, Ethereum, the second largest c...

Bao Erye posted on Weibo that Bitcoin God can start mining

https://weibo.com/ttarticle/p/show?id=23094042355...