[go: up one dir, main page]

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 fuel is less than the equivalent of max_steps then the rollup node will crash immediately, believing the PVM.eval_many did not respect the API (returned executed ticks smaller than given max_ticks/max_steps), when in fact this is a logic bug where fuel and max_steps arguments 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.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Felix Puscasu

Merge request reports

Loading