回复:如何推翻 GPU 寡头
原始发布页
打开来源页面查看 1 个交叉存档
引用 theymos 发表于 2010 年 10 月 02 日 06:11:11 AM
引用 lzsaver 发表于 2010 年 10 月 02 日 05:49:47 AM
你能再多说一些吗: “他们不得不对 extraNonce 做些奇怪的处理,这会增加区块头的大小”。
生成新币时,你要计算区块头的哈希。对更多数据做哈希比对较少数据做哈希更慢,因此区块头保持对所有人都一样的固定大小至关重要,只有一个例外。
这正是产生困惑的地方。extraNonce 不是区块头的一部分,而是第一笔交易的一部分。它不会拖慢你的哈希计算。它不会改变区块头的大小。
我们必须保持警惕,把任何认为区块内容会拖慢哈希速度的误解扼杀在萌芽中。它不会。
extraNonce 永远不需要非常大。如果愿意,每当时间变化时,我们可以每秒将它重置一次。最坏的情况下,如果你不想记录它的递增,extraNonce 可以是 4 个随机字节,因碰撞而浪费时间的概率可以忽略不计。
不同的机器会自动避免碰撞,因为它们在第一笔交易中使用了不同的、生成的公钥。每个线程也是如此。
英文原文
展开英文原文
Quote from: theymos on October 02, 2010, 06:11:11 AM
Quote from: lzsaver on October 02, 2010, 05:49:47 AM
Can you tell more about it: "they have to do weird things with extraNonce, which increases the size of the block header".
When you generate, you calculate hashes of the block header. Hashing more data is slower than hashing less data, so the block header is critically of a fixed size for everyone, with one exception.
This is the point of confusion. extraNonce is not part of the block header, it is part of the first transaction. It does not slow down your hashing. It does not change the size of the header.
We need to be vigilant and nip in the bud any misconception that the contents of your block slows down your hash speed. It doesn't.
extraNonce never needs to be very big. We could reset it every second whenever the time changes if we wanted. Worst case, if you didn't want to keep track of incrementing it, extraNonce could be 4 random bytes and the chance of wasting time from collision would be negligible.
Separate machines are automatically collision proof because they have different generated public keys in the first transaction. That also goes for each thread too.