5

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

  • 1
    What's your system spec? Are you running natively, or inside a VM/container? I'd suspect you're either short on memory or disk space... – Richard Horrocks Dec 28 '16 at 20:25
  • 1
    No, I am not running it inside a VM container ... I am running it on machine having os - Ubuntu with 16 gb Ram and very much sufficient disk space. Also I donot see any issue with system specs as the mining was happening fine when I had not changed the code to have static difficulty ... without any change I was able to reach epoch 4. – Ajay Dec 28 '16 at 20:33
  • 1
    @RichardHorrocks I was able solve the problem by running 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
  • 1
    Hmm, interesting. There's an open bug that is reporting a similar problem to yours. They seem to have made the same modification that you have. (It's not you, is it?) Can you confirm that you've made the modification in the same way? github.com/ethereum/go-ethereum/issues/3056 – Richard Horrocks Jan 7 '17 at 17:22
  • 1
    @RichardHorrocks Yes, I have made modification same way. The issue reporter is not me. – Ajay Jan 7 '17 at 18:20
3

There seems to be an open bug related to the issue-issue-3056

The present solution which works for me , I run folowing command before mining again

geth makedag <blocknumber> <ethash dir path>

then start mining again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.