Skip to content

Proto Alpha: remove stack types from kinfo

Sventimir requested to merge rafoo@remove_stack_types_from_kinfos into master

Context

Originally created by @rafoo_, currently owned by @sventimir.

This change aims at reducing memory consumption of the Michelson interpreter. Currently the internal representation of each Michelson instruction contains a representation of the type of the whole stack it operates on. Majority of this type information is duplicated for each instruction, yet it's not really useful for execution, except for printing debug information. In order to reduce memory footprint of Michelson scripts, it was decided to remove the stack type info from instructions and provide debug information by other means.

Manually testing the MR

Run some Michelson with --trace-stack option and observe debugging output of the interpreter. Measure memory consumed by cached scripts or the number of scripts that fits in the cache. Footprint of each particular script should be decreased, allowing more scripts to fit in cache.

No other difference in behaviour should be observed.

Checklist

  • n/a Document the interface of any function added or modified (see the coding guidelines)
  • n/a Document any change to the user interface, including configuration parameters (see node configuration)
  • n/a Provide automatic testing (see the testing guide).
  • n/a 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 Sventimir

Merge request reports