I am trying to come up with some practical bounds on how much storage migration one has time to do in a single block as part of a runtime upgrade.
So assume
- there are N validators running the current consensus system found in the Substrate setup, not as a parachain
- the nodes are running on decent civilian workstations
- the migration code is dominated by doing sequences of database reads/writes pairs, as well as the normal associate encoding/decoding logic
- the size of the data in each read/write pair is pretty stable, with M bytes on average
let f(N, M) be the number of read,write pairs you will be able to safely do in a single block when there is no other extrinsic handling.
What is a good guess at what f(N,M) looks like? just some decent answers for popular values of N (e.g 40) and M (e.g. 32, 1024).
I ask, because constraints around this will have to inform how a module is built to begin with.