charon icon indicating copy to clipboard operation
charon copied to clipboard

Refactor vmock with optimisation

Open dB2510 opened this issue 2 years ago • 0 comments

🎯 Problem to be solved

Currently vmock queries duties every slot and if there are any then it performs those duties. Vmock also schedules duties for all the slots in an epoch which results in unnecessary goroutines for each duty in each slot.

🛠️ Proposed solution

This can be solved by:

  • Querying duties at the start of each epoch and caching those duties to be performed when slot ticks.
  • Only scheduling duties for slots that are cached at the start of epoch and NOT all of them.
  • Align with the VC terminology of lookahead as current and next epoch rather than previous and current epoch. This would further simplify the duties workflow.

🧪 Tests

  • [ ] Tested by new automated unit/integration/smoke tests
  • [ ] Manually tested on core team/canary/test clusters
  • [ ] Manually tested on local compose simnet

dB2510 avatar Oct 13 '23 07:10 dB2510