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::MAX) NB: The bound is set quite high since custom scripts aren’t allowed except from predefined and vetted senders.

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: u64gas_unit_scaling_factor: u64default_account_size: AbstractMemorySize<u64>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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 !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

Generates a hash used only for tests.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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