[go: up one dir, main page]

Rollup-Node: FUELED_PVM module uses mutable API when using PVMs

What

Closes of RV-184

  • Uses the mutable pvm API in FUELED_PVM used by the rollup node.

Why

  • Using a mutable API will enable ownership/move semantics to be used in the RISCV implementation of the PVM which will help avoid doing extraneous state copies when the PVM is used in a linear fashion.

How

The FUELED_PVM module will now use the mutable PVM API as follows:

  • Where we want mutable api usage, take the immutable state, use conversion functions between mutable and immutable states.
  • Then, use the Mut_api functions which will not return a new state, but modify it in place (by returning a unit Lwt.t / <side_effect_data> Lwt.t)
  • Convert the mutable state back to immutable.

Manually testing the MR

The mutable API will be used in the FUELED_PVM module which is tested by rollup node tests.

make
# Just the rollup node tests
dune exec ./tezt/tests/main.exe -- --verbose --file tezt/tests/sc_rollup.ml
# Alternatively all tests
make test

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