I was reading "Explanation of genesis file" and I found the description of the timestamp:
A scalar value equal to the reasonable output of Unix’ time() function
at this block inception.This mechanism enforces a homeostasis in terms of the time between
blocks. A smaller period between the last two blocks results in an
increase in the difficulty level and thus additional computation
required to find the next valid block. If the period is too large, the
difficulty, and expected time to the next block, is reduced.The timestamp also allows to verify the order of block within the
chain (Yellowpaper, 4.3.4. (43)).Note: Homeostasis is the property of a system in which variables are
regulated so that internal conditions remain stable and relatively
constant.
How does, generally speaking, Ethereum maintain it's homeostasis and regulate the time between blocks? Now it's 15 sec, but is it possible for the Ethereum developers to increase or decrease that time without touching the client or is this a paramether harcoded in the client? How can I set, for example, a 30 sec time between blocks on my testnet?
Best Answer
If you are using geth here's a patch that I use to accelerate mining. You could probably modify it to decelerate mining if you wish. (I'm curious why you wish to go slower). In any event, I think the answer to "how does the interval for mining get set" is "not very clear from the code"... but this patch should give you a head start in understanding the timing of geth.