Struct diem_sdk::move_types::gas_schedule::GasConstants [−][src]
pub struct GasConstants {
pub global_memory_per_byte_cost: InternalGasUnits<u64>,
pub global_memory_per_byte_write_cost: InternalGasUnits<u64>,
pub min_transaction_gas_units: InternalGasUnits<u64>,
pub large_transaction_cutoff: AbstractMemorySize<u64>,
pub intrinsic_gas_per_byte: InternalGasUnits<u64>,
pub maximum_number_of_gas_units: GasUnits<u64>,
pub min_price_per_gas_unit: GasPrice<u64>,
pub max_price_per_gas_unit: GasPrice<u64>,
pub max_transaction_size_in_bytes: u64,
pub gas_unit_scaling_factor: u64,
pub default_account_size: AbstractMemorySize<u64>,
}
Fields
global_memory_per_byte_cost: InternalGasUnits<u64>
The cost per-byte read from global storage.
global_memory_per_byte_write_cost: InternalGasUnits<u64>
The cost per-byte written to storage.
min_transaction_gas_units: InternalGasUnits<u64>
The flat minimum amount of gas required for any transaction. Charged at the start of execution.
large_transaction_cutoff: AbstractMemorySize<u64>
Any transaction over this size will be charged an additional amount per byte.
intrinsic_gas_per_byte: InternalGasUnits<u64>
The units of gas that to be charged per byte over the large_transaction_cutoff
in addition to
min_transaction_gas_units
for transactions whose size exceeds large_transaction_cutoff
.
maximum_number_of_gas_units: GasUnits<u64>
~5 microseconds should equal one unit of computational gas. We bound the maximum
computational time of any given transaction at roughly 20 seconds. We want this number and
MAX_PRICE_PER_GAS_UNIT
to always satisfy the inequality that
MAXIMUM_NUMBER_OF_GAS_UNITS * MAX_PRICE_PER_GAS_UNIT < min(u64::MAX, GasUnits
min_price_per_gas_unit: GasPrice<u64>
The minimum gas price that a transaction can be submitted with.
max_price_per_gas_unit: GasPrice<u64>
The maximum gas unit price that a transaction can be submitted with.
max_transaction_size_in_bytes: u64
gas_unit_scaling_factor: u64
default_account_size: AbstractMemorySize<u64>
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<GasConstants, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<GasConstants, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for GasConstants
impl Send for GasConstants
impl Sync for GasConstants
impl Unpin for GasConstants
impl UnwindSafe for GasConstants
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Generates a hash used only for tests.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more