This module lays out the basic abstract costing schedule for bytecode instructions.
It is important to note that the cost schedule defined in this file does not track hashing operations or other native operations; the cost of each native operation will be returned by the native function itself.
A newtype wrapper that represents the (abstract) memory size that the instruction will take up.
The cost tables, keyed by the serialized form of the bytecode instruction. We use the serialized form as opposed to the instruction enum itself as the key since this will be the on-chain representation of bytecode instructions in the future.
A newtype wrapper around the gas price for each unit of gas consumed.
A newtype wrapper around the underlying carrier for the gas cost.
The size in bytes for a non-string or address constant on the stack
For V1 all accounts will be ~800 bytes
Any transaction over this size will be charged
The maximum size representable by AbstractMemorySize
For exists checks on data that doesn't exists this is the multiplier that is used.
One unit of gas
The size in bytes for a reference on the stack
The size of a struct in bytes
A trait encoding the operations permitted on the underlying carrier for the gas unit, and how other gas-related units can interact with other units -- operations can only be performed across units with the same underlying carrier (i.e. as long as the underlying data is the same).
The underlying carrier for gas-related units and costs. Data with this type should not be
manipulated directly, but instead be manipulated using the newtype wrappers defined around
them and the functions defined in the