Struct near_primitives_core::config::VMLimitConfig[][src]

pub struct VMLimitConfig {
Show 22 fields pub max_gas_burnt: Gas, pub max_stack_height: u32, pub initial_memory_pages: u32, pub max_memory_pages: u32, pub registers_memory_limit: u64, pub max_register_size: u64, pub max_number_registers: u64, pub max_number_logs: u64, pub max_total_log_length: u64, pub max_total_prepaid_gas: Gas, pub max_actions_per_receipt: u64, pub max_number_bytes_method_names: u64, pub max_length_method_name: u64, pub max_arguments_length: u64, pub max_length_returned_data: u64, pub max_contract_size: u64, pub max_transaction_size: u64, pub max_length_storage_key: u64, pub max_length_storage_value: u64, pub max_promises_per_function_call_action: u64, pub max_number_input_data_dependencies: u64, pub max_functions_number_per_contract: Option<u64>,
}
Expand description

Describes limits for VM and Runtime. TODO #4139: consider switching to strongly-typed wrappers instead of raw quantities

Fields

max_gas_burnt: Gas

Max amount of gas that can be used, excluding gas attached to promises.

max_stack_height: u32

How tall the stack is allowed to grow?

See https://wiki.parity.io/WebAssembly-StackHeight to find out how the stack frame cost is calculated.

initial_memory_pages: u32

The initial number of memory pages. NOTE: It’s not a limiter itself, but it’s a value we use for initial_memory_pages.

max_memory_pages: u32

What is the maximal memory pages amount is allowed to have for a contract.

registers_memory_limit: u64

Limit of memory used by registers.

max_register_size: u64

Maximum number of bytes that can be stored in a single register.

max_number_registers: u64

Maximum number of registers that can be used simultaneously.

max_number_logs: u64

Maximum number of log entries.

max_total_log_length: u64

Maximum total length in bytes of all log messages.

max_total_prepaid_gas: Gas

Max total prepaid gas for all function call actions per receipt.

max_actions_per_receipt: u64

Max number of actions per receipt.

max_number_bytes_method_names: u64

Max total length of all method names (including terminating character) for a function call permission access key.

max_length_method_name: u64

Max length of any method name (without terminating character).

max_arguments_length: u64

Max length of arguments in a function call action.

max_length_returned_data: u64

Max length of returned data

max_contract_size: u64

Max contract size

max_transaction_size: u64

Max transaction size

max_length_storage_key: u64

Max storage key size

max_length_storage_value: u64

Max storage value size

max_promises_per_function_call_action: u64

Max number of promises that a function call can create

max_number_input_data_dependencies: u64

Max number of input data dependencies

max_functions_number_per_contract: Option<u64>

If present, stores max number of functions in one contract

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

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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.

Performs the conversion.

Should always be Self

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.