[go: up one dir, main page]

Refactor proto_alpha/bin_sc_rollup_node/interpreter

Context

This is an attempt to refactor the bin_sc_rollup_node/Interpreter. This MR contains an intermediary step which could be merged reasonably quick and thus avoid git conflicts.

The Interpreter logic contained two behaviors for the PVM. One is "Accounted" PVM, where fuel matters and the other one is "Free" PVM where fuel doesn't matter. The switch between the two behaviors was done by passing the fuel as int64 option where None meant "free execution" and Some meant accounted execution.

This MR does the following:

  1. Introduces an explicit signature for Interpreter_event because it was needed in the next steps
  2. Introduces the module type Fuel with two implementations: Free (i.e. fuel that never ends) and Accounted
  3. From the Interpreter code extracts the part that manages the fuel into the module Fueled_pvm

Manually testing the MR

Existing tests still succeed.

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 Ovidiu Deac

Merge request reports

Loading