我构建了一个新的工作量证明协议,并观察到了一个出乎意料的早期解决方案。
2 分•作者: babakkarimib•2 个月前
我最近部署了一个名为 Shardhash 的实验性工作量证明协议。这个想法很简单:矿工通过寻找具有所需后缀模式的哈希值来竞争,奖励与匹配的十六进制数字的数量成正比。
测试期间发生了一些意想不到的事情。
一个从未与该协议交互过的钱包提交了一个失败的声明,然后又提交了一个成功的声明。成功的解决方案是 Tier 10(大约是 1/16^10 的事件),nonce 值为 18。
有趣之处在于时间安排:
* 失败的声明使用了 nonce 17,但被拒绝了,因为该轮次已经过期。
* 失败的声明是在该轮次开始后 300 秒提交的,尽管提交窗口只有 12 秒。
* 下一个声明使用了 nonce 18 并成功了。
* 成功的声明是在该轮次开始后 480 秒提交的(比以太坊区块早 42 个块),比失败的声明提交晚了约 180 秒。
乍一看,这看起来很奇怪,因为如果只测试一小段顺序搜索范围,满足 Tier 10 目标的非常低的 nonce 值极不可能出现。
经过调查,更可能的解释是:
* 矿工使用了自定义实现,而不是参考矿工。
* 矿工能够预先计算,因为挑战在轮次开放之前就已可用(提交期开始前有额外的 12 秒窗口)。
* 或者这仅仅是一个罕见的概率事件。
Shardhash 合约:
https://etherscan.io/address/0x295121422b9d0fd3cbddc9e203ae9b4a1eff0082
查看原文
I recently deployed an experimental proof-of-work protocol called Shardhash. The idea is simple: miners compete by finding hashes with a required suffix pattern, and rewards scale with the number of matching hex digits.<p>Something unexpected happened during testing.<p>A wallet that had never interacted with the protocol before submitted a failed claim and then a successful claim. The successful solution was Tier 10 (roughly a 1 in 16^10 event), with a nonce value of 18.<p>The interesting part was the timing:<p>- The failed claim used nonce 17 but was rejected because the round had already expired.<p>- The failed claim was submitted 300 seconds after the round started, even though the submission window is only 12 seconds.<p>- The next claim used nonce 18 and succeeded.<p>- The successful claim was submitted 480 seconds after that round started (42 Ethereum blocks later), about 180 seconds after the failed submission.<p>At first glance this looked strange because a very low nonce satisfying a Tier 10 target is extremely unlikely if only a small sequential search range is tested.<p>After investigating, the more likely explanations are:<p>- the miner used a custom implementation rather than the reference miner,<p>- the miner was able to precompute because the challenge became available before the round opened (extra 12 seconds window before submission period starts),<p>- or it was simply a rare probabilistic event.<p>Shardhash contract:
https://etherscan.io/address/0x295121422b9d0fd3cbddc9e203ae9b4a1eff0082