Is uint32 big enough for tracking block number?

In ERC20Votes.sol, we have

struct Checkpoint {
    uint32 fromBlock;
    uint224 votes;
}

This seems to assume that the block number will always be less than the maximum of uint32. At a rate of one block every 13 seconds, this gives us roughly 1800 years until reaching the maximum. Are we assuming Ethereum will be finished by then? And could an update to Ethereum make the block production rate even quicker?

Eventually yes, in fact after the merge the block time will be 12s. But it seems unlikely it will go lower than that in the near future.

It's worth considering that other networks or rollups do have faster block production though.

I don't think it's reasonable to plan for more than 1800 years in the future.

1 Like