Michelson: Missing gas consumption in traced execution
Some Michelson continuations and instructions have a special treatment in the interpreter when tracing is on: instead of executing them through the next and step functions as usual, the code for them is duplicated in klog and ilog. Unfortunately, the corresponding gas consumption is missing.
All continuations are affected. The affected instructions are:
- control operators,
- anything that can fail (
FAILWITH, shifts, overflowing mutez operations).
This issue does not affect the security of the protocol directly because the logger (and hence the klog and ilog functions) are never used for application of operations but it is nonetheless severe because it affects our ability to detect gas regressions for all the affected continuations and instructions.