挖矿
19 条名言。中文为本站译文,每条附日期与原文链接。
按照惯例,区块中的第一笔交易是一笔特殊交易,它创造出归区块创建者所有的新币。这激励节点去支持网络,也提供了一种最初发行货币进入流通的方式——因为没有中央机构来发行货币。稳定地新增固定数量的新币,就好比金矿工耗费资源把黄金开采出来投入流通。在我们这里,耗费的是 CPU 算力和电力。
英文原文
By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.
这个网络胜在无结构的简单,坚韧无比。节点同时工作,几乎不需要协调。它们不需要身份标识,因为消息不发往任何特定地点,只需尽力送达。节点可以随时离开、随时重返,把工作量证明链当作它们离线期间所发生事情的证据。它们用 CPU 算力投票:接受有效区块,就接着往上延长;拒绝无效区块,就拒绝为它工作。一切必要的规则和激励,都可以用这个共识机制来执行。
英文原文
The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.
设想这样一种场景:攻击者试图生成一条比诚实链更快的替代链。即使他成功了,系统也不会因此任人篡改——比如凭空创造价值,或者夺取从不属于他的钱。节点不会接受无效交易作为支付,诚实节点也绝不会接受包含无效交易的区块。攻击者唯一能做的,就是试图修改自己的一笔交易,拿回自己刚花出去的钱。
英文原文
We consider the scenario of an attacker trying to generate an alternate chain faster than the honest chain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such as creating value out of thin air or taking money that never belonged to the attacker. Nodes are not going to accept an invalid transaction as payment, and honest nodes will never accept a block containing them. An attacker can only try to change one of his own transactions to take back money he recently spent.
激励有助于让节点保持诚实。即使一个贪婪的攻击者集齐了超过所有诚实节点的 CPU 算力,他也必须二选一:用它作弊、拿回自己付出去的钱;或者用它来生成新币。他会发现,按规则行事更赚钱——规则会让他获得比其他所有人加起来更多的新币,而不是去破坏系统、动摇自己财富的有效性。
英文原文
The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.
比特币网络甚至可能减少垃圾邮件——把僵尸网络引去挖比特币。
英文原文
The Bitcoin network might actually reduce spam by diverting zombie farms to generating bitcoins instead.
要求是:好人一方的 CPU 算力总和,超过任何单个攻击者。
英文原文
The requirement is that the good guys collectively have more CPU power than any single attacker.
会有很多小型僵尸网络,大到不足以压制网络,但照样能靠生成比特币赚钱。这些小网络就是"诚实节点"。(我需要比"诚实"更好的词。)转行生成比特币的小网络越多,压制网络的门槛就越高,大网络也变得不够大,索性也加入挖矿。按照"长尾"理论,小型、中型和仅仅是大型网络加起来,应该远超最大的那个僵尸网络。
英文原文
There would be many smaller zombie farms that are not big enough to overpower the network, and they could still make money by generating bitcoins. The smaller farms are then the "honest nodes". (I need a better term than "honest") The more smaller farms resort to generating bitcoins, the higher the bar gets to overpower the network, making larger farms also too small to overpower it so that they may as well generate bitcoins too. According to the "long tail" theory, the small, medium and merely large farms put together should add up to a lot more than the biggest zombie farm.
即使坏人真的压制了网络,也不是瞬间暴富。他唯一能做的,就是拿回自己花出去的钱,就像跳票的支票。想作恶,他得先从商家买东西,等发货后,再压制网络、试图把钱要回来。我不觉得靠这种盗刷伎俩,能比老老实实生成比特币赚得多。手里有这么大的僵尸网络,他生成比特币的数量能超过其他所有人加起来。
英文原文
Even if a bad guy does overpower the network, it's not like he's instantly rich. All he can accomplish is to take back money he himself spent, like bouncing a check. To exploit it, he would have to buy something from a merchant, wait till it ships, then overpower the network and try to take his money back. I don't think he could make as much money trying to pull a carding scheme like that as he could by generating bitcoins. With a zombie farm that big, he could generate more bitcoins than everyone else combined.
随着计算机越来越快,投入生成比特币的总算力增加,难度会按比例上升,以保持新币总产量不变。因此,未来每年会生成多少新比特币,是事先就知道的。
英文原文
As computers get faster and the total computing power applied to creating bitcoins increases, the difficulty increases proportionally to keep the total new production constant. Thus, it is known in advance how many new bitcoins will be created every year in the future.
最长链永远被视为有效链,这一点严格必要。在场的节点或许记得某个分支先出现、后被取代,但没法让不在场的人相信。不能让节点分成小派系:有的死守自己先看到的分支,有的先看到另一条分支,后来的则根本没见过发生了什么。CPU 算力的工作量证明投票必须一锤定音。让所有人达成共识的唯一方式,就是认定:无论如何,最长链永远有效。
英文原文
It is strictly necessary that the longest chain is always considered the valid one. Nodes that were present may remember that one branch was there first and got replaced by another, but there would be no way for them to convince those who were not present of this. We can't have subfactions of nodes that cling to one branch that they think was first, others that saw another branch first, and others that joined later and never saw what happened. The CPU power proof-of-work vote must have the final say. The only way for everyone to stay on the same page is to believe that the longest chain is always the valid one, no matter what.
广播大概率会几乎完全可靠。如今 TCP 传输极少丢包,广播协议还有重试机制,过一阵可以从其他节点拿到数据。如果实际广播比预期慢,区块目标间隔就得延长,以免浪费算力。我们希望区块的传播时间通常远小于生成时间,否则节点会浪费太多时间在过时区块上。
英文原文
Broadcasts will probably be almost completely reliable. TCP transmissions are rarely ever dropped these days, and the broadcast protocol has a retry mechanism to get the data from other nodes after a while. If broadcasts turn out to be slower in practice than expected, the target time between blocks may have to be increased to avoid wasting resources. We want blocks to usually propagate in much less time than it takes to generate them, otherwise nodes would spend too much time working on obsolete blocks.
工作量证明是 Hashcash 风格的 SHA-256 碰撞寻找。这是一个无记忆过程:每秒做几百万次哈希,每次都有微小的成功概率。最快的 3 或 4 个节点的优势,也只与它们占总 CPU 算力的份额成正比。任何人在任何时刻找到解的概率,都与它的 CPU 算力成正比。
英文原文
The proof-of-work is a Hashcash style SHA-256 collision finding. It's a memoryless process where you do millions of hashes a second, with a small chance of finding one each time. The 3 or 4 fastest nodes' dominance would only be proportional to their share of the total CPU power. Anyone's chance of finding a solution at any time is proportional to their CPU power.
你可以让人给你转点币,或者打开 选项→生成币,运行一个节点、生成区块。起初我把工作量证明难度设得极低,所以一开始的这段时间,一台普通电脑几小时就能生成币。等竞争者多了、自动调整把难度推上去,就会难得多。生成的币必须等 120 个区块成熟后才能花。
英文原文
You can get coins by getting someone to send you some, or turn on Options->Generate Coins to run a node and generate blocks. I made the proof-of-work difficulty ridiculously easy to start with, so for a little while in the beginning a typical PC will be able to generate coins in just a few hours. It'll get a lot harder when competition makes the automatic adjustment drive up the difficulty. Generated coins must wait 120 blocks to mature before they can be spent.
把它想成众人合作打造一条链。你要加一环,必须先找到链的当前末端。如果你找到最后一环,转身花一小时锻造你那一环,回来把它接在你离开时的末端上——别人可能已经接了好几环,他们才不想要你这条从中间岔出去的分叉环。
英文原文
Think of it as a cooperative effort to make a chain. When you add a link, you must first find the current end of the chain. If you were to locate the last link, then go off for an hour and forge your link, come back and link it to the link that was the end an hour ago, others may have added several links since then and they're not going to want to use your link that now branches off the middle.
全网每天生成的币平均总数不变。更快的机器,只是分到比慢机器更大的份额。如果所有人都换了更快的机器,每个人拿到的币并不会比原来多。
英文原文
The average total coins generated across the network per day stays the same. Faster machines just get a larger share than slower machines. If everyone bought faster machines, they wouldn't get more coins than before.
为了网络好,我们应该有个君子协定:尽可能推迟 GPU 军备竞赛。如果新用户不用折腾显卡驱动和兼容性,上手会容易得多。现在这样挺好——只要有 CPU,人人都能公平竞争。
英文原文
We should have a gentleman's agreement to postpone the GPU arms race as long as we can for the good of the network. It's much easer to get new users up to speed if they don't have to worry about GPU drivers and compatibility. It's nice how anyone with just a CPU can compete fairly equally right now.
要是心疼那点手续费,不妨换个思路:自己跑个节点,说不定哪天你也能收上 0.44 的手续费。
英文原文
If you're sad about paying the fee, you could always turn the tables and run a node yourself and maybe someday rake in a 0.44 fee yourself.
如果你本来就要给家里供暖,电脑的热量就不是浪费。如果你们家用电供暖,那电脑的热量一点也不浪费——用电和用电脑发热,成本是一样的。
如果你家有比电暖更便宜的取暖方式,那浪费的只是差价。
如果是夏天开空调,那就是双倍开销。
比特币生成最终会流向成本最低的地方。也许是寒冷地区、用电供暖的地方——在那里,成本几乎为零。
英文原文
The heat from your computer is not wasted if you need to heat your home. If you're using electric heat where you live, then your computer's heat isn't a waste. It's equal cost if you generate the heat with your computer.
If you have other cheaper heating than electric, then the waste is only the difference in cost.
If it's summer and you're using A/C, then it's twice.
Bitcoin generation should end up where it's cheapest. Maybe that will be in cold climates where there's electric heat, where it would be essentially free.
生成币最终会聚集到这几类地方:
1)成本最低或免费的地方
2)出于理念想帮忙的人
3)想拿币、又懒得做交易去买的人
确实有一些正当的免费场景。凡是用电供暖的地方,生成币基本就是免费的——因为电脑的热量抵消了踢脚线电暖器的耗电。很多小公寓图省事都用电暖。
英文原文
Some places where generation will gravitate to:
1) places where it's cheapest or free
2) people who want to help for idealogical reasons
3) people who want to get some coins without the inconvenience of doing a transaction to buy them
There are legitimate places where it's free. Generation is basically free anywhere that has electric heat, since your computer's heat is offsetting your baseboard electric heating. Many small flats have electric heat out of convenience.
