Rollup-Node: Remove max_steps argument
What
Removes max_steps argument from helper function normal_eval in the FUELED_PVM module.
Why
-
Simplifies code.
-
It gets rid of potentially introducing bugs in the future where if
fuelis less than the equivalent ofmax_stepsthen the rollup node will crash immediately, believing thePVM.eval_manydid not respect the API (returned executed ticks smaller than given max_ticks/max_steps), when in fact this is a logic bug wherefuelandmax_stepsarguments do not correspond to equivalent amounts.
How
Stop computing before hand the max_steps argument. Compute it at call-site of PVM.eval_many inside the normal_eval function.
With one single source of truth for remaining ticks/fuel, the function will surely crash only when the PVM api is not respected, avoiding false-positive crashes.
Manually testing the MR
make
dune exec tezt/tests/main.exe -- --file sc_rollup.ml
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR