比特币挖矿原理

资讯 2024-07-01 阅读:112 评论: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

  官网
热门文章
  • usdt钱包开发,比特币协议 Omni 层协议 USDT

    usdt钱包开发,比特币协议 Omni 层协议 USDT
    usdt钱包开发Usdt Wallet Development 比特币协议 -> Omni 层协议 -> USDTBitcoin -> Omni Layer -> USDT USDT是基于比特币omni协议的一种代币: https://omniexplorer.info/asset/31 ID是31USDT is a token based on the Bitcomni agreement:   ˂a href="ht...
  • ?基于区块链的数字货币,下一代货币等价物

    ?基于区块链的数字货币,下一代货币等价物
    文 | 诗与星空Psalms and stars. 10月25日晚间,一则关于区块链的消息引爆了市场,虽然A股已经关门歇业,但是大洋彼岸的美股却喧嚣起来,号称使用了区块链技术的迅雷股价暴涨107%。On the evening of 25 October, a news about the block chain detonated the market. Although the A share was closed, the United States shares...
  • LikeCoin 2022 年度回顧

    LikeCoin 2022 年度回顧
    2022 即將過去,今年是風高浪急的一年,LikeCoin 社群繼續於驚濤中為實踐分散式出版而前進,感謝各位的同行。讓我們趁機回顧一下今年發生過的大小事。 2022 Towards the end of the year, this year is a year of great turmoil, and the community of ˂a href=https://like.co/"target="_blank" data-type="link" data-i...
  • 一个“币”卖出6930多万美元,它是何来头

    一个“币”卖出6930多万美元,它是何来头
    这是一个新的投机性市场,有许多未知的风险——包括100%损失的风险於兴中当我们看到有人花了近百万美元在网络上的虚拟空间里买了一块地,可能会觉得不可思议。但是,比这更不可思议的是,在上个月的佳士得拍卖会上,一个不可替换代币(NFT)卖出了令人瞠目结舌的6930多万美元。这个代币所代表的便是目前人们热议的数字艺术家毕朋(Beeple)的作品《日复一日:最初的5000天(2021)》。不仅如此,不可替换代币市场正在被大张旗鼓地建构。篮球视频集锦的不可替换代币在美国职业...
  • 以太坊质押挖矿收益率

    以太坊质押挖矿收益率
    展开全部 52%左右。根据跟踪公司StakingRewards的数据,质押的以太坊将产生回报,预计在合并后将达到52%左右。再加上预计在升级更新后不久以太坊供应量的净减少,这应该会使该币对投资者更具吸引力。According to the tracking company StakingRewards, the pledge will yield returns that are expected to reach about 52% after the merg...
标签列表