Determine fixed number of ticks for top-level calls
As per design document, we want the PVM to ensure that every top-level call takes a fixed amount of ticks. That means a PVM would trap if the tick counter for the current top-level call is exceeded, and would pad no-ops if the top-level call returns before the number of ticks.
There are a few properties that need to be considered when coming up with such number.
- It must be large enough so that Fast Execution is unlikely to reach it.
- It must be small enough to be replayable within the refutation game.
With 1) we want to be confident that it is easy to write kernels that also behave well with Fast Execution. Though there are plenty of ways to test any kernel.
Regarding 2) it shall be noted, while the refutation game bisects the playable field, it may still require the L2 PVM to replay almost entire snapshots if the chosen bisection ticks are chosen to be right before top-level yields.