当您听说比特币“挖矿”时,您会想到将硬币从地下面挖出来。但是比特币不是物理的实体,你看不见,摸不着,那么为什么我们称其为挖矿呢?
When you hear bitcoin digs, you think you're gonna dig it out of the ground. But bitcoin isn't a physical entity, you can't see, you can't touch, so why do we call it mining?
因为它类似于金银开采,比特币存在于协议的设计中(就像黄金存在于地下一样),但是它们尚未被发现(就像尚未挖出的黄金一样)。 比特币协议规定每大约10分钟产生一个比特币区块,每个区块包含一定数量的比特币,(最早开始是每个区块50个,经过2次减半之后,当前时间2020-03-07,每个区块12.5个比特币,下一次减半后,2020-05月左右,将变为每个区块6.25个比特币)。比特币矿工所做的挖矿工作就是找到那些区块,从而获得区块里面包含的比特币。
Because it is similar to gold and silver mining, bitcoin exists in the design of the agreement (like is underground), but they have not yet been discovered (as is the case with gold that has not yet been excavated). The Bitcoin agreement provides for the generation of bitcoin blocks every 10 minutes, each containing a certain amount of bitcoins (the first 50 blocks, after two halves, now 2020-03-07 bits, 12.5 bitcoins per block, and the next half, around 2020-05, will be 6.25 bitcoons per block). Bitcoin miners are engaged in mining to find those blocks and thus obtain bitcoins.
比特币协议这样设计是为了奖励创建经过验证的交易区块并将其包括在区块链中的矿工。
The Bitcoin agreement is thus designed to reward miners who create certified trading blocks and include them in the block chain.
节点
让我们先谈谈“比特币节点”。节点是运行比特币软件的计算机,并通过参与信息中继来帮助保持比特币运行,任何人都可以运行一个节点,您只需下载比特币软件(免费)并打开某个端口即可(缺点是它消耗电能和存储空间-撰写本文时网络占用约200GB左右)。节点在网络上传播比特币交易,一个节点会将信息发送到它知道的几个节点,后者将信息中继到他们知道的节点,等等。这样一来,交易最终很快就会遍及整个网络。
Let us start with the bitcoin node. The node is a computer running the bitcoin software and helping to keep the bitcoin running by participating in the information relay. Anyone can run a node. You can simply download the bitcoin software (free of charge) and open a port (the disadvantage is that it consumes electrical energy and storage space - the network occupied around 200GB at the time of writing). The node distributes bitcoin transactions on the network, a node sends the information to a few nodes that it knows, which relays the information to the node that they know, etc.
一些节点是挖矿节点(通常称为“矿工”),这些矿工将未完成的交易分组为块,并将其添加到区块链中。他们如何做到这一点呢?通过解决一个个复杂的数学难题,这是比特币计划的一部分,并将答案包含在区块中,需要解决的难题是找到一个数字,将其与块中的数据组合并通过哈希函数哈希计算时,产生的结果要在一定范围内。这比听起来要难得多。
Some of the nodes are excavated nodes (often referred to as “miners”), where miners group unfinished transactions into blocks and add them to the block chain. How do they do this? By resolving a complex mathematical dilemma, which is part of the Bitcoin plan, and by including the answer in the block, the challenge is to find a number that combines it with the data in the block and calculates it through the Hashi function. This is much more difficult than it sounds.
(一个细节,此数字称为“nonce”,是“number used once”的缩写词。对于比特币网络,随机数是0到4,294,967,296之间的整数。)
(One detail, this number is called “nonce”, which is the acronym “number used once”. For the Bitcoin network, the random number is between 0 and 4,294,967,296.
解决谜题
solves the puzzle
他们如何找到这个数字呢? 通过随机猜测,对,一个一个试,哈希函数无法预测输出结果,因此,矿工们猜出了神秘的数字,并将哈希函数应用于该猜中的数字与区块中数据的组合。产生的哈希值必须以预定个数的零开始,无法知道哪个数字会有效,因为两个连续的整数会产生千差万别的结果,此外,也可能会有多个随机数产生同样预期的结果,或者可能一个也没有找到(在这种情况下,矿工会继续尝试,但使用不同的区块数据配置)。
By random guessing, yes, one trial, the Hashi function cannot predict the output, so the miners have guessed the mysterious numbers and applied the Hashi function to the combination of the numbers in the guess and the data in the block. The resulting Hashi value must start at zero. It is not possible to know which number will work because the two consecutive integer numbers will produce thousands of different results. In addition, there may be multiple random numbers that produce the same expected results, or none (in this case, the mining union continues to try but uses different block data configurations).
第一个在结果范围内获得哈希值的矿工宣布其对网络其余节点的胜利,其他所有矿工立即停止在当前区块上的工作,并开始尝试找出下一个区块的神秘号码。作为对其工作的奖励,胜利的矿工获得了一些新的比特币。
The first miner who obtained Hashi value within the scope of the results declared his victory over the rest of the network, and all other miners immediately stopped working on the current block and began trying to find the mysterious number of the next block. As a reward for his work, the winning miner received some new bitcoin.
经济
在撰写本文时,每个区块奖励为12.5比特币,其价值将近11.38万美元,即将在20年5月要进行减半,减半后每个区块为6.25个比特币。
At the time of writing, each block had an incentive of 12.5 bitcoins, valued at nearly $11.38 million, to be halved by May 20 to 6.25 bitcoins per block.
尽管这听起来并不轻松,有很多挖矿节点在争夺该奖励,这是运气和计算能力的问题(您可以执行的猜测计算次数越多,能力就越强,当然还和运气有关)。
Although this does not sound easy, there are many mining nodes competing for the reward, which is a matter of luck and ability to calculate (the more numbers of guess calculations you can carry out, the more capable, of course, are linked to luck).
此外,成为挖矿节点的成本相当大,这不仅是因为需要强大的硬件(如果您的处理器比竞争对手的处理器更快,那么您有更大的机会先找到正确的nounce),还因为运行这些处理器所消耗的大量电能。矿机的运行成本是非常耗电的。
In addition, the cost of being a mining node is considerable, not only because of the need for powerful hardware (if your processor is faster than your competitor's processor, then you have a greater chance of finding the right nounce) but also because of the amount of electricity that these processors consume.
并且,为解决难题而奖励的比特币数量将减少,现在是12.5,但每四年左右减半(下一次在20年5月)。比特币相对于电力和硬件成本的价值可能会在未来几年内上升,以部分弥补这一下降,但这并不100%确定。
Moreover, the number of bitcoins to be rewarded for solving the problem will decrease, now 12.5, but it will be reduced by about half every four years (the next time in May 20). The value of bitcoins relative to the cost of electricity and hardware may rise over the next few years to partially compensate for this decline, but this is not 100 per cent certain.
挖矿难度
The difficulty of mining
经常调整计算难度(哈希字符串开头所需的零个数),因为要保证平均需要大约10分钟来处理完成一个区块。
The difficulty of calculating (zero numbers required for the start of the Hashi string) is regularly adjusted, as it takes an average of about 10 minutes to process the completion of a block.
如果全网矿机多了,算力大了,则计算难度也会相应变大。
If the whole net is more powerful and efficient, the task of calculating it will become more difficult accordingly.
为什么要十分钟? 那就是比特币开发人员认为对于稳定和减少新代币流通量来说必要的时间量,中本聪觉得这个时间比较合理。所以比特币转账速度慢是中本聪大神早早预料到的,故意这样设计的,必然有其相应的原因。
That's the amount of time that Bitcoin developers think is necessary to stabilize and reduce the circulation of the new currency, and it's a reasonable time for China to think. So the slowness of the Bitcoin transfer was anticipated by the Greatness of China earlier, and there must be a reason why it was deliberately designed.
我们首次拥有一种以去中心化,无信任和防篡改的方式实现便捷的数字转账的系统,带来的成就可能是巨大的。
For the first time, we have a system that achieves easy digital transfers in a decentralized, untrustworthy and anti-frozen manner, and the gains that can be made are likely to be enormous.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论