为广大币圈朋友提供币圈基础入门专业知识!
当前位置首页 > 区块链知识> 正文

区块链挖矿算法,区块链挖机算力是什么

发布时间:2023-12-06-00:13:00 来源:网络 区块链知识 区块   挖矿   算力值

区块链挖矿算法,区块链挖机算力是什么

近几年来,区块链技术的发展及其在金融、交易等领域的应用,使得挖矿技术也受到了越来越多的关注。区块链挖矿算法是挖矿技术的核心,它是一种分布式计算技术,可以实现计算机系统之间的安全数据交换和共识机制。

区块链挖矿算法主要包括工作量证明(Proof of Work,POW)、权益证明(Proof of Stake,POS)和共识机制(Consensus Mechanism)三大类。其中,工作量证明是挖矿技术最为重要的一种,它是一种计算验证机制,可以验证挖矿者的计算能力,从而确保区块链系统的安全性。

区块链挖机算力是指挖矿者所拥有的计算能力。挖矿者需要拥有足够的计算能力,才能够在区块链系统中实现有效的计算验证,从而获得挖矿收益。

挖矿者的算力可以通过购买挖矿机来获得,挖矿机的计算能力可以用算力值来衡量,一般来说,挖矿机越强大,其算力值就越高,挖矿收益也就越多。

挖矿机的算力可以通过它的处理器、内存、硬盘等硬件参数来衡量,挖矿机的算力值可以通过挖矿软件的测试来获得,挖矿者可以根据自己的需求来选择合适的挖矿机,以获得更好的挖矿收益。

总之,区块链挖机算力是挖矿者所拥有的计算能力,它是挖矿技术的核心,可以实现计算机系统之间的安全数据交换和共识机制。挖矿机的算力可以通过它的处理器、内存、硬盘等硬件参数来衡量,挖矿者可以根据自己的需求来选择合适的挖矿机,以获得更好的挖矿收益。


请查看相关英文文档

Ⅰ How to make money by mining in the blockchain

The principle of making money by mining: PoW and mining.

In the beginning, Bitcoin could be mined using graphics cards, but in 2013, it was no longer possible to mine Bitcoin BTC using general-purpose computing programs for graphics cards. Bitcoins are now all mined using ASIC mining machines. ".

Similarly, the launch of Litecoin ASIC mining machines in 2014 also ended the history of Litecoin mining using graphics cards. The current digital currencies that graphics cards can "mine" are Ethereum ETH, Ethereum Classic ETC, and Zcash Zerocoin ZEC.

Graphics card "mining" is not a profitable business. In fact, the earlier you start, the higher the income will be, and the income will decrease as more miners and graphics cards are added.

To put it bluntly, buying a high-priced graphics card to enter "mining" will definitely kill you. Purchasing a professional mining machine is a more cost-effective choice. Nowadays, the essential tool for personal mining is a mining pool. The function of a mining pool is to gather a large number of mining machine computing power to increase your chances of mining coins. At the same time, the coins you can mine in the future are evenly distributed to your account in advance.

Take Bitcoin as an example. If the entire Bitcoin network now generates a block every 10 minutes, this block contains 25 Bitcoins. Assuming that there are 10,000 people in the world participating in mining, then within these 10 minutes, only one lucky person will take away the 25 Bitcoins.

Others have nothing to gain. The principle of the mining pool is that everyone forms a team to mine and allocate according to the agreed distribution method, so that the miners' mining returns tend to be stable and the miners' risks are reduced.

In order to enhance the cost performance, you can also purchase some practical mining machines like Wanke Cloud, which can be used as ordinary hardware products and can also be used for mining, killing two birds with one stone.

(1) Extended reading on blockchain mining computing power value

There are several operational cores of blockchain transactions and digital currency:

The transaction network connected by decentralized databases is called the blockchain. All our clients (including mining machines) keep accounts together, confirm transfer transactions, and issue a certain amount of digital currency according to time.

Because the winner takes all, small and medium-sized retail miners have to unite to form a "mining pool" and record the cumulative workload in Shares. The higher the joint computing power, the greater the probability that the mining pool consortium will find the digital currency first. Large, increase the probability of finding newly issued digital currencies, and divide the mined digital currencies. This is called the PoW workload proof mechanism.

Ⅱ One article to understand the Ethereum mining algorithm and computing power scale 2020-09-09

In the Ethereum network, if you want to obtain Ethereum, you must also do it through mining. Currently, Ethereum also uses the POW consensus mechanism, but unlike BitcoinPOW mining is a bit different. The difficulty of Ethereum mining can be adjusted. The Ethereum system has a special formula for calculating the difficulty of each subsequent block. If a block is verified faster than the previous block, the Ethereum protocol increases the difficulty of the block. By adjusting the block difficulty, you can adjust the time required to verify the block.

Ethereum uses the Ethash encryption algorithm. During the mining process, it is necessary to read the memory and store the DAG file. Since the bandwidth for each internal read is limited, and it is difficult for existing computer technology to make a qualitative breakthrough on this issue, no matter how the computer's computing efficiency is improved, the memory reading efficiency will still not be very high. Big change. Therefore, in a sense, Ethereum’s Ethash encryption algorithm is “ASIC resistant”.

Differences in encryption algorithms have led to large differences in the mining equipment and computing power scales of Bitcoin and Ethereum.

At present, Bitcoin mining equipment is mainly ASIC mining machines with a high degree of specialization. The computing power of a single mining machine reaches a maximum of 112T/s (Whatsma M30S++ mining machine). The scale of computing power reaches 139.92EH/s.

Ethereum’s mining equipment is mainly graphics card mining machines and customized GPU mining machines. There are very few professional ASIC mining machines. On the one hand, this is because of the improved “ASIC resistance” of the Ethereum mining algorithm. On the other hand, after Ethereum upgrades to 2.0, the consensus mechanism will be transformed into PoS, and the mining machine will not be able to continue mining.

Compared with ASIC mining machines, the computing power of graphics card mining machines differs by 2 orders of magnitude. At present, the computing power of mainstream graphics card mining machines (8 cards) is about 420MH/s, the computing power of leading customized GPU mining machines is about 500M~750M, and the computing power of the entire Ethereum network is about 235.39TH/s.

From a time perspective over the past two years, Ethereum’s network-wide computing power has grown relatively slowly.

The Ethereum protocol stipulates that the difficulty is dynamically adjusted so that the time interval for the entire network to create new blocks is 15 seconds, and the network takes 15 seconds to create the blockchain. In this way, because the time is too fast , the synchronization of the system is greatly improved, and it is difficult for malicious actors to mobilize 51% (that is, more than half) of the computing power to modify historical data in such a short period of time.

Ⅲ What exactly is Bitcoin mining calculating? Manually verify the blockchain to give the answer

Briefly review the mining process.

First, verify all transactions and eliminate problematic ones, and then pass a set of customizedDefined criteria are used to select which transactions are expected to be included in the block. For example, if the ratio of the transaction fee provided to the byte size occupied by the transaction exceeds a certain threshold, such transactions will be considered profitable. Of course, nodes can also deliberately choose to include a certain transaction, or deliberately ignore certain transactions. If you mine through a mining pool, the mining pool's server will screen the transactions and then assign an independent task to each participating mining machine.

Once the transaction data is filtered and reduced layer by layer, a Merkle tree can be calculated through these transactions, and a unique summary can be determined, which is the root of the Merkl tree.

Then we obtain other information needed for mining in turn, which forms the header of a block.

Byte allocation of block header

The block header is only 80 bytes, and mining only needs to operate on the block header. The transaction data is fixed through the merkle tree and does not need to be included.

Much of this information is already fixed or computable.

Let’s take block 277316 as an example. The information comes from the website http://blockchain.info

Bitcoin Block #277316blockchain.info

Select this block The reason is that in the book "Mastering Bitcoin", the Chinese community translation and the English original version are different in introducing this part of the content, and the author Antonopoulos did not mention a key point, which is the issue of byte order. I believe many people may Step on this trap. The details restored here can help readers and books make cross-references.

Please pay attention to each step below and every change. This is the core algorithm of Bitcoin.

When converting time, remember that it must be converted to UTC timestamp. There have been pitfalls here, so be careful.

The discovery of this step is extremely difficult and consumes a lot of inquiries. Big pits, big pits, please bear in mind. The inventor Satoshi Nakamoto may have changed to a coding method that is closer to the machine, little-endian, in order to make the machine calculate faster.

The final result is

The front of the hexadecimal system 15 0s, then 1; and the number corresponding to the difficulty target is

The first 15 0s in hexadecimal, then 3. The calculation result is less thanDifficulty target, meets requirements. This result is consistent with the figures published on the website.

When mining, the nonce random number is unknown and has to be tried from 0 to 2^32. However, this number is actually not big, only 4294967296. With the current mining machine, the computing power is 14T per second. , it doesn’t take even one second to calculate everything up to the upper limit. As mentioned just now, in this case, the incidental information in the currency creation transaction needs to be used, and the additional string becomes the extra nonce.

In addition, the genesis block can also be verified through the above method. Friends who are curious can try it.

Tips:

IV What exactly is mining calculated?

What exactly is Bitcoin mining calculated? How to view Bitcoin mining? Bitcoin mining is a cooperative accounting behavior for different miners to compete for accounting rights. They compete in an orderly manner within the framework of cooperation. That is, the process of using computer hardware to calculate the location of Bitcoin and obtain it is called mining. Mining can not only produce Bitcoins, but also protect transaction information. Mining will be explained in detail below.

Bitcoin skyrocketed to nearly 200,000 yuan per coin at the end of 2017, which not only made the digital currency industry popular, but also the blockchain industry. Because of this, many people are trying their best to mine and obtain To realize your own wealth with Bitcoin, first of all, how does "Bitcoin" mining work? Bitcoin is a virtual currency based on blockchain technology. If we simply compare the blocks of the blockchain to each ledger, then "mining" means "packaging" the transactions of the entire blockchain network in the past ten minutes and writing these transactions into new blocks, then "Packaging" is completed, that is, the "mining" trip is completed. After completing mining, you will receive the Bitcoins distributed to you by the system. This is a relatively simplified term for Bitcoin “mining”, but the principles and operations are still quite complex.

How to allocate "packaging rights"

The price of Bitcoin exceeds 20,000 yuan each. Every time you obtain the "packaging rights", you will receive 12.5 Bitcoins (will (decreasing over time), the profit can be said to be quite generous.

The bustling world is all about profit, and wherever there is profit, there are people. There are many miners on the network, so how to determine which miner should be assigned to do this?

Satoshi Nakamoto, the founder of Bitcoin, adopted this method: using a method called "Proof of Work (Proof of Work)"of Work (POW for short) mechanism, which is the proof of workload.

This method can usually only be proven by the results, because the monitoring process is usually cumbersome and inefficient. This is used to confirm that you have done a certain amount of work, but the entire process of monitoring work is extremely inefficient. Certifying the results of the work to prove that the corresponding amount of work has been completed is a very efficient way.

We can compare it to, to prove that you can drive well, the company cannot give you a few days to follow you around the city. However, you can provide your driver's license and proof of previous employment as a bus driver with a bus company to demonstrate your ability. It takes a lot of time and effort for you to gain this capability, but enterprise verification is very simple.

The proof of work proof mechanism used by cryptographic systems like Bitcoin is Hash Cash, and the corresponding hash function needs to be calculated. Hash Cash is a proof-of-work mechanism that was invented by Adam Baker in 1997. It is mainly used to resist email denial-of-service attacks and spam gateway abuse. Before Bitcoin, Hash Cash was used for spam filtering and was also used by Microsoft in products such as Hotmail.

For the hash function used in cryptographic systems like Bitcoin, it needs to have the following properties:

1. Collision-free, that is, there will be no input x≠y , but H(x)=H(y)

2. Concealment, that is, for a given output result H(x), if you want to inversely deduce the input x, computationally It's impossible.

3. There is no better method than exhaustion to make the hash result H(x) fall within a specific range.

Bitcoin uses the POW mechanism in the development process of the blockchain. A block hash function that meets the requirements consists of N leading zeros. The number of zeros depends on the disassembly of the network. segment difficulty value.

Getting a reasonable block hash code requires a lot of trial and error calculations. When a node provides a reasonable block hash value, it means that the node has indeed gone through a lot of trial calculations, and then the system assigns the "packaging right" to the node (miner)

Of course, this cannot give an absolute value of the number of calculations, because finding a reasonable hash is a probabilistic event, so when a node (miner) has n% of the computing power of the entire network, the node basically has a probability of n/100 to find it. Block hash. That means competing for computing power.

Can I remember the first few zeros and then use them? No, because the difficulty values ​​are different, and the number of zeros is different. And the number to be proved is a hash code, and it needs to be verifiedThe proof of work is very large and basically impossible to fake. There is only one method: exhaustion!

This means that you not only have to calculate your hash value, but you also need to compare whether it is correct. If it is not correct, continue to calculate.

Therefore, a large number of graphics cards are required to perform a large number of parallel operations to obtain hash values. Let's take a look at what a mine is like:

These mines use very expensive graphics cards to calculate, and their calculations are N times that of manual calculations. If we rely solely on manpower, even if it takes ten years, the workload will not be as large as what they can do for one hour of work.

Bitcoin is different from traditional currencies. Legal currencies such as the US dollar and British pound are managed by central banks and financial institutions. These institutions also participate in transfer transactions, while Bitcoin only conducts transactions in distributed ledgers. Every transaction is stored in Bitcoin's global network nodes and cannot be copied or tampered with. Therefore, each node that stores data will receive corresponding rewards. Currently, there are 17 million nodes that have been mined, and the total number of Bitcoins is only 21 million, which means that there are still 4 million Bitcoins to be mined.

IV Buying coins is not as good as buying computing power, but you still don’t know what computing power is

With the rapid heating up of the Bitcoin mining market, cloud mining machines are a flexible and Efficient Bitcoin mining solutions have gradually become the mainstream of the market. Domestic and foreign Bitcoin chip and mining machine manufacturers, mining machine OEMs, trading platforms, and even Bitcoin media and application manufacturers have begun to develop mining machine mining businesses.

However, the development of mining machine mining seems to have entered a bottleneck period, and its disadvantages are also constantly emerging. Excessive costs have caused miners' income to plummet. The emergence of cloud mining at this time is undoubtedly It has brought new vitality to the mining market.

Although the concept of cloud mining has been pursued by the market and most miners as soon as it appeared, after all, cloud mining is still a new concept, and more people still view it with suspicion. Moreover, the characteristics of cloud mining also make this concept relatively illusory. What exactly is cloud mining? What about buying computing power directly? Today we will talk about the core concept in cloud computing power mining - computing power.

When introducing the concept of computing power, the first thing we need to know is the components and operating mode of the blockchain.

The blockchain itself is just a data recording format, just like the Excel tables and Word documents we usually use, our data is stored on the computer in a certain format. Different from the traditional recording format, the blockchain divides the generated data into data blocks and records them one by one according to certain time intervals, and then connects them in series according to the sequence of the data blocks, which is the so-called blockchain. .

Blockchain data is logically divided into block headers and block bodies. Each block header is associated with numerous transactions in the block through Merkel roots, and each block is connected through block headers. The hash values ​​(the block header hash value is the ID number of a block) are concatenated.

The hash value mentioned here is a very important concept. Hash algorithms are widely used in blockchain systems: Bitcoin uses hash algorithms to calculate hash values ​​in wallet addresses, block headers, and transaction transactions through public keys. The Merkel tree structure itself is a hash tree. Hash tree, even the mining algorithm uses hash value difficulty matching; the mining calculations in Ethereum also use hash algorithms; other blockchain systems also use various hash algorithms to a greater or lesser extent. Therefore, it can be said that the hash algorithm runs through all aspects of the blockchain system.

What we call mining is actually calculating the hash value of the block header through a hash algorithm.

In the process of obtaining Bitcoin through "mining", we need to find its corresponding solution, that is, the block header hash value. To find the solution, there is no fixed algorithm and we can only rely on Computer random hash collisions.

The number of hash collisions a mining machine can do per second is the representative of its "computing power", and the unit is written as hash/s.

Computing power can be simply understood as computing power. The current mainstream mining machine has a calculation level of about 14T, that is, a mining machine can do at least 1.4*10 13th power hash collision per second. We can say that this 14T mining machine has 14T computing power. The percentage of all mining machines controlled by a miner to the total computing power of the entire Bitcoin network represents the probability that he can win in this 10-minute competition.

For example, if the current computing power of the entire Bitcoin network is 100, and a certain miner has 10 computing power, then the probability of his success in each accounting competition is 1/10.

Therefore, compared with the various uncertainties of purchasing mining machines, directly purchasing computing power is a more secure and stable investment method.

Maya cloud computing power has been launched! Maya cloud computing power uses market-leading mining machines and super computing power such as Maya mining machine D1, Maya No. 1 bit cloud computing power, Maya No. 2 bit cloud computing power, etc., and also uses self-built professional hosting mines. Each order Clearly visible, absolutely transparent and assured user commitments and the best cost performance allow users to enjoy lower investment, more convenient operation and higher returns without any worries!

Maya cloud computing power is on the homepage of the official accountYou can enter the official website with one click through the menu. Interested friends please continue to pay attention to the "Maya Mining Machine" public account, where you will find more relevant information!

Maya Mining Machine’s first free bonus event is in full swing!

Ethereum, EOS and other 100,000 assets are delivered to you!

Just reply "Lottery" in the background to participate

Act quickly!

VI Is mining reliable? Can you still make money by mining Bitcoin? An old miner tells you

When it comes to blockchain, I think blockchain projects are really The only way to achieve great results is within the next 3-5 years. You will either be recognized by the world or eliminated by the world. If you want to make money all the way through those random projects on the market, it may not be realistic. Within 5 years, you will definitely There will be a huge wave of rectification, which will only lead to more and more formalization and uniformity!

There are many many projects on the market. Cut a wave of leeks cut a wave of leeks. However, the people who really make money are really small and less! So why are so many people willing to try and do it? It is indeed because many players make a lot of money! ! ! And those who really make money are often those project parties! I have been in the industry for four years and have been cheated many times and lost all my money! But I also encountered good projects and made my first pot of gold in life! ! This is also the reason why I chose to be a miner first. Anything that can create a legend must also have its merits, and Bitcoin’s merit lies in the blockchain. Not long ago, the People's Daily published a full-page report on blockchain, including research on the concept of blockchain, prediction of blockchain development trends, and being a leader in the digital economy, calling on the national government to conduct research on the region. Blockchain technology is strongly supported. No matter which angle you look at, it is certain that blockchain is constantly receiving official attention and has penetrated into the economic circle with great momentum. When Bitcoin was first designed, a 140-year mining time was defined. There was a long experimental time for basic technology research and development and iteration. The current progress is beyond expectations. If all the mining was completed today, I believe many People would think that its price has skyrocketed a long time ago (many Bitcoins are now mined out and put into the market every day to suppress the currency price). However, it has only been digging for eight years so far! It can also be said that it has just begun! The computing power of the entire network has grown very rapidly. At the beginning of 2017, the computing power of the entire network was only about 2E. By the end of 2017, it had exceeded 20E, which increased by about 10 times in one year. Now when calculating mining income, I use a 2% increase in each cycle (about 13 days). If it grows at this rate, it will increase to 5 times in one year, that is, the computing power of the entire network will increase to 28E in June 2018. However, in less than June, the computing power of the entire network has exceeded this value, which is a very large increase.

Are there really so many people optimistic about mining?

In the Bitcoin operating rules, every time a block is created, a certain number of Bitcoins will be generated. (The act of creating blocks is called mining.) On average, every four years, the number of Bitcoins generated per block will be halved. It is expected that by 2140, all 21 million Bitcoins will be "produced". That is, as time goes by, the cost of generating new Bitcoins will become higher and higher. It will become increasingly difficult to mine a new coin. Mining output is related to only two variables: mining difficulty and mining machine computing power. The output is inversely proportional to the mining difficulty and directly proportional to the mining machine's computing power. As the difficulty continues to rise, the more mining machines there are, the more Bitcoins can be mined every day. If you don't take action, it will be too late!

Of course, many people ask, if mining returns are low, it’s because you don’t understand mining! Dig first and hoard first, then sell when the price of Bitcoin rises. It is definitely a direct currency speculation, the cost is much lower! ! ! Mining belongs to the level 1 market! In other words, mining belongs to the manufacturer. Do you think the goods sold directly by the manufacturer are cheaper? Or is it cheaper in the supermarket? ? Although the price of Bitcoin has not risen very much recently, the income from mining is still very considerable! ! The real opportunity to make money should be in 2020, so all miners, please save your Bitcoins and ride the rocket together next year! !

In the currency circle, playing with digital currencies and making money rely on opportunities. Opportunities are given to you. If you are not sure, you will just sigh~~Why did you dig it in the first place? Mine can be said to have no reason to hesitate! In 2009, Bitcoin was launched, and it cost 2 cents a piece. Now it costs 60,000 yuan. Who would have thought it? I have been studying mining for many years, and it can be said that there is really zero risk!

Of course, the future value increase of Bitcoin is the key, and investment is a probabilistic event. How long can this game last? I can only say that the sooner, the better! ! ! Can Bitcoin rise to the point where one coin per villa? The answer can only be left to tomorrow.

For details, please contact 1827224 8085

Ⅶ Self-study blockchain (6) BTC-mining difficulty

Let’s take a look at the mining calculation formula< br />
H (block header) target, this target is the target threshold

The hash algorithm used by BTC is SHA-256, and the hash value it generates is 256 bits, then There are 2^256 values. This is its output space. To increase the difficulty of mining, adjust the proportion of the target value in this output space.

Mining difficulty and target thresholdThe value is inversely proportional. When the computing power is strong, adjust the difficulty to make the target threshold smaller.

Without adjusting the difficulty, as the number of miners increases and the computing power increases, the time to mine a block will become shorter, from 10 minutes to 1 minute or even a few seconds. This What kind of problems will it bring? Many people may think this is not good. Waiting for six confirmations for a transaction will shorten the time and make the transaction faster. In fact, if the block generation time is shortened to a very short time, the risk is very high. Because of the network delay, the block generation time is shortened, and different nodes are likely to receive different block information, resulting in the emergence of many forked nodes. Miners will continue to mine based on the blocks they think are correct. In this case, it is easier for malicious nodes to launch a fork attack, because the computing power of honest nodes is dispersed.

As a result, it does not require 51% of the computing power to succeed, so shortening the block generation time is not conducive to the stability of the BTC system. Although 10 minutes is not necessarily the optimal time, it is still considered reasonable.

The following is the computing power growth curve

The following is the mining difficulty curve

The following is the average mining time

Let’s take a look at the difficulty formula: the mining difficulty is adjusted every 2016 blocks, and one block is produced every 10 minutes. On average, it is adjusted once every two weeks.

previous_difficulty is the last mining difficulty, and the denominator is the time spent in the last 2016 blocks

Each node mines independently, and the BTC protocol is also open source , will there be miners who do not modify the mining difficulty? The possibility exists, but it does not affect the result, because broadcasting to other nodes requires independent verification of the hash value of the block header. There is a compression code of difficulty in this header. The result of modifying the difficulty will not be recognized by honest nodes. .