[go: up one dir, main page]

Client/Michelson: consolidate the Michelson_v1_stack module

Context

In the client, the main type used to represent Michelson pieces of data is Michelson_v1_parser.parsed which is a record containing a Script.expr and everything needed to print localized error messages (intermediate parsing results and location translation tables).

The Michelson_v1_stack module does currently not use this record type because it needs to recognize some non-Michelson primitives such as Stack_elt. This limits our ability to integrate it with other parts of the client, in particular the Michelson_v1_error_reporter module.

This MR consolidates the Michelson_v1_stack module of the client and the corresponding Clic parameters in Client_proto_args.

In particular:

  • we extend Michelson_v1_parser.parsed to expose the intermediate result that we need (macro expanded but Michelson primitives not yet recognized),
  • we change the type of the output of Client_proto_args.micheline_parameter and input of Michelson_v1_stack functions to Michelson_v1_parser.parsed.

This MR is required to build a minimal TZT runner in !10898 (merged).

Manually testing the MR

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 Raphaël Cauderlier

Merge request reports

Loading