Go-Ethereum
使用 geth 為 Epoch 1 生成 DAG 時出現問題
我在私有乙太坊網路上執行 geth。我已將 block_validator.go 中的 CalcDifficulty() 更改為始終返回 return big.NewInt(0x100)… 以獲得恆定的難度。
挖礦開始正常…問題開始在 epoch 1 開始挖礦時發生,即在生成 30000 個塊之後,我收到以下執行時異常:
I1228 05:42:57.026535 miner/worker.go:362] 🔨 Mined stale block (#29998 / 4356a658). I1228 05:42:57.029435 miner/worker.go:362] 🔨 Mined block (#29999 / 95be9c6e). Wait 5 blocks for confirmation I1228 05:42:57.029678 miner/worker.go:362] 🔨 Mined stale block (#29999 / 5f6a0b48). I1228 05:42:57.029823 miner/worker.go:570] commit new work on block 30000 with 0 txs & 0 uncles. Took 335.912µs I1228 05:42:57.029868 vendor/github.com/ethereum/ethash/ethash.go:259] Generating DAG for epoch 1 (size 1082130304) (290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563) I1228 05:42:57.029885 vendor/github.com/ethereum/ethash/ethash.go:259] Generating DAG for epoch 0 (size 1073739904) (0000000000000000000000000000000000000000000000000000000000000000) I1228 05:42:57.029908 vendor/github.com/ethereum/ethash/ethash.go:259] Generating DAG for epoch 1 (size 1082130304) (290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563) I1228 05:42:58.112724 vendor/github.com/ethereum/ethash/ethash.go:291] Generating DAG: 0% I1228 05:42:58.415948 vendor/github.com/ethereum/ethash/ethash.go:276] Done generating DAG for epoch 0, it took 1.386053157s fatal error: unexpected signal during runtime execution [signal 0x7 code=0x2 addr=0x7f210f9af9c8 pc=0xd21c3a] runtime stack: runtime.throw(0x12b9d80, 0x2a) /usr/lib/go-1.6/src/runtime/panic.go:547 +0x90 runtime.sigpanic() /usr/lib/go-1.6/src/runtime/sigpanic_unix.go:12 +0x5a
以下是在 .ethash 目錄中創建的文件
ubuntu@ip-172-31-29-183:~/.ethash$ ls -hlrt total 1.1G -rw-rw-r-- 1 ubuntu ubuntu 1.0G Dec 27 21:14 full-R23-0000000000000000 -rw-rw-r-- 1 ubuntu ubuntu 1.1G Dec 28 07:47 full-R23-290decd9548b62a8 ubuntu@ip-172-31-29-183:~/.ethash$
怎麼了 ?好心提醒
似乎有一個與問題相關的開放錯誤- issue-3056
目前對我有用的解決方案,我在再次探勘之前執行以下命令
geth makedag <blocknumber> <ethash dir path>
然後重新開始挖礦。