Skip to content

Make Micheline serialization gas acounting consistent by construction

Context

Currently, gas accounting of serialization of Micheline data is duplicated in lots of places, and not fully consistent.

This MR factors out this accounting from inside the unparsing stage. That way, we can remove many ad-hoc gas accounting code, and make sure we charge for serialization consistently, currently and in the future.

This should only introduce minor gas changes for usual contracts. Some exotic behavior (such as contracts with very large storage or producing very large receipts) may be charged more gas, that's on purpose.

Merge request reports