3

Let's say I have a private network with a few nodes, then all of them stop mining for a day. What happens during that day? What happens the day after when they start mining again?

Will the blockchain continue from yesterday's last mined block, will there be problems due to big difference in adjacent blocks' timestamps?

1 Answer 1

5

The protocol doesn't specify a maximum time between blocks, so it's acceptable to stop mining for a day, then pick up again the next day. If transactions were sent in the meantime and they are still remaining in miners' mempools, they should be mined normally when mining restarts. If there was a point when all the nodes on the network were stopped then nobody on the network will have the transactions any more, and they will need to be retransmitted.

For most purposes a period without blocks isn't a problem, but one thing to be aware of in this situation is that buggy or malicious miners have a lot of leeway to play with the block timestamp. The protocol specifies that time can't go backwards, so normally if I mine a block at 16:14, and the last block was mined at 16:01, I can pretend I mined it any time between 16:01 and 16:14, but I can't fudge things any more than that. But if there were 24 hours between blocks, a miner can mine a block today and give it a timestamp from yesterday. This could be a problem in the event that your network is running contracts that don't expect this and require reasonably accurate timestamping.

Your Answer

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

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