I am running geth on private ethereum network. I have changed the CalcDifficulty() in block_validator.go to always return return big.NewInt(0x100)... to have a constant difficulty.
The mining starts fine ... problem starts to happens when mining starts for epoch 1, i.e after 30000 blocks are generated, I am receiving below runtime exception:
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
and following are the file which gets created in .ethash directory
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$
What is wrong ? Kindly advise
geth makedag 30000 ~/.ethash
and let the dag generation complete ... then I was able to continue mining. Can you give any rationale behind it. – Ajay Jan 6 '17 at 22:48