I’ve seen a few people describe the cost of invoking a contract in tez, they’ll say: “Sending a transaction to that contract costs 0.5 tez in gas”. This is a bad habit, here’s why:
- The point is generally to compare how gas efficient two contracts might be, but the amount of tez it takes to include a given transaction in a block can vary based on supply and demand for block space and block gas.
- The gas “price” used is, in most cases, not even based on a fee market price but on a totally arbitrary (and configurable) default value set over a year ago as a mitigation against account creation spam (though the proper fix was to create the account creation burn).
In contrast, gas unit cost is defined by the protocol. It does not depend on the fee market conditions, it does not depend on arbitrary defaults in config files, etc.
It may be hard to interpret gas unit numbers so, to make this more intuitive, bear in mind the following constants:
- gas limit per operation : 800,000 (1,040,000 in Carthage)
- gas limit per block : 8,000,000 (10,400,000 in Carthage)
- simplest transaction (implicit account to implicit account transfer): 10,207