MIR: add Big map model
Context
Adds the model of big maps. The key point of big maps that distincts them from plain maps is that they are backed by lazy storage, and I tried to tell a story about that in code.
For our team: the model used by Octez is kinda different from what we did in Morley AFAIR. In Morley we allocated new big_map ID proactively, e.g. immediately on DUP. Octez tries to avoid that for as much as possible, allocating new big_map IDs only when it is strictly necessary eventually. If a big map was DUPed and then the original map was DROPed, no ID is allocated. So, the interpreter for individual instruction knows nothing about special treatment of big_maps, and everything interesting happens at the boundaries of contract execution.
In next MRs:
- Add big_map to interpreter/typechecker, add gas costs.
- Implement
LazyStoragethrough rollup's storage.
Manually testing the MR
cargo 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 Konstantin Ivanov