Proto: do not decode scripts in precheck and do not reuse precheck gas in apply
Context
This MR consists in preliminary work for %Pipelining, related to the
handling of gas in precheck. It contains a refactoring of the gas
consumption in precheck/apply to reduce the dependency between them,
and two semantic changes: we stop checking that script are
deserializable in precheck (but we still check that there is enough
gas for deserialization); and we now take
Michelson_v1_gas.Cost_of.manager_operation
into account when
checking that the operation has enough gas in prechheck.
See commit messages for more detailled explanations of each change.
Manually testing the MR
Run the existing tests, in particular:
- Protocol integration tests:
dune runtest src/proto_alpha/lib_protocol
- Tezt tests for manager operations:
dune exec tezt/tests/main.exe -- --file manager_operations.ml
- Python regression tests (setting up requirements):
poetry run pytest tests_python/tests_alpha/test_contract.py
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).We rely on the precheck tests added in !5475 (merged). -
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