[TM-229] Share typecheck results in `Runtime`
Description
Problem: each TransferOp
operation in Michelson.Runtime
typechecks
contract code. Typechecking is costly, and it makes tests take long.
Solution: Store typed representation of contract code and storage
in ContractState
. So that contract is typechecked only once during
its originataion via OriginateOp
. Also interpreter now uses
typed representation of contract code, parameter and storage,
which is removes (almost, if typechecker error happened during
interpretation, this should be treated as a bug) chances of getting
typecheck error during interpretation.
Related issue(s)
https://issues.serokell.io/issue/TM-229
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
[ ] If I added new functionality, I added tests covering it.<- Not really new functionality, just some changes in implementation, that doesn't affect any functionality. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Roman Melnikov