Rollup-Node: FUELED_PVM module uses mutable API when using PVMs
What
Closes of RV-184
- Uses the mutable pvm API in
FUELED_PVMused 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_apifunctions which will not return a new state, but modify it in place (by returning aunit 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.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
Edited by Felix Puscasu