I have made difficulty static in my private block chain, so I can have static response time. Are there any drawbacks of doing this?

  • Are you planning on adding hashing power (i.e. more miners) to your network in the future? Jan 5 '17 at 15:18
  • @RichardHorrocks Yes , in future I will add more peers/miners.
    – Ajay
    Jan 5 '17 at 15:42

Are there any drawbacks for making difficulty static on a private chain?

One potential problem would be that you can't add further hashing power without changing the block time.

Making the difficulty static

This is achieved by changing the difficulty adjustment algorithm code so that it returns a static value, instead of calculating any changes in difficulty that would normally need to be made.

How to make Ethereum mining difficulty static for a private chain?

Note that this is different from changing the difficulty value in the genesis block, which only sets the starting difficulty. The main difficulty adjustment algorithm is still in place.

A static difficulty is fine if your hashing power also stays static, but...

If you plan to increase the hashing power

If you add hashing power, and you've removed the adjustment algorithm, then your block time will decrease. From your question, that's not what you want:

...so I can have static response time...

What you're really trying to achieve is a specific block time, not necessarily a specific difficulty.

Is it possible to change the block target time?

To do that you'll need leave the adjustment algorithm in place, but tune it to give you the block time you desire.

There's a very detailed description of how the algorithm works in this (brilliant) previous answer. I'd suggest going through the algorithm and understand what changes you'll need to make to obtain your desired time.

One thing to note would be that the algorithm contains code for the Difficulty Bomb (see Sub-formula B in the previous link), the purpose of which is to increase the difficulty exponentially over time to make Proof of Work mining less incentivised. (With a view to moving from PoW to Proof of Stake.) You'll likely want to remove this part of the algorithm to prevent the difficulty increasing exponentially.

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.