[go: up one dir, main page]

Tezlink/Kernel/MIR: Introduce the concept temporary big_map in MIR and Tezlink kernel

What

Introduce the concept of temporary big_map (big_map with negative id) in MIR and in the Tezlink kernel.

Why

Temporary big_map are a feature needed to pass big_map through contracts. Having big_map with negative id is also important for tzkt for example as it makes a distinction between big_map either they have positive or negative id.

How

This MR is just an introduction of negative id for big_map. As it is currently done, a temporary big_map is just a big_map with a negative id for Tezlink. It is stored like any other big_map.

In this MR:

  • append a temporary boolean to allocate and copy function for big_map, generates a negative id if it's true or a positive one if it's false
  • we add a temporary argument to the dump_big_map_updates function, this temporary boolean tells if result produced by the function should be a temporary big_map or not
  • Some renaming of the FromLazyStorage case, as this case also holds temporary big_map that are not going to be stored in the lazy_storage but in memory

The actual implementation of the temporary big_map will be done in a next MR.

Manually testing the MR

I've copied the regression tests introduced on the big_map in the L1.

The regression file etherlink/tezt/tests/expected/tezlink.ml/Alpha- Test of the big_map transfers.out should have similar result than tezt/tests/expected/contract_big_map_transfer.ml/S023-- Test sending a big map from a contract to another.out.

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 Arnaud Bihan

Merge request reports

Loading