jamescowens / Gridcoin-Research

Gridcoin-Research
MIT License
2 stars 0 forks source link

Consideration of making certain constants appcache entries instead. #13

Closed jamescowens closed 5 years ago

jamescowens commented 5 years ago

The following are the constant defined in the scraper...

// Define 48 hour retention time for stats files, current or not. static int64_t SCRAPER_FILE_RETENTION_TIME = 48 3600; // Define whether prior CScraperManifests are kept. static bool SCRAPER_CMANIFEST_RETAIN_NONCURRENT = true; // Define CManifest scraper object retention time. static int64_t SCRAPER_CMANIFEST_RETENTION_TIME = 48 3600; static bool SCRAPER_CMANIFEST_INCLUDE_NONCURRENT_PROJ_FILES = false; static const double MAG_ROUND = 0.01; static const double NEURALNETWORKMULTIPLIER = 115000; static const double CPID_MAG_LIMIT = 32767; // This settings below are important. This sets the minimum number of scrapers // that must be available to form a convergence. Above this minimum, the ratio // is followed. For example, if there are 4 scrapers, a ratio of 0.6 would require // CEILING(0.6 * 4) = 3. See NumScrapersForSupermajority below. // If there is only 1 scraper available, and the mininum is 2, then a convergence // will not happen. Setting this below 2 will allow convergence to happen without // cross checking, and is undesirable, because the scrapers are not supposed to be // trusted entities. static const unsigned int SCRAPER_SUPERMAJORITY_MINIMUM = 2; // 0.6 seems like a reasonable standard for agreement. It will require... // 2 out of 3, 3 out of 4, 3 out of 5, 4 out of 6, 5 out of 7, 5 out of 8, etc. static const double SCRAPER_SUPERMAJORITY_RATIO = 0.6; // By Project Fallback convergence rule as a ratio of projects converged vs whitelist. // For 20 whitelisted projects this means up to five can be excluded and a contract formed. static const double CONVERGENCE_BY_PROJECT_RATIO = 0.75;

Some of these probably deserve not to be static and have appccache entry overrides. Thoughts?