Proto/EnvV4: make Micheline.canonical_location abstract
Context
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 using0, others-1, now all usedummy_location = -1, will this break something? - probably not, except at one place where I had to add an
is_dummy_locationin the interpreter: @klakplok why? can it be removed?
Manually testing the MR
CI
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -> I may need to add one or two docstrings -
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