Proto/EnvV4: make Micheline.canonical_location abstract
Context
This is a redo of !3652 (closed) with a branch on tezos/tezos to ease stacked MRs.
The MR was approved by @sventimir and @shrmtv.
Micheline.canonical_location is just an int. We had issues in the past where we mixed locations with other integers. Making location abstract avoid this kind of confusion.
(also Merlin was reporting integers as location, now it will report local_gas_counter haha)
The MR also tries to reduce the usage of dummy locations (0 or -1):
- by using a specific value
dummy_location - by using
()whenever locations are stripped later - for this I had to generalize the location at some places, replacing
Script.nodeby('loc, Script.prim) Micheline.node - some places were using
0, others-1, now all usedummy_location = -1 - it should break nothing in the protocol as locations are never looked at thanks to !3763 (merged)
Prerequisite for #2025 (closed).
Manually testing the MR
CI
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.rstfor the protocol and the environment, theDevelopment Versionsection ofCHANGES.mdfor everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Mehdi Bouaziz