[go: up one dir, main page]

MIR: Typechecking gas consumption

Context

This MR implements some gas consumption in the typechecker.

The gas values are for the most part copied from Octez implementation. It's not an exact match, however, as not all features are implemented:

  • No global constants (constant expansion consumes quite a bit of gas, even if they aren't in fact used).
  • No checks for dupability/packability (all types currently supported are both packable and dupable).
  • No gas costs for converting types from Micheline to internal representation, as we parse types directly into internal representation.
  • Probably other differences I've missed.

Based on !10080 (merged)

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.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 Nikolay Yakimov

Merge request reports

Loading