Closed juliangruber closed 1 year ago
@juliangruber @patrickwoodhead I think this is such a major change that we should run it through another security audit, WDYT?
@juliangruber @patrickwoodhead I think this is such a major change that we should run it through another security audit, WDYT?
Agreed, once this and other changes have been merged, and running in stating for a bit, we should consider another audit
@juliangruber could you please merge main
and resolve the conflicts before we do the final review?
Hey @juliangruber trying to understand the openRounds
concept here. Is there a scenario where we have two open rounds where evaluations are not submitted at the same time? Shouldn't the round process be synchronous?
The scenario im imagining is if the evaluations are being processed for one round and participants start submitting measurements for the following round?
Hey @juliangruber trying to understand the openRounds concept here. Is there a scenario where we have two open rounds where evaluations are not submitted at the same time? Shouldn't the round process be synchronous?
The scenario im imagining is if the evaluations are being processed for one round and participants start submitting measurements for the following round?
This can happen if the evaluation service errors/fails, but the new rounds are still created so that the system can continue functioning. Plus, you will always have at least two open rounds when you switch to the next one, since it takes a bit of time for evaluation results (which always come in after the round ends) to come in
I'm going to merge and deploy this now, so that we can start gathering usage data.
Hindsight review would be appreciated @bajtos @AmeanAsad 🙏
This "radical" PR removes as much internal storage as possible, relying on Events as a method of cost saving and also reducing complexity. See gas comparison, before:
after:
In some calls, this is almost a 50% cost reduction. And since we only keep track of the current open rounds (ie rounds that have started but for which evaluation results haven't been submitted yet), which should on average just be 2, the contract's state won't grow.
Unless I missed something, the only impact this will have on our current running system is that we can't track per-round measurement count from the IE any more. This shouldn't be a problem, as we also have this state in the measurement and evaluate services. Listening for and querying events is already the main method of getting data out of the system. I also removed the method
getParticipantScores
, if a participant wants to see their score in a round they can look up the matchingsetScores()
transaction.