Skip to content

Michelson IR: Make types kept for logging optional

Context

With !4731 (merged) we removed stack types stored in the IR to diminish memory footprint of smart contracts stored in cache. That done, in order to preserve logging in the interpreter, we had to add some type information back to the IR. We can now further improve the memory footprint of contracts by storing these types only when logging is enabled. This requires us to pass additional argument to the elaborator. We took this opportunity for small refactoring and grouped some flags common in Script_ir_translator's functions into a record so that they can be passed around more easily.

Fix #3216 (closed)

Manually testing the MR

Try calling tezos-client run script with --trace-stack and verify that the logging information is preserved. You can also try calling appropriate RPCs manually. Logging should work everywhere. You can use feature added to get_contracts script in !5608 (merged) to verify that both predicted and actual in-memory size of smart contracts is further improved compared to master.

Checklist

  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Yann Regis-Gianas

Merge request reports