2

What is the definition of the Parity chain spec parameter "durationLimit"?

1

This is more or less a straight copy of one of the main Ethash parameters in Geth.

In Geth, it's defined as:

DurationLimit          = big.NewInt(13)                    // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not.

Which is basically the limit at which the difficulty will be adjusted to maintain a constant block time (either upwards or downwards depending on the previous block time).

if bigTime.Sub(bigTime, bigParentTime).Cmp(params.DurationLimit) < 0 {
    diff.Add(parent.Difficulty, adjust)
} else {
    diff.Sub(parent.Difficulty, adjust)
}

It's defined in lots of places in the Parity code, and I'm struggling to work out which is the real value, and which is just test code. Most of them are set to 0x0d, which is 13 seconds. This would be the starting point for the block time in a new network before any alterations were made by "difficulty adjusting" algorithms (e.g. Ice Age, etc.).

  • Yes I am also struggling to figure out exactly what is what in Parity. I agree about the defnition in Geth. But Parity sometimes uses different terms. Also, I don't understand the difference between this concept and that of "difficultyBoundDivisor" but that is a different question. – stone.212 Oct 31 '17 at 9:22

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.