Skip to content

Proto: Migrate to a more efficient layered context

This MR replaces metastatedev/tezos!362 (closed).

Context

This MR introduces a layered representation for the context to get faster functional updates of the gas counter.

Currently, each of these functional updates requires a copy of 200 bytes while this commit reduces this number to 16. This optimization is important because the updates of the gas counter are very frequent in the protocol-related functions, especially in the Michelson runtime.

This optimization is part of a sequence to optimize gas update and check for gas exhaustion documented here: https://hackmd.io/@yrg/rkLwB17wD

Related: #1013 (closed) Depends on: !2327 (merged)

Manually testing the MR

cd src/proto_alpha/lib_protocol/test && dune exec ./main.exe

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Provide automatic testing (see the testing guide).
  • [ ] Add item in the Development Version section of CHANGES.md (only for new features and bug fixes).

Reviewers

@paracetamolo @mbouaziz @rafoo_ @igarnier

Edited by Yann Regis-Gianas

Merge request reports

Loading