6

Let's say a Substrate chain had a long and prosper life and is about to reach a block number of BlockNumber::MAX (lucky chain!).

Short of a reincarnation as a new chain with the genesis block retaining all prior memories ‒ what would be mitigation strategies for this case?

Edit: The question is getting downvoted, I'm aware that this is a rather hypothetical question and that it's unlikely to occur in the next couple hundred years. Still I think it's an interesting scenario to explore.

Also consider that those calculations are with the current block time, if block time decreases massively due to technological advances this will also change the outlook.

2
  • Before this Q I didn't even know that number existed. Where is it located? Commented Apr 6, 2022 at 6:49
  • @Purple_Turtle In your runtime configuration, if you full text search for pub type BlockNumber = you'll find the type.
    – cmichi
    Commented Apr 6, 2022 at 6:57

1 Answer 1

3

In standard Substrate, type BlockNumber = u32 so BlockNumber::MAX is 0xffffffff or 4294967295 in decimal.

Assuming 6 second blocks: (4294967295 * 6) / (60 * 60 * 24 * 365) = 817 years.

Assuming 1 second blocks: (4294967295 * 1) / (60 * 60 * 24 * 365) = 136 years.

Assuming 0.5 second blocks: (4294967295 / 2) / (60 * 60 * 24 * 365) = 68 years.

The impact of 2038 is closer. Since everything is upgradable and types can be changed, it is not something to loose sleep over until the chain gets to "some years out".

Your Answer

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

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