比特币挖矿原理:挖矿是如何产生比特币的?小编想了很久怎么样说你们才能明白这个问题,想来想去还是这样说才能让你们秒懂比特币挖矿:
Bitcoin mining principles: How did mining produce bitcoin? How did the editor think about it for a long time before you could understand the problem, if you wanted to go, or if you wanted to say so, before you could learn about bitcoin mining?
1.我手上现在有一张面值100元的人名币。(比特币)
1. I now have in my hand a human coin worth $100. (Bitcoin)
2.谁关注公众号我就给谁。
I'll give it to whoever pays attention to the public.
3.但是需要在评论里面猜出这张钱的编号才行。(挖矿,随机填充数值求解)
However, the number of the money has to be extrapolated in the review.
自己想尽办法猜,猜中得100元全款——个人挖矿
You know, you figure it all out, and you get 100 bucks in full -- personal mining.
出钱召集一些人来一起猜——矿场,召集认识不认识的人一起来猜,通过猜测的次数,按比例分配这100元——矿池
The money is to gather some people to guess -- the mines, the people you don't know, the number of times you've guessed, the amount of $100 is proportionally allocated to the pond.
以上是一个简单的类比例子,当然,你们关注并猜出了我兜里100块钱的编号,我保证给你。那么,比特币挖矿到底是怎么回事呢?
It's a simple scale. Of course, you've noticed and figured out the 100-dollar number in my pocket. I promise you. So, what's going on with the bitcoin mining?
回顾张三李四转账过程 找出问题
Looking back at Zhang San Li's transfer process, find out what's wrong.
在之前,我们用在一个偏僻的小村张三和李四转账的例子简单解释了什么是比特币。
Before that, we simply explained what was bitcoin in the example of a transfer between Zhang San and Li in a remote village.
我们来简单回顾一下:当张三想要通过A账号转账1000元给李四的B账号时:
Let us briefly recall that when Zhang San wanted to transfer $1,000 to Lee's account B through account number A:
① 张三大吼一声:大家注意啦,我用A账号给李四的B账号转1000块钱。
One of the three loudspeakers: pay attention, I'll transfer a thousand dollars from account A to account B for Lee.
② 张三附近的村民听了确实是张三的声音,并且检查张三的A账号是否有足够余额。
Villagers in the vicinity of Zhang San heard indeed Zhang San's voice and checked whether Zhang San's account number A had a sufficient balance.
③ 检查通过后,村民往自己的账本上写:A账号向B账号转账1000元,并修改余额:A账号余额=3000-1000=2000元,B账号余额=2000+1000=3000元。
After the inspection, the villagers wrote to their books: A account transferred $1,000 to B account and modified the balance: A account balance = 3,000-1,000 = 2000 and B account balance = 2000 + 1000 = 3,000.
④ 张三附近的村民把转账告诉较远村民,一传十十传百,直到所有人都知道这笔转账,以此保证所有人账本的一致性。
Villagers in the vicinity of Zhang San told the faraway villagers about the transfer, and one hundred times and a hundred times, until all were aware of the transfer, thereby ensuring consistency in the books of all accounts.
聪明如你一定发现了,在步骤② 如果张三吼了一声,附近村民假装没听到,都不去核实记账,那么这个系统不就停止工作了吗?
As smart as you must have noticed, in step 2, if one of the three screams and the nearby villagers pretended not to hear it and didn't check the bookkeeping, the system would stop working.
为解决这个问题,村里商讨后决定,谁第一个确认是张三的声音的会获得500元。于是大家都竖起耳朵,时刻监听村里的每一个动静,真可谓草木皆兵。
In order to solve this problem, the village decided who first confirmed the sound of Zhang San will receive $500. So everyone will listen to every single movement in the village.
评论区有人问,这500元是哪儿来的?我这里也简答讲一下。
Some people in the review area ask, "Where's the $500 coming from? I'll be brief here.
1.比特币平均差不多每10分钟产生一个区块,这个区块能打包的交易数量是有限的,我们就算800笔吧。但是呢,旷工不会平白无故给你打包交易到并广播,所以需要收取手续费。而且,由于交易的人很多,先打包谁的交易也取决于手续费的高低。所以你可以看到,现在比特币火热了,手续费水涨船高。
1. Bitcoin produces, on average, a block every 10 minutes, and the number of transactions that can be packed is limited, so we'll say 800. However, truancy does not mean that you can pack and broadcast a transaction, so you have to charge a fee. And, because of the number of people who do it, the transaction depends on the fees. So, as you can see, now it's hot and the fees are higher.
2.我们都知道比特币总量2100万个,发币机制是逐年递减。当旷工第一个成功打包这个区块并广播,并且是最长的链的话,那么他还会获得奖励,目前只有12.5个比特币。最开始是50个,已经衰减2次了。这里当然还有小问题,比如为什么要最长链,怎么确定是最长链,哪些链会被抛弃?如果大家有兴趣再深入说说。
2. We all know that bitcoins total 21 million, and the money distribution mechanism is decreasing from year to year. When truancy is the first to pack the block and broadcast it, and is the longest chain, he gets a reward, currently only 12.5 bitcoins. The beginning is 50, already two times. There is, of course, a minor question here, such as why the longest chain, how to determine which chains will be abandoned?
以上就是旷工的奖励。2017/12/8更新。
This is the incentive for absenteeism. 2017/12/8 update.
在比特币的世界里,大约平均每10分钟会产生一个区块。所有的挖矿计算机都在尝试打包这个区块并提交,而第一个成功生成这个数据块的人,就可以得到一笔比特币报酬。最初,大约每10分钟就可以产生50个比特币的比特币报酬。但是该报酬每4年减半,现在每10分钟比特币网络就可以产生25个比特币。
In the world of Bitcoin, a block is generated on average every 10 minutes. All mining computers are trying to pack the block and submit it, and the first person who succeeds in generating it will get a bitcoin reward. Initially, about 50 bitcoins per 10 minute. But that remuneration is halved every four years, and now 25 bitcoins per 10 minute of Bitcoin network.
好了,接着上面的故事讲,张三这一吼,惊动了全村的人,大家都纷纷表示自己是第一个听到张三声音的人。这500块钱该给谁呢?于是村里又商讨出新的规定,需要有证据证明这是张三的声音。张三在喊的这一声里带有特定的声波数据,谁先破解出来就给谁。
All right, let's go back to the story of Zhang San, who shouted at the entire village, and everyone said that they were the first to hear him. And who was the first to give him the $500? So the new rules were negotiated in the village, and proof was needed that it was a third. Zhang San's voice had a specific sound wave data, so whoever broke it first gave it to anyone.
在比特币世界里,这是就是一个新的概念,共识机制。比特币是通过工作量证明的共识机制来决定记账权的,通俗来讲,谁证明了自己的工作量最大,谁就负责记账。
In the world of Bitcoin, this is a new concept, a consensus mechanism. Bitcoin determines the right to account by means of a consensus mechanism that proves the volume of work.
工作量大小是通过计算符合某一个标准的比特币区块头的哈希散列值来体现的。区块头通常包含前一个区块的哈希散列值、Merkle根、时间戳、难度目标、以及一个填充的随机值。试图争夺记账权的节点称为挖矿节点,挖矿过程就是求出一个能够填充本区块头的随机值,让区块头的哈希散列值符合某一个标准。
The size of the workload is represented by the calculation of Hashi hash values for a bitcoin block that meets a certain criterion. The block header usually contains Hashi hash values for the previous block, Merkle root, time stampes, difficulty targets, and a filled random value.
咱们接着故事讲,海归村民王二麻子凭借高超的计算能力,成功第一个匹配了张三的声波数据,然后他笑嘻嘻地向全村人广播自己破解成功。村民验证后,王二麻子如愿拿到了500元奖励金,李四也成功收到了张三的转账。
Let's go on to tell the story that the first one to match Zhang San's sonic data with his superior ability to calculate, and then he laughs and announces to the whole village that he has been able to crack it. After the villagers proved that Wang received the 500 dollar reward, Li received the transfer.
网络上的每一个矿机接收并验证了一批交易,然后就开始进行挖矿,矿机需要反复的试验随机填充值来进行求解,一般采用产生随机数,尝试把产生的随机数填充到区块头,然后计算哈希。如果计算成功,则挖矿成功,向全网广播挖矿所得,全网节点验证后,把这个区块连接到区块的最上端,并且在全网达成一致。
Each miner on the network receives and verifies a batch of transactions and then starts digging, which requires repeated test random fillings to solve problems, usually using random numbers to try to fill the random numbers generated to the block, and then compute Hashi. If the calculation is successful, the dig is successful, the mine is broadcast to the whole network, and the whole node is validated, and the block is connected to the top of the block and agreed on the whole web.
故事还在继续,王二麻子拿到这500元后就想:一个人的计算能力有限,我下次也非常可能不是第一个计算出来。若我改进算法,制造专门匹配这种声波数据的机器,然后卖机器岂不是能大赚一笔?于是就哼哧哼哧的专研去了,并在不久后面世。(专业矿机)
And the story goes on, when Wang has 500 bucks, he thinks, "A person's ability to calculate is limited, and I'm probably not the first to do it next time." If I improve the algorithms, make machines that match this sound data, and then sell them for a lot of money?
村民蜡笔小明买了一台专业机器,觉得不错。于是大量采购,并找到一个电费低廉的场地,也请了专人人员来维护。于是,蜡笔小明便每天便看着一笔笔的500元进账。(矿场)
Villager Xiaoming bought a professional machine, and thought it was good. So he bought a lot of it and found a low-cost space, and he hired people to maintain it. So he looked at a pen of $500 every day.
村民张小凡也采购了一些机器,可是机器不多,能破解并拿到这500奖励的几率并不大。于是他创建了一个平台,所有有计算能力的人都可以参与进来。若得到奖励,则按每个人的计算力高低分配奖金。(矿池)
Villager Zhang Xiaofan also purchased some machines, but there were few machines that could crack and get the 500 prizes. So he created a platform where all those who had the ability to calculate could be involved. If they were rewarded, they would be distributed according to each person’s computing power.
好了,村民的故事差不多就到这里结束了,现在回过头来看文章开始的例子是不是特别形象?你们可以猜猜谁可能挖矿的最大算力
Well, the villagers' story is almost over here. Now look back and see if there's a special image of the beginning of the article. You can guess who's best at mining.
风险与受益
Risks and benefits
其实,最初的时候,我们用电脑CPU就可以挖到比特币,比特币的创始人中本聪就是用他的电脑CPU挖出了世界上第一个创世区块。当然,现在也可以用家用电脑的CPU、GPU挖矿,只是收益非常低了。
In fact, in the first place, we could dig up Bitcoin with a computer CPU, and Benz, the founder of Bitcoin, used his computer CPU to dig out the world’s first creation block. Of course, CPU, GPU, too, can dig mines with a home computer now, with very low returns.
CPU挖矿的时代早已过去,GPU挖矿也早已不是主流,现在的比特币挖矿是ASIC挖矿和大规模集群挖矿的时代。
The era of CPU mining is long past, GPU mining is no longer the mainstream, and the time of ASIC mining and large-scale cluster mining is now the time of Bitcoin mining.
回顾挖矿历史,比特币挖矿总共经历了以下五个时代:CPU挖矿→GPU挖矿→FPGA挖矿→ASIC挖矿→大规模集群挖矿
Looking back at the history of mining, Bitcoin has gone through five times in total: CPU digs — GPU digs — FPGA digs — ASIC digs — large-scale cluster mining
挖矿芯片更新换代的同时,带来的挖矿速度的变化是:CPU(20MHash/s)→GPU(400MHash/s)→FPGA(25GHash/s)→ASIC(3.5THash/s)→大规模集群挖矿(3.5THash/s*X)
The changes in the rate of mining associated with the updating of the mining chip are as follows: CPU(20MHash/s)GPU(400MHash/s)FPGA(25GHash/s)ASIC(3.5THash/s) large-scale cluster mining (3.5THash/s*X)
算力就是计算机每秒产生哈希碰撞的能力,算力越高,挖到比特币的概率越大,挖得比特币也就越多,回报越高。
Arithmetic is the ability of a computer to create a Hashi collision every second. The higher the calculus, the greater the probability of digging into bitcoin, the greater the number of bitcoins and the higher the return.
然而挖矿的受益并不是稳定且有保障的,电费将成为持续挖矿最大的成本之一,所以,有廉价电力的地方便成了旷工的最爱。
However, the benefits of mining are not stable and secure, and the cost of electricity will be one of the greatest costs of continued mining, so that places with low-cost electricity will be the preferred place for absenteeism.
挖矿的风险不仅于此,16年7月开始,比特币网络发行比特币数量就减半了,即每10分钟,每个区块只包含12.5个比特币,意味着相同算力挖出的比特币也会相应减少。但另一方面,币价也有上升可能。同时还伴随着断电、机器维护折旧等风险。最后,给大加介绍一种0风险赚钱的方法:猜出我兜里100元人民币的编号。
In July of 16 years, the number of bitcoins distributed by the Bitcoin network was halved, i.e. every 10 minutes, each block contains only 12.5 bitcoins, meaning that the amount of bitcoins extracted by the same measure will be reduced accordingly. On the other hand, the price of the currency may increase.
简单回答评论中的一些疑问,估计也是很多人的疑问:
A simple answer to some of the questions in the commentary is probably also a question for many:
1.目前比特币全部账本信息能很好的保存在一台普通的电脑上,这也是Core他们坚持不扩容的原因之一。另外根据摩尔定律,就算小扩容其实影响不大。
1. At present, the entire account information of Bitcoin is well stored on a normal computer, which is one of the reasons Core insisted on not expanding. And according to Moore's law, even a small expansion does not have much effect.
2.仅仅降低交易费那么旷工没有动力,交易将更拥堵。当然这里有目前比较认可的取代方案POS。上面说的是挖矿是工作量证明即POW(Proof of Work),而POS的全称Proof of Stake,即股权证明。简单来说,就是一个根据你持有货币的量和时间,给你发利息的一个制度,有利于刺激全部用户参与,更去中心化。
2. There is no incentive to just lower transaction costs, and transactions will become more crowded. There is, of course, a more acceptable alternative to POS. It says mining is a proof of workload, the Proof of Work, and POS, the Proof of Stock, the proof of equity. Simply put, it is a system that gives you interest based on the amount and time of money you hold, which facilitates the participation of all users and is more centralized.
3.比特币等加密货币是匿名的,虽然你能看到纪录,但是你不知道是谁,同样你可以有多个匿名账户,中心化的你确定你能保密部分信息?
3. An encrypted currency such as Bitcoin is anonymous. You can see records, but you don't know who. You can have multiple anonymous accounts.
4.不知道你这数据哪里来的,确实现在交易量少,原因很多,有支付场景弱,币价太高,大多数人持币待涨等多种因素。突然想到另一个因素,目前大量的币集中在交易所,很多交易所实际上是虚拟交易,当你要提币的时候才是真实交易,这样也大幅降低了真实交易量。
4. I don’t know where your data come from, but it is true that there are fewer transactions now, for a number of reasons, such as a weak payment scene, too high currency prices, and the fact that most of them are on the rise. Another factor that suddenly comes to mind is that a large number of currencies are currently concentrated on exchanges, many of which are actually virtual transactions, which are real when you want to raise the money, which significantly reduces the volume of real transactions.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论