I am having trouble getting geth 1.8.27 to have a static difficulty on a private network. I followed the instructions from here. But when I test it, the difficulty still increases.

I tried again, changed both intstances of CalcDifficulty, then diffed the built binary with the installed one from apt to verify they were different, then manually removed the installed one from apt, and replaced it with the one I built. Deleted the existing chains, started over, and difficulty still increased.

Am I missing something? Or did 1.8 change how it checks difficulty? Or is the make script just pulling from github and ignoring my code changes?

Thanks for any help.

1 Answer 1


The regular geth in PoW mode will adjust your network difficulty to the target average time of 14 seconds per block. It doesn't matter how computer power you have.

Certainly you can modify geth to lower the average time between blocks but that configuration is not very well tested and not supported by the developers.

If you want to quickly mine blocks I'd suggest to try a PoA configuration. It allows to set the desired block time average and you do not have to make modifications to geth source code.

  • 1
    Thanks for the suggestion to try a PoA configuration. I'll give that a shot, but I am worried about mining not rewarding with ether, and having one node potentially running out of ether eventually.
    – Tyler Bath
    May 3, 2019 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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