I have looked through all of the glossaries I know of for genesis/chain spec files but I don't see this one. Can anyone tell me what "difficultyHardforkTransition" means?


Looks like this has been defined for a while - it's not new code. It also seems like the value is set to 0x59d9 (= 23001) in the Parity spec, which doesn't equate to any of the public hard forks. This isn't defined in the Geth code. Someone from the Parity team may have a clearer explanation.

Looking in the Parity Master branch, in ethash.rs:

/// Transition block for a change of difficulty params (currently just bound_divisor).
    pub difficulty_hardfork_transition: u64,

Used in the following way in the calculate_difficulty() function (also in ethash.rs):

    let difficulty_hardfork = header.number() >= self.ethash_params.difficulty_hardfork_transition;
    let difficulty_bound_divisor = if difficulty_hardfork {
    } else {

So we check the current block number against the value in difficulty_hardfork_transition, and then use a different bound divisor for the calculation of the current block difficulty if we're past the block where the fork was defined.

You can check in that function how the bound divisor is normally used in the difficulty calculation. Looking at couple of example spec files, it looks like the bound divisor is set to a lower value when a fork occurs.

  • Thank you for this but I've been reading and re-reading this for about 30 minutes and I don't know what it says. For example: what is a "bound divisor"? What is a "bound" for that matter? And "hardfork"? I'm not dumb I just don't know this very specific terminology. I think this code shows "difficulty_hardfork" is being evaluated as if it is greater-than-or-equal-to "difficulty_hardfork_transition" but that doesn't tell me what "difficulty_hardfork_transition" is. – stone.212 Nov 14 '17 at 1:34
  • PS I know what a hard fork is in general obviously. But how does it apply here. Which fork is being referenced? Etc. – stone.212 Nov 14 '17 at 2:57

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.