比特币挖矿原理

资讯 2024-07-01 阅读:25 评论:0
提起比特币和区块链,很多人都觉得如数家珍,实则知其然不知所以然。比特币是区块链的前身实现,区块链是比特币的后期提炼;如果初次接触比特币,当你想和别人交流的时候,面对的第一个概念可能就是挖矿。那么,挖矿的原理是什么?怎样利用挖矿产生比特币呢?...
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

提起比特币和区块链,很多人都觉得如数家珍,实则知其然不知所以然。比特币是区块链的前身实现,区块链是比特币的后期提炼;如果初次接触比特币,当你想和别人交流的时候,面对的第一个概念可能就是挖矿。那么,挖矿的原理是什么?怎样利用挖矿产生比特币呢?

When you bring up the bitcoin and the block chain, many people feel like there's a number of them, but they don't know why. Bitcoin is the front of the block chain, and the block chain is the later refining of bitcoin; if you first touch bitcoin, the first concept that you might face when you want to talk to someone else is mining. So, what's the rationale for mining? How does a bitcoin come from digging?

通俗易懂:比特币挖矿原理

首先,我们来思考一下为什么每个区块链系统都要发行自己的数字货币?也就是前段时间的ICO热。这里面就涉及到区块链的根本作用,这个作用就是:实现社会价值在区块链上的自由流通(类比互联网的根本作用:实现信息的自由流通)。

First of all, let's think about why each block chain system issues its own digital currency? That is, the ICO heat of the previous period. This is about the fundamental role of the block chain, which is to achieve the free flow of social values in the block chain (like the fundamental role of the Internet: the free flow of information).

通俗易懂:比特币挖矿原理

比如我可以针对汽车开发一个汽车链,针对房子开发一个房子链,针对母猪开发一个母猪链等等。如果一个组织或个人的能量足够大,也可以发布一个面向全行业的链,那汽车、房子、母猪……想在各自的链上自由流转,从A的名下流转到B的名下,或者从C的名下流转到D的名下,一定需要个度量的尺度。这个尺度就是靠支出相应的数字货币来完成的。换句话说,每条链发布的数字货币,充当的是该链上价值流通的一般等价物。做个现实的类比:也就是我们生活中用于交易的人民币、美元、泰铢、英镑等中央货币,在我们购物时充当的作用。每条链可以类比成一个国家,每个国家是不是都有自己的货币系统?这样一想,大概就清楚每条链发行数字货币的目的就是促使链上的资产顺利流通了。就数字货币而言,对于想做事的人,它充当的是价值流通的一般等价物;对于敛财的人,就是个圈钱的工具。

For example, I can develop a chain of cars for cars, a chain of houses for houses, a chain of hogs for pigs, etc. If the energy of an organization or individual is large enough, I can also publish a chain for the whole industry, the cars, houses, hogs... want to move freely along their chains, move from A to B, or move from C to D. Each chain can look like a country, and each country has its own monetary system.

通俗易懂:比特币挖矿原理

在区块链上,数字货币的发布模式是怎样的呢?

What are the modes of distribution of digital money on the block chain?

区块链发布链上的数字货币有两种主要形式。一种是,以国内的NEO为例,NEO的发行模式是:在系统创建的时候,一次性的在创世块里,写入1亿个NEO。借助ICO,用户可以直接用人民币认购持有。这种模式比较类似于央行发行人民币。

There are two main forms of digital money on the block chain distribution chain. One is that, in the case of national NEOs, the mode of distribution of NEOs is that, at the time the system was created, 100 million NEOs were written into the creation block. With ICO, users can subscribe to them directly in renminbi.

另一种就是类似于淘金,就是比特币这样的,通过挖矿节点,不断消耗自身的算力,来换取比特币。由于比特币系统是完全开源的,在这套开源的代码里,包含了挖矿的功能,只要一个人懂代码,就可以把这套代码进行编译部署,加入到比特币网络里面去,把挖矿功能开启,那你的宿主机开始挖矿了。

The other is gold-mining, like bitcoin, which, by digging nodes, constantly consumes its own arithmetic in exchange for bitcoin. Because the bitcoin system is fully open, in this open source code, it contains mining functions, so long as one person understands the code, it can be compiled and deployed, added to the Bitcoin network, turned on the mining function, and your host machine started digging the mine.

通俗易懂:比特币挖矿原理

在比特币系统,通过自身的算法可以动态调整全网节点的挖矿难度,保证每过大约10分钟,比特币网络中,就会有一个节点挖矿成功;一旦有人挖矿成功,比特币系统就会奖励此人一定数量的比特币,这个数量也是通过算法控制的。具体说来:最开始的四年,每个挖矿成功的人会得到25个比特币的奖励,每过四年衰减一半;也就是下一个四年挖矿成功奖励12.5个,再下一个四年奖励6.25个,以此类推。大约到2140年的时候,区块链发行完毕,大约2100万个比特币,这就是比特币的总量,所以不会无限增加下去。

In the Bitcoin system, the difficulty of digging the entire net node can be dynamically adjusted through its own algorithms, ensuring that for every 10 minutes, a node in the Bitcoin network succeeds; once a person succeeds in digging, the Bitcoin system rewards a certain amount of bitcoins, which is also controlled by algorithms. Specifically, in the first four years, each successful miner will receive 25 bitcoins, which will be halved in every four years; that is, 12.5 in the next four years and 6.25 in the next four years. By the year of 2140, the block chain will be released, amounting to approximately 21 million bitcoins, which is the sum of bitcoins, so that it will not increase indefinitely.

通俗易懂:比特币挖矿原理

通过上面的阐述,大家应该明白挖矿和比特币的关系了。这个关系就是:挖矿,是比特币系统发行自身数字货币,也就是比特币的必经之路。比特币系统,借助挖矿完成自身数字货币的发行。发行数字货币的过程,就是各个矿工竞争挖矿的过程。在每一个10分钟内,看谁先挖到矿,就奖励一定数量的比特币,这个奖励的过程就是比特币发行的过程;每个挖矿节点,受利益的驱使,也是不断的想办法能更快地挖矿,这也就催生了市面上的各种各样的矿池节点。

By way of illustration, one should understand the relationship between mining and bitcoin. The relationship is that mining is the way the bitcoin system issues its own digital currency, that is to say, the bitcoin. The bitcoin system, with the help of mining, produces its own digital currency. The process of issuing the digital money is that of competing miners. Within 10 minutes, every person who digs the mine first, rewards a certain amount of bitcoin. The process of issuing the bitcoin is that of the bitcoin; each dig is driven by the benefits and is constantly trying to do it faster, which leads to the creation of a variety of ponds on the market.

通俗易懂:比特币挖矿原理

挖矿是比特币系统中一个形象化的表述。它背后真正的名称是POW算法,也就是工作量证明算法。工作量证明,是从经济学中来的。1993年,由两个经济学家提出来的一种策略,就是防止对服务滥用或者资源滥用,而采取的一种有效阻断的经济策略。

Mining is a visualized expression of the Bitcoin system. The real name behind it is the Pow algorithm, the workload proof algorithm.

POW算法在比特币之前就已经被广泛使用了,其中比较有名的就是Google邮箱的反垃圾邮件系统。Google是这样做的:他要求每一个给google邮件服务器发电邮的对方服务器,必须先完成一定量的计算工作,这个计算可能会耗时对方服务线程2到3秒。2到3秒的时间,如果是一个人在发邮件,是完全可以忍受的;如果对方是个发送垃圾邮件的脚本程序,他是根本无法忍受的,邮件脚本要做的是每秒成千上百封的往外发。

The Pow algorithm has been widely used before Bitcoin, and is well known as the anti-spam mail system in Google's mailbox. Google does this: he requires each other's server that e-mails to Google's mail server to complete a certain amount of computing, which may take two to three seconds for each other's service line. Two to three seconds, if a person is e-mailing, it is totally unbearable; if the other party is a script that sends spam, it is simply unbearable, and the scripts are going to be sent hundreds of times a second.

通俗易懂:比特币挖矿原理

那POW算法在比特币系统是怎样应用的?中本聪在设计实现比特币系统的时候,希望每10分钟完成一次比特币发行,由于比特币网络中有成千上万个节点,那该把币发行给谁呢?按照工作量证明的策略,也就是POW算法的思路,中本聪在比特币系统中,给每一个节点出了一个难题。每个区块头的数据结构里面都有个Nonce字段,中本聪的解决的难题就是:在其他字段值不变的前提下,通过不断调节Nonce的值,来对BlockHeader这个结构体值算Hash,要求找到一个Nonce值,使得算出来的hash值小于或大于某个固定值,这个固定值,在BlockHeader结构体中,由Bits来标示。

How does the Pow algorithm work in the bitcoin system? Ben-Bone wants to do the bitcoin distribution every 10 minutes when designing the bitcoin system, and since there are tens of thousands of nodes in the Bitcoin network, who should he issue it to? According to the strategy of workload proof, which is the Pow algorithm, Ben-Bone presents a problem for each node in the Bitco-System. There is a Nonce field in the data structure of each block, and the middle-Bone-Bone solution is the problem is that the BlockHader structure is measured by constant adjustment of the Nonce value, which requires a Nonce value, which is less than or greater than a fixed value, which is specified by Bits in the BlockHader structure.

通俗易懂:比特币挖矿原理

由于hash算法是一个不可以逆的算法,没法通过具体的hash值,倒推出原文。这样每个节点只能采用穷举的方法,也就是从1开始,2 3 4 5…不断的往后试。在这个过程就开始考验各个节点的CPU计算速度了,算的快的,很快就能得到Nonce值,然后他就把这个Nonce值放在结构体里,通过P2P网络广播出去。每个系统节点收到后,发现这个Nonce值是合法的,能满足要求,就认为挖矿成功。对于那些算到半截的节点,发现有人已经算出来了,就放弃本次穷举了,然后开始通过穷举的办法,去寻找下一个区块头的Nonce值。

Since the hash algorithm is a non-reversible algorithm, it is not possible to roll out the original text through a specific hash value. So that each node can only use an exhaustive method, beginning with one, two, three, four, five... a continuous back-to-back test. This process begins to test the CPU of each node to calculate speed, calculate quickly, get the Nonce value, then he puts the Nonce value in the structure, broadcast it through the P2P network. When each node is received, the Nonce value is legal and meets the requirements, and the mine is considered successful. For those nodes that are half-clanted, one finds out that the CPU has already counted, and then abandons the nonce value of the next block, and then starts to search for the Nonce value of the next block through a desperate method.

通俗易懂:比特币挖矿原理

因此说,所谓挖矿,就是计算机通过穷举的办法,不断去找Nonce值、算Hash值的过程。谁先找到,谁就挖成功了。

So what's called mining is the computer's endless search for the Nonce value and the Hash value. Whoever finds it first, the dig succeeds.


美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
热门文章
  • DDO在新加坡上市真假,欧意交易所能交易数字期权吗?

    DDO在新加坡上市真假,欧意交易所能交易数字期权吗?
    然而,对于DDO在新加坡的列名是否真实存在争议。 据报道,有人质疑DDO的数字选项是否真的上市,其背景是否经过了彻底调查。 首先,有报告说,DDO数字选项清单仅仅是一种宣传手段,没有找到DDO交易的平台,这就对DDO的真正清单提出了疑问。 其次,一些媒体调查了DDO数字选项的背景。 报告显示DDO数字选项发行人声称其数字选项是国家赞助的,但实际上,根据中国人民银行,虚拟货币相关业务是非法金融活动。 此外,DDO数字选项在视频号码等平台上广为传播,吸引了许多信徒的注意,然...
  • Griffin Gaming Partners计划为其第三支基金筹集5亿美元

    Griffin Gaming Partners计划为其第三支基金筹集5亿美元
    Pitchbook引用的6月8日《快链头条新闻》作为监管文件, 指出游戏风险投资公司Griffin赌博伙伴计划为其第三个旗舰基金筹集5亿美元, 比第二个基金少33%。 2021年,格里芬赌博伙伴从Web3游戏开发者Forte获得A回合资金1.85亿美元,并于2022年筹集了第二个旗舰基金,金额达7.5亿美元,此时风险资本家对Web3和加密游戏的热情达到顶峰。...
  • 比过山车还狠!比特币价格再次暴跌

    比过山车还狠!比特币价格再次暴跌
      上周日,比特币的价格创造了3000美元的历史新高,随后就开始各种高台跳水了。Last Sunday, the price of Bitcoin created a record high of $3,000, and then began to dive on all the high platforms.   据外媒报道,本周一,比特币价格一度下跌到2526.4美元,最高跌幅高达14.5%,这创造了2015年1月以来最大跌幅。According to external...
  • 加密货币之王重回王位:比特币飙升至 71,000 美元,还能再涨多少?

    加密货币之王重回王位:比特币飙升至 71,000 美元,还能再涨多少?
    比特币是市场上最大的加密货币,它再次打破了重要的7万美元门槛。 在短短的四舍五入(67,000美元到69,000美元之间)之后,价格在这一水平上遇到了强烈的抵制。 然而,势头的不断增强表明,比特币可能形成一个超过70 000美元的板块,为重新测试下一个抵抗阵地71 300美元和3月份可能攀升到历史最高点73 700美元铺平了道路。 问题仍然是:比特币能否维持预期的上升趋势并继续大幅上升?    分析家预计比特币价格将上升到74,400美元。 加密货币分析师Ali M...
  • 几张图看懂区块链技术到底是什么?https://www.cnblogs.com/behindman/p/8873191.html

    几张图看懂区块链技术到底是什么?https://www.cnblogs.com/behindman/p/8873191.html
    “区块链”的概念可以说是异常火爆,好像互联网金融峰会上没人谈一谈区块链技术就out了,BAT以及各大银行还有什么金融机构都在开始自己的区块链研究工作,就连IBM最近也成立了自己的区块链研究实验室,但其实区块链到底是什么?大家或许并不清楚,停留在雾里看花的状态。从今天开始,就让我们一起走进区块链,揭开区块链的神秘面纱吧!The concept of a block chain can be described as an unusually hot one, as if no...
标签列表